Can I edit module setting with code?

I want to use OpenAI module’s extract structured data feature.

However, setting up Structured Data Definition manually with GUI is pretty tiring.

Can I instead copy paste a certain format of JSON and let it set the Structured Data Definition?

Welcome to the Make community!

That’s what the map toggle does.

Screenshot_2024-05-29_210553

The Array Aggregator module allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

Here is an example of using the “Target structure type” of an Array Aggregator module:

As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.

Alternatively, you can use a Parse JSON module instead of an Array Aggregator.

Either way, you’ll need an array of complex collections.

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

1 Like

Hi @ samliew Thank you for your response.

What if when I want to do a below scenario? I read through the docs but not sure if this is the right approach using aggregator.

  1. PipeDrive new Object created
  2. Pass one field of long text inside that PipeDrive object, pass it to ChatGPT for structured data
  3. Output to the original Object’s properties.

Hi Sam! Thank you for your answer here.

But I have difficulties understanding how Array Aggregator and Parse JSON should be used in my scenario.

I simply want to provide the JSON definition to be used inside Structured Data.

I can successfully run this scenario manually and a successful input bundle looks like this

[
    {
        "model": "gpt-3.5-turbo",
        "prompt": "Organize the job description data into structured format",
        "rawText": "[some job posting]",
        "parameters": [
            {
                "name": "PositionKind",
                "type": "string",
                "isRequired": true,
                "description": "募集職種"
            },
            {
                "name": "WorkLocation",
                "type": "string",
                "isRequired": true,
                "description": "勤務地"
            },
            {
                "name": "CompanyName",
                "type": "string",
                "isRequired": true,
                "description": "会社名"
            }
        ]
    }
]

So that JSON inside "parameters" is what I want to generate and map it with ChatGPT module.

I tried playing with Array Aggregator, but where do I actually define what goes inside?


I also looked at Parse JSON but that requires initial values to be filled manually after defining data structure… but that is not applicable to my use case.

Could you please advise me on how I should approach this?