Skip to main content

Hello Friends,

I need help related to make less task involved to achieve data store in database.

 

I am getting data from emailme form which i wanted to store in SQL database but data i am storing in rows. I mean to say if my form build with 10 fields then those 10 fields data (label as question and value as answer) is storing in database in different rows with some repeated information.

 

Like form fields are event_id, event_location, what is your name, what is your age, where do you live.

so the data should be store in database like

 

event_id       event_location      question                                   answer

101               USA                     What is your name                   nova

101               USA                     What is your age                      25

101               USA                     Where do you live                    Canada

 

and to achieve this i have multiple task in one zap with loop to store all the fields data in different rows.

 

I am using multiple zap steps to achieve this, like i can say 17 steps in one zap, steps are as mentioned below

 

  1. Webhook to catch the submitted data
  2. Formatter by zapier to get event id only 
  3. Formatter by zapier to get event name and id
  4. Code by zapier to format the event name
  5. Formatter by zapier to fix multiple images been uploaded
  6. Formatter by zapier to get all questions
  7. Formatter by zapier to get all answers
  8. Delay by zapier (added new step to add delay before loop started)
  9. Loop by zapier to loop through all the fields (questions and answers)
  10. SQL server -  Find Row via Custom Query to identify if record already submitted ( if not submitted it will go towards Add New Row and if submitted then it will go towards Update Row)
  11. Path - to split into paths
  12. Path - if record not exists
  13. Code by zapier if field value is empty then put NA as answer
  14. SQL Server New Row
  15. Path - if record exists
  16. Code by zapier if field value is empty then put NA as answer
  17. SQL Server Update Row

Please help if its possible to optimized task to achive the same result

 

 

 

Hey,

Most of the native actions like Formatter, Loop or Delays doesn’t count towards the task usage. See more about it here- https://help.zapier.com/hc/en-us/articles/8496196837261-How-is-task-usage-measured-in-Zapier

If it’s possible to replace Code by Zapier with Formatter, it will optimize your Task usage. Hope it helps!