Convert Text into Multiple Airtable Rows

Hello,

I am looking to convert numbered Text into multiple rows in Airtable.
Example: Chat GPT will give me an output of text like: 1. Item 1 2. Item 2 3. Item 3. but if I send that to airtable it will put all the text in 1 row.
Is there a way to have each numbered item put in it’s own row?

Thank you in advance!

Hello,

If possible, I would include in the prompt to format the output by separating the items with something like a line break. If items are separated by line break by ChatGPT then that’s all you’d need to do.

If that’s not possible, then you could use a Text Parser Match Pattern module and use a regular expression to pull each item then use a text aggregator to put them all back together with each on a separate line.

3 Likes

Another option is to use a Text Parser Replace module using a regular expression to replace each occurrence of "#. " with a newline character.
This would leave you with something like:
Item 1
Item 2
Item 3

Then, split those by newline to give you an array of those items.
Iterate through them and use a Text Parser to number them again.
Please see attached blueprint for an example of this.
It wouldn’t work correctly if one of the items happens to contain a number followed by period and a space.
regex replace.json (7.5 KB)

4 Likes

Worked great, thank you so much Donald you are a godsend!