Advanced bulk-create and bulk-update

Looking for guidance or (paid) implementation assistance for a problem we are facing.

We have an external UI that sends a high number of text objects to an API Endpoint in our system. The format of the text string is like [“8b0999382cb3fff”, “8b099938252afff”, “8b09993823n6ffa”], where each item represents a coordinate that we either need to create or update in a coordiante-table in our database.

One API call can contain hundred of thousands of such coordinates, and each coordinate should be unique in the database (meaning to update it if it allready exists), and link it to a parent object.

Today the flow is as follows.

  1. Trigger API endpoint
  2. Create parent object
  3. Run recursive workflow on the list of coordinates, that creates or updates the record, and links it to parent object.

This works as intended, but #3 takes a loooong time to complete…

I’ve tried doing a bulk create using the data api to run on chunks of 900 in the list, but have not succeeded (it only creates one item with the 900 coordinates). I am also having problems finding how this approach can create an object that has a reference to another object.

Any API ninjas able to help on this?

I’ve tried doing a bulk create using the data api to run on chunks of 900 in the list, but have not succeeded (it only creates one item with the 900 coordinates).

You must be saving the coordinate value as the entire text string…

You need to create one line on the API bulk create call body for each thing you want to create.

So split the original text, then format it in the correct way for the bulk create API call.

I am also having problems finding how this approach can create an object that has a reference to another object.

You can link newly created things to existing database objects by setting the relevant field with the Unique ID of the existing thing.

@adamhholmes , thanks!
Do you mean that I need to create 900 lines on the API connector if I want to create 900 items? And then specify the separation parameter in the call for the bulk operation?

Adding reference: I think the problem was that the field to reference is of list type. So need to find the syntax for “add to list”.

No, not at all…

Just when you format your API body, take the original string, split it into individual items, and then create the correctly formtted string for each (using :Format as text)

Adding reference: I think the problem was that the field to reference is of list type. So need to find the syntax for “add to list”.

Just include the unique IDs of each thing in the JSON array.