Skip to main content
This runbook will walk you through the process of connecting a Marketo campaign to an allGood worksheet Item Webhook.

Follow these instructions exactly. Marketo is very particular about webhook configuration.

There are many places in this process where it’s easy to get tripped up. For instance:
  • If you don’t copy-and-paste the provided template exactly, you may get status-code-400 errors calling the webhook.
    • This includes pasting the template somewhere else before pasting into Marketo.
  • Marketo will navigate you away from the webhook you started on when you save settings–you must make sure you’re on the right page every time.
  • If you don’t set the Content-Type header correctly, Marketo will send the webhook in an incorrect format.
It is very important to follow these instructions closely and to-the-letter.

Prerequisites

  • A Marketo smart campaign you’d like to trigger the webhook from
    This can be an existing campaign, or you can create a new one for this purpose.
  • A webhook template payload
    This payload determines the data that Marketo sends to allGood in the webhook. Reach out to allGood support to get the right template payload for your use-case, or use the default one provided in the steps below.
  • An allGood Webhook URL
    This will look like https://webhook.allgoodhq.app/xxxxxxxxxxxxxx. You can get this URL from allGood support, or by creating an Item Webhook in the worksheet you’d like to connect to.
First, you’ll need to create an allGood worksheet with your desired automation steps. Then, in the worksheet settings, create an Item Webhook.
Item Webhook settings in an allGood worksheet
1

Copy the webhook URL

Write down this URL—this is the webhook URL that’ll need to go to Marketo.
2

Set the Action

Make sure the Action is set to Add to Worksheet + Run Flow if you’d like the flow to automatically execute when new items come in.
Make sure you have all of these prerequisites in place before moving on. If you have any questions, reach out to allGood support and we can help walk you through the process.

Creating a webhook configuration in Marketo

1

Create a new webhook configuration

In Marketo, to go Admin > Webhooks.
Marketo Admin → Webhooks
Click New Webhook in the header:
New Webhook header button
2

Configure the webhook

You should see the following form:
New Webhook form in Marketo
  1. Set the URL
    Under URL, enter the webhook URL from earlier.
  2. Set the Request Type
    Under Request Type, select POST.
  3. Set the Template
    Under Template, paste the payload template verbatim.
    Do not edit or modify the template.
    Do not paste it into a word-processing document first.
  4. Set the request token encoding
    Under Request Token Encoding, select JSON.
  5. Set the response type
    Leave Response type as None.
  6. Create the webhook
    Click CREATE to save the configuration.
If allGood support hasn’t given you a custom webhook template, you can use the following default template:
{
  "First Name": {{lead.First Name}},
  "Last Name": {{lead.Last Name}},
  "Email": {{lead.Email Address}},
  "Website": {{company.Website}},
  "Company": {{company.Company Name}},
  "Phone": {{lead.Phone Number}},
  "Job Title": {{lead.Job Title}},
  "SFDC Lead Id": {{lead.SFDC Id}},
  "Mkto Lead Id": {{lead.Id}},
  "State": {{lead.State}},
  "Country": {{lead.Country}},
  "Inferred Country": {{lead.Inferred Country}},
  "Inferred State Region": {{lead.Inferred State Region}},
  "Inferred Postal Code": {{lead.Inferred Postal Code}},
  "Postal Code": {{lead.Postal Code}}
}
You can copy this cleanly to your clipboard by using the button in the top-right of the above block.
4

Add a Content-Type header

Once it’s created, you’ll need to add a custom header.Under Custom Headers, click EDIT.
Custom Headers section EDIT button
Add a new header, set Header to Content-Type, and Value to application/json.
Adding the Content-Type: application/json custom header
Click SAVE.
5

Check your Work

Once you’re done, it should look like this:
Completed Marketo webhook configuration

Trigger the webhook from a Smart Campaign

1

Create a new Smart Campaign

Create a new Smart Campaign in an appropriate location, or use an existing one.
2

Configure the Smart List trigger

Under “Smart List”, trigger the campaign on the event you’re interested in.
  • This could be e.g. Fills Out Form, or any other lead-based trigger.
  • Add a filter which excludes any leads that have not consented to data processing, or who have opted out. This depends on how you implement GDPR in your Marketo instance.
3

Add the webhook action to the Flow

Under “Flow”, add a “Webhook” action, and pick the webhook you created in Marketo’s Admin page.
4

Configure the Schedule

Under Schedule, run each person through the campaign flow every time they enter the campaign.
5

Activate the campaign

Activate the campaign.

Troubleshooting

If you get status code 400 errors, or see “Unparseable JSON” in the activity log when Marketo tries to call the webhook, this is almost always due to a configuration error in Marketo’s settings:
  1. Check that you’ve copied the above template verbatim and in its entirety.
    • Certain document apps (Word, Google Docs, etc.) may silently add hidden formatting characters to the template if you paste it there first. To avoid this, copy the template directly from this page and paste it directly into Marketo.
  2. Check that you’ve set up the Content-Type header as described above.
  3. Check that you’ve just configured the right webhook—Marketo loves to sneakily navigate you to a different config page every time you save something.