I have a Zap that runs a loop to pull an employee # from a csv file, call an API to get a value from the employee’s profile, and then I need to do a find/replace in the csv file to replace the employee old value with the new value. I can’t seem to be able to find a working solution that will pull in the csv file, then continue to update it until all records are updated. I keep getting stuck with the loop going back to replace the original csv file. In general, this is what my zap looks like where I’ve tried using Tables and Files. Any ideas?
Page 1 / 1
Hi @melissa.hunchuck
Your screenshot shows a Zap app action that do not exist:
For the general Zap logic, you likely have to upload the CSV file to GDrive via the GDrive Zap app, then you can use the GSheets Zap app to do the updating of rows in the GSheet.
Incase anyone else stumbles upon this looking for the same solution in the future, I have a working Zap solution that does what I need it to do but I will continue to refactor it to move off of google sheets if possible. Also note, looping and sub-zaps does work so long as you use the method mentioned below with the filter step.
The summary of my workflow is:
Main zap - grabs my csv file from an API call
Sub-zap: transforms the csv file to a google sheet
Data is looped in the sub-zap so that we grab 1 employee # and look it up via API for the employee’s payroll #
Find the matching employee # + company code and then replace the existing employee’s payroll # from the source file in the google sheet
At the end of the looping, filter for last iteration = true and wait 1 minute so the google sheet catches up with updates
Rebuild the csv file and send back to main zap
Main zap then builds the json to send to the payroll system
Awesome work here @melissa.hunchuck! 🙌 Thank you so much for sharing details on how you solved this - it’s super helpful for others who might be building similar workflows. And thank you @Troy Tessalone and @Sparsh from Automation Jinn for jumping in to help out 🧡