Best answer

Use all fields from a previous action in Code without mapping

  • 16 May 2020
  • 1 reply
  • 1570 views

Userlevel 1

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.

icon

Best answer by BowTieBots 23 May 2020, 17:38

View original

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

Userlevel 4
Badge +4

@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.