ServiceNow and Smartsheet BRIDGE integration

Hi,
I am trying to bring all records from a table in ServiceNow into my Smartsheet. All field names align and I am able to get the record from ServiceNow but unable to send that data into an existing Smartsheet.
I did get it to add one row from ServiceNow but that's only if I reference the row specifically in the Key and Value fields. I want to be able to reference all the records in ServiceNow and add them into Smartsheet as a one-time pull and then have it automatically bring in new rows as new records are made in ServiceNow table. Could anyone assist?
Current workflow:
Key#1: Name
Value#1: {{states.startstate.servicenow.get_records.data.Name}}
Answers
-
Hi @yh374,
I believe youβll need to create child workflows for each row you want to add. However, if you have a large number of rows, youβll need to use JavaScript to streamline your workflow - Iβd recommend taking a look at this comment for @Brian_Richardson's explanation of updating multiple rows at once, since itβll likely be similar for adding multiple rows at once: Bridge | How to Find Rows With Status & Delete Them.
For more information about creating child workflows, take a look here: Use child workflows to manage complex processes.
Iβd also recommend reviewing the following related threads:
Hope that points you in the right direction!
Georgie
Need more information? π | Help and Learning Center
γγγ«γ‘γ― (Konnichiwa), Hallo, Hola, Bonjour, OlΓ‘, Ciao! π | Global Discussions
-
Thanks for the callout @Georgie
Hereβs some more examples using JavaScript and child workflows to push multiple row updates at once:https://community.smartsheet.com/discussion/97621/use-javascript-in-bridge-to-efficiently-import-data-from-an-api#latest
-
yh374
You would want to avoid doing any individual row adds for integrations of large data sets. The general pattern for this is going to be
1. Get list of records from SNOW
2. Get target sheet you want to add to
3. Map the snow records to a JSON object using the field names matching the column Ids in SMAR
4. Submit that JSON over the add or update API on Smartsheet
There are some specific SNOW considerations you will want to make as well as pagination is horrible on that system and needs to be inferred by the total number of returned entries. Then you will need to do child workflows to dyanmically handle offsets and recursion.
Additionally for SMAR large data sets you also will need to handle pagination of the API results as the API cannot insert thousands of records at a time.
As you are attempting an unbulkified operation for this use case, it may be best to speak with a specialist as recursion is dangerous if not implemented correctly (like you could unintentionally run a workflow infinitely).Principal Consultant | System Integrations
Prime Consulting Group
Email: info@primeconsulting.com
Follow us on LinkedIn!