Best answer

How do I get webhook params that don't exist on an example?

  • 18 March 2021
  • 4 replies
  • 1685 views

I have this URL:

https://account.tallyfy.com/register?utm_source=tallyfy.com&utm_medium=organic&utm_campaign=definition-client-onboarding&utm_content=get-started&gclid=ABC123&gclsrc=ABC123&fbclid=ABC123

… which essentially contains a bunch of GET params. 

Everything in the GET params will be passed to a Zapier endpoint which listens to a webhook and then shows them up like this (that works).
 

 

The problem is simple, I know that OTHER params e.g. &something=somethingelse can and WILL exist in future and I need to use them in my zap, even though the example does not have them

 

This is a common problem - webhooks can have a variable set of fields/keys - some webhook examples have them, and some do not.

How do I use/refer to keys/entries that don’t exist yet in the example trigger?

icon

Best answer by Troy Tessalone 18 March 2021, 19:12

View original

4 replies

Userlevel 7
Badge +14

Hi @amitarelli 

Try testing with an example that has ALL of the possible query string parameters and/or values you’ll need to configure your Zap.

 

A more advanced way of deriving and mapping data points is to copy/paste a mapped query string data point from the trigger step into a browser which will return something like this

{{12345678990__querystring__test}}

The numbers at the start indicate the Zap Step ID.

The “querystring” bookended by double underscores indicates the data point is a query string paramater.

The “test” is the name of the query string parameter.

So if you know the names of the query string parameters that you’re trying to map you can artificially create those and copy/paste them into the desired field to be mapped.

 

Example below shows 2 mapped query string paramaters “Test” and “Tester” where currently only the “Test” query string parameter is present in the trigger data, but if “Tester” were to be included in the query string data it would map thru as expected.

NOTE: Always be sure to TEST!

 

@Troy Tessalone many thanks! I will use the query string method (form my own definitions) as I am unable to “fake” the webhook at this time (it’s in production).

For the first part - the zap step ID - where do I get that from?

Also - I wanted to confirm on this example {{12345678990__querystring__test}} 

  1. Are all separators double underscores?
  2. Is the second segment querystring always fixed, no matter what?

@Troy Tessalone also note my trigger is a webhook, not a URL. Is that what you understood? I am receiving a webhook with a varying set of keys like this.

 

Webhook A:

{ KEYA: VALUEA, KEYB: VALUEB }

Webhook B:

{ KEYA: VALUEA, KEYC: VALUEC }

 

Notice how KEYC is in webhook B, but not in A.

Userlevel 7
Badge +14

Hi @amitarelli 

Depends on how the webhook is being sent: GET vs POST

If via GET method, then the guidance above will work.
You can get the Zap Step ID by mapping another trigger data point in a Zap action step, then copying/pasting that into a browser to reveal the double encoded variable format {{variable}}.

If POST, then the variable format for those parameters will not include the __querystring__

Best advice: When in doubt, test it out.

Reply