PUBLIC API/ZAPIER
Zapier - Formatting arrays correctly
2min
background when working with zapier , adding data to arrays needs some extra javascript to convert the data zapier calls arrays "line items" and formats them like so, \[123,456,789] whereas siteglide api expects a javascript formatted array such as, \["123","456","789"] to convert these two data types, use the screenshots and code below in this example we are getting a pre existing user and their secure zones, then adding in a new item zapier setup let data = inputdata sz split(','); //where sz is the name of the input data you picked above let array = \[]; data foreach(item => array push(item)); array push("178375") //the id of your secure zone output = {output json stringify(array)}; the above javascript code and flow can be used for anywhere that you need to add an item to line items within zapier