Update sheet via API with bridge

Options
Archiduc
Archiduc ✭✭✭✭✭
edited 05/23/25 in API & Developers

Hi everyone,

I had an objective to update a sheet with information coming from a 3rd party website. 

I've managed to make a first workflow with Bridge that works:

I'm calling the API, receiving an array of data, then I have a child workflow to add a row for each line from the array.

It works. But I have 6000 lines to come so it takes about a day to add all the rows. So problem number 1, it's a bit slow. Which brings me to problem 2: how do I keep this data up to date?

Initially (and because I'm not experienced with this), I thought: maybe I'll just delete all the rows and re-initiate the workflow everyday. But since it takes a whole day to update, I don't think that's a good idea.

Is there another way, such as checking the difference between the API array and the sheet data and updating only the lines that need it? or did I start this process the wrong way? Is there another way to add the data other than line by line?

Answers

  • Darren Mullen
    Darren Mullen Community Champion

    @Archiduc When working with Bridge you learn to avoid child workflows unless you absolutely need them as the performance is poor.

    The best way to do this is use the Javascript module to process the Array instead of using a child workflow. It will be done within a couple of minutes.

    Darren Mullen, Author of: Smartsheet Architecture Solutions

    Get my 7 Smartsheet tips here

    Take your Smartsheet knowledge to the next level and become an expert. Join the Smartsheet Guru Elite

  • Archiduc
    Archiduc ✭✭✭✭✭

    thanks for your answer :)

    I see. I'm not a developer, but we have some internally. Do you know if there is any documentation/material (official or not) to help with javascript in smartsheet?

NEW Smartsheet API Documentation - bookmark the updated link! https://developers.smartsheet.com