Data stores - adding data to an array

Hi,

Thanks for reading my post. I am fairly new to Make.com and do not have a tech background so sorry if this is a silly request.

I have a workflow that branches into “spin offs” using multiple webhooks. i.e. situation 1–> situation 2 → situation 3 → situation 4.

At each stage I wanted to store the output into an array in a collection I have in a datastore. i.e. situation 1 adds data point 1 to array 1, situation 2 adds data point 2 to array 1 etc etc until the collection is full then a new array is added to the collection (i.e. start the process over).

I have found however that when I have experimented with not writing over the data store - it adds a new collection with an empty array bar 1 data point. And when I have selected overwrite - all the arrays disappear for the new one.

Adding a new record return an error (as expected as they record already exists)

Updating the record just adds a new array to the collection stored - so I think something here would need to work.

Is there a way around this by using functions? Is there a way to select a specific array by its number to append data to it? Is there a way to select an array by toggling mapping in the update row module → then add data to it?

I tried switching between the bucket of data being a collection and an array - tried switching to a collection but it just overrides the old bucket.

Or would I have to use a temporary data base then upload to datastore when the bucket is full? i.e. save to google sheet then when it is full upload to the data store under a new array.

Last option is to send payloads as cumulative payload until it reaches the end and then save under a new array. I would prefer to not do this as it could mean data loss.

See image for more details

Any advice is greatly welcomed!

And if any further information is required please let me know - I have been bugging over this for about 2 weeks now.


What progress have you had, @cameron_scott?

I’ve a few thoughts to share, but will hold until you can let us know the new sticking points.

Regarding Make’s array functions they’re helpful when dealing with simple stuff. Beyond that, you might consider using Iterators and Aggregators to rebuild the data you want.

Lastly, sometimes, I find it easier to have a text field in the data store that I save my JSON object string to. Then I parse that on extraction than having to deal with specific fields. This is helpful when the JSON object is, ah, overly dynamic.

Hi Michael - Thanks for the response and pointers!

I had not considered using the string to “open and close” (as such) the data points - pretty good idea tbh. I will deffo remember that one!

I remember seeing something similar to this, in the Make.com advanced tutorial - using aggregators. Unfortunately I could not map the functionality on my side.

In regards to the problem I was facing - I opted for a temporary database in google sheets, where the items are stored then when the “full turn of the wheel” is completed - they all get saved into the database. So the issue seems to be solved :white_check_mark:

Honestly the google sheet method has been great - barely any issues. Only thing is the amount of operations has increased (not the end of the world)

The newest challenge is overriding date times to send reminders - but do not spam messages (woo :partying_face:)

2 Likes

Congratulations on the solution, and not making noise with the reminders.

1 Like