JSON Webhook not actually firing

Phillip_Wild
Level 10

JSON Webhook not actually firing

Hi all

Having some trouble with a JSON webhook I'm trying to run through Marketo and Zapier. Here's the code:

URL: (what Zapier gave me)

Request Type: POST

Template: {"first name": "{{company.First Name (A):default=edit me}}","last name": "{{company.Last Name (A):default=edit me}}", "billing address": "{{company.Billing Address:default=edit me}} ", "billing city": "{{company.Billing City:default=edit me}}", "billing country": "{{company.Billing Country:default=edit me}}", "postcode": "{{company.Billing Postal Code:default=edit me}}"}

Request Token Encoding: None

Response type: None

Custom Headers: Content-Type, application/json

Unfortunately nothing seems to be received by Zapier. I also tried with Request Bin and got nothing after running some sample leads through a smart campaign. But when I run identical code through Postman (changing the token fields to be hardcoded values) it works like a charm.

I noticed in another thread that Marketo automatically puts quotes around tokens when the encoding type is JSON, so I changed it to "None". But this doesn't seem to make a difference. Can anyone see what I'm missing here? I'm sure it's something simple!

Thanks in advance.

Phil

Tags (2)
5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: JSON Webhook not actually firing

What do you see in the Activity Log for your test leads (also reflected in the Smart Campaign results)?

Marketo is good at recording the final payload it sent to the webhook endpoint and how the endpoint responded.  Are you sure your triggers themselves are firing (SC activated, correct filters, etc.)?

Phillip_Wild
Level 10

Re: JSON Webhook not actually firing

Hi Sanford

It's all in the equivalent Activity Logs, but here's all the info I can see when I double click:

Webhook Id:

20

Webhook Name:

Send Book of Dreams

Lead ID:

2077272

Response Code:

1000

I feel like I should be seeing more based on what you say above. Am I looking in the right place?

Thanks, Phil

SanfordWhiteman
Level 10 - Community Moderator

Re: JSON Webhook not actually firing

As Jenna says, the direct invocation of a webhook needs to be from a trigger campaign. But that doesn't mean you can't batch-trigger (if you will) webhooks.

I usually use a score field -- Webhook Calls: {your webhook name} would be the most technical name for it, but you might want something friendlier -- and just run a batch to increment the score +1. Then the trigger campaign with the 'hook runs on score change. Alternately, you can use Request Campaign, which is the same idea.

Jenna_Molby10
Level 3 - Champion Alumni

Re: JSON Webhook not actually firing

Looks like you're using a batch campaign instead of a triggered campaign. Error code 1000 indicates that the ‘Call Webhook’ flow action is being housed within a Batch Campaign. Webhooks can only be fired from trigger campaigns.

More info can be found here: http://developers.marketo.com/webhooks/errors/

Phillip_Wild
Level 10

Re: JSON Webhook not actually firing

Brilliant, thanks guys. Shame that isn't obvious through the Marketo UI. It just let me set it up as if there were no problems!

I'll test it out later today but seems pretty certain that's the cause.