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
- Webhook to catch the submitted data
- Formatter by zapier to get event id only
- Formatter by zapier to get event name and id
- Code by zapier to format the event name
- Formatter by zapier to fix multiple images been uploaded
- Formatter by zapier to get all questions
- Formatter by zapier to get all answers
- Delay by zapier (added new step to add delay before loop started)
- Loop by zapier to loop through all the fields (questions and answers)
- 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)
- Path - to split into paths
- Path - if record not exists
- Code by zapier if field value is empty then put NA as answer
- SQL Server New Row
- Path - if record exists
- Code by zapier if field value is empty then put NA as answer
- SQL Server Update Row
Please help if its possible to optimized task to achive the same result