How can I get the OpenAI module to parse the contents of an array?

Hi all,

I currently have Tally hooked up to Make, which then passes through to an OpenAI module. The issue I’m having is that the OpenAI module is trying to read the name of the array rather than its contents:

Is there anything I can do to remedy this so that the contents of the single select are passed through rather than just the name of the field?

Many thanks

Welcome to the Make Community!

If the array contains strings, you can just use the join function.

Otherwise you can use map and join together.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

Hi Sam,

Thanks for getting back to me on this - I’m not 100% sure on how I’d do this. The array comes from a single select checkbox, so I want to parse the question and their checkbox through to OpenAI. Would you be able to let me know the best way of going about this please?

Can you show the array contents and what you want to extract and send forward?

This is one of the arrays in question - so I want to extract the question at the top, and the text related to whichever answer they select:

So if they select option B, I’d want to extract “How frequently do you release code into production?” and “Weekly”.

I meant inside Make, form the Tally module output bundle.

Got it, sorry! Picture is below:

Can they only select one option? You can click on the [1] in front of Weekly to map the answer of the question then.

That throws an error in the output, saying “Result: missing information” - this is what my OpenAI section looks like if I click the [1] in front of “Weekly”:

Welcome to the Make community!

Please provide the output bundles of each of the relevant modules by running the scenario (you can also get this without re-running your scenario from the History tab).

Click on the white speech bubbles on the top-right of each module and select “Download input/output bundles”.

A. Upload as a Text File

Save each bundle contents in a plain text editor (without formatting) as a bundle.txt file.

You can upload the file here by clicking on this button:

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
Here are some ways to provide text content in a way that it won’t be modified by the forum.

  • Method 1: Type code fence manually
    Add three backticks ``` in a separate line before and after the content, like this,

    ```
    text goes here
    ```
    
  • Method 2: Highlight and click the “preformatted text” button in the editor

  • Method 3: Upload your file and share the public link
    (this method is only recommended for large files exceeding the forum upload limit)

Providing the input/output bundles will allow others to replicate what is going on in the scenario, especially if there are complex data structures (nested arrays and collections) or if external services are involved, and help you with mapping the raw property names from collections.

This will allow others to better assist you. Thanks!

Hope this helps! Let me know if there are any further questions or issues. P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

@samliew