Skip to main content
Best answer

Use all fields from a previous action in Code without mapping

  • May 16, 2020
  • 1 reply
  • 1737 views

  • Beginner
  • 1 reply

I’m using the Webflow Form Submission trigger which sends all fields as a flat object, meaning if I want to use it in the Code action, I have to map each field to a variable in the GUI.

The problem is that if I ever add/remove fields in my form, I have to change the zap as well.

Ideally, Webflow would send all of the form data nested under a single variable, but since that’s unlikely to happen, I’m reaching out to the community.

Is there a way I can get all of the fields from an action nested under single variable?

 

To illustrate, here’s the data I get from Webflow:

{
 "siteName": "Example Site",
 "submittedAt": "2020-05-16T15:56:29.795Z",
 "name": "Example form",
 "data__Full Name": "Person A",
 "data__Email": "person@example.com",
 "data__Favorite Color": "Green"
}

What I’d like it to look like:

{
 "siteName": "Example Site",
 "submittedAt": "2020-05-16T15:56:29.795Z",
 "name": "Example form",
 "fields": {
 "data__Full Name": "Person A",
 "data__Email": "person@example.com",
 "data__Favorite Color": "Green"
 }
}

In the second case, I could then map “fields” as input data in the Code action.

Best answer by BowTieBotsBest answer by BowTieBots

@ugh what you want to do isn’t possible with the Zapier Integration.  You can change the “parse data” functionality for the Trigger.

 

The work around would be to use a Zapier Webhook as the trigger and send a webhook from Webflow.  You can then get the raw webhook data as a single variable to pass to your code step which would allow you to parse the response and manipulate as needed.

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

BowTieBots
Forum|alt.badge.img+4
  • Zapier Expert
  • 82 replies
  • Answer
  • May 23, 2020

@ugh what you want to do isn’t possible with the Zapier Integration.  You can change the “parse data” functionality for the Trigger.

 

The work around would be to use a Zapier Webhook as the trigger and send a webhook from Webflow.  You can then get the raw webhook data as a single variable to pass to your code step which would allow you to parse the response and manipulate as needed.