Parse Json into collection as new documents

Actions & Logic

Hello,

I have JSON that i'm receiving from openAI API. I saved as JSON path only the data i need which is list of tasks:

"{\"tasks\":[\"Buy appropriate running shoes\",\"Start with a 2 km run to establish your baseline\",\"Increase your distance by 0.5 km every week\",\"Incorporate a mix of running and walking to build endurance\",\"Incorporate strength training for leg muscles\",\"Join a running group for motivation and support\"]}"

I have 3 collections:
1. users
2. goals
3. tasks (with reference to 1 goal)

Now I want that those task will be insert to 'tasks' collection (the strings is the task name) and will be related to the goal that it came from.

What have you tried so far?

I tried to create custom function but I keep receiving errors which I dont understand

I also tried to create custom action but I couldn't make it also

Did you check FlutterFlow's Documentation for this topic?
Yes
5 replies