Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

missing body property when using conditional logic to create record from webhook

Topic Labels: Automations Formulas
568 2
cancel
Showing results for 
Search instead for 
Did you mean: 
YBUR93
4 - Data Explorer
4 - Data Explorer

Hi all,

I am using webhooks to catch website request for our services. 
On our site we have 6 pages that all have a contact form for their independent service. These are customized to the service. E.g. some will need an amount, some will need a timeframe, e.t.c.

To illustrate and simplify my issue, let's say I have two. One for Coffee and one for Apples.
We also ask the clients e-mail.

Since i am automating our quotation proces as much as possible, we want to automatically catagorize them, so that in the next step a 3rd party software knows which quote layout and text to send. 

The automation is as follows.

  1. Webhook
  2. If body Page Url = mywebsite.com/coffee
    1. Create record
    2. Workflow: Coffee (Static)
    3.  E-mail (Dynamic, 'body e-mail')
    4. Amount (Dynamic, 'body amount-coffee')
  3. Otherwise if body Page Url = mywebsite.com/apple
    1. Create record
    2. Workflow: Apples (Static)
    3.  E-mail (Dynamic, 'body e-mail')
    4. Amount (Dynamic, 'body amount-apple')

Now this gives me a problem when I test the automation with a webhook. If i request Coffee, i get a 'fix error' on the 'create record - body amount-apple'. And vice versa.
"Amount-apple is not a valid property of body". 

Of course, this is correct. If i request coffee, it will not send that other body. I could also easily fix this issue by renaming the body on the website. Or by making more automations with different webhooks.

My question though is why this should matter when I am using conditional logic? In my mind, since the request comes from the 'coffee' site, it should not flow in to the 'create record - apple' flow and therefor this should not be an issue. 

Many thanks.

 

2 Replies 2

Hmm, any chance you could provide some screenshots of your automation setup?  I'm curious to try to recreate this and test it

ScottWorld
18 - Pluto
18 - Pluto

@YBUR93 

Are you following all of Airtable’s restrictions for how it expects to receive the parsed JSON for an incoming webhook trigger?

For example, the top level of your JSON-encoded data needs to be an object instead of an array.

You can learn more in Airtable’s support article here

If you don’t have the right format for Airtable, then your solution is to send your webhook data to Make’s custom webhooks, parse the data there, and then send it onto Airtable from there.