Forum Academy Marketplace Showcase Pricing Features

Adding a value to an array via API

Hi Everyone

I have two data types I would like to link together:

  • Users
  • Referrals

Every User has a field which is a list of there Referrals.

These Referrals are added one at a time, when they enter our CRM through an application form. What I am trying to do is add a new Referral to the list every time a new Referral comes into our CRM. I am trying to do it using integromat and the ‘add’ function for arrays, but the “add” function returns back an array as a response, and I am fairly certain you cannot re-define a whole array field in the JSON payload, you have to define each new element of the array.

I can do this by isolating the values, but that does not cater for the case where I don’t know how many values there are in the array. I have to manually specify the number of fields.

The solution is to use some sort of add function which appends the Referrals Array with the latest User ID, but I can’t work out how to do that within Bubble.