Skip to main content

Hi there!

I want to transform a ChatGPT output (30 words/names) into a multi-line column (30 lines) in Airtable. I'm using Make as my automation engine and its Iterator module. I'm having trouble finding the right array formula

here is the one I have: split(trim({{5.choicess].message.content}}); newline)

It would be awesome if someone could help me!!

 

Hey ​@pvieljeux I’ll try to get back to this one tomorrow from my pc (currently on my phone). 
 

However if you are not too deep into Make already, I might suggest you give n8n a shot (check diferentes here). You could very esily achieve this with a code node, and you could have chatgpt provide such code for you. 
 

Also, I would suggest you ask Chatgpt to return a JSON as that will be easier to handle. 
 

Mike, Consultant @ Automatic Nation 


Hm, that looks fine and the following set up creates one record per variable value (i.e. creates record “a”, “b” and “c”) as expected:

Could you provide an example of the ChatGPT output that you’re splitting?


Thanks guys!

My output is a list of hooks for Linkedin posts. There are 30 of them and I want those that are validated by the user, to automatically create a post. I want to have one column of hooks, one of check boxes, and then another one with the associated post that is automatically generated. 

I used a parsed JSON right after an OpenAI Chagpt Module, then an iterator, then an Airtable Create a record and then an Airtable Update a record. The array I used in the iterator is trim(parseJSON({{5.choicesi].message.content}}).*)

The JSON string is {{5.choiceso].message.content}}. The thing is that I get 30 lines, but all of them with all the 30 hooks in every cell. I want one hook per cell. 🙂 - I’m almost there!! 

Any idea? 


Thanx Adam,

it was very helpful,

I figured out how to make it work thanks to your comment