The Receive data from OptinMonster webhook trigger starts a recipe when an OptinMonster campaign collects a lead, so you can pass the lead’s details to your plugins and apps. This article covers adding the trigger, adding the webhook in OptinMonster, capturing a sample lead with the trigger’s Test step, and connecting the webhook to a campaign.
The trigger requires Uncanny Automator Pro and the OptinMonster plugin, installed and active on your site. Without the plugin, selecting OptinMonster in the picker shows it as an unmet dependency and the trigger cannot be set up.
Add the trigger to an Everyone recipe
OptinMonster sends lead data anonymously, without a signed-in WordPress user, so the trigger works only in a recipe of the Everyone type. In a Logged-in users recipe the picker shows it disabled with the note “This trigger runs for everyone and cannot be used in a recipe for logged-in users.” See Recipe types: logged-in users and everyone.
- In your WordPress dashboard, go to Automator > Add new recipe, select Everyone, and click Confirm.
- Click Add trigger. In the picker, search for OptinMonster, select it, and select Receive data from OptinMonster webhook.
- In the Set up step, copy the Webhook URL with the copy button beside it. OptinMonster sends its lead data to this URL. Leave Data format set to Auto and Security headers empty unless you have a reason to change them.

Keep the trigger open while you set up OptinMonster; you come back to it to capture a sample.
Add the webhook in OptinMonster
- Sign in to OptinMonster. On the Campaign Dashboard, click your account name in the top right and choose Integrations.
- Find Webhook in the list of integrations and click Add.

- Enter a Webhook Account Name. You need one webhook like this for every recipe that uses the OptinMonster trigger, so choose a name that tells you which recipe it belongs to.
- Paste the URL from the recipe into Webhook URL. Do not click Connect to Webhook yet.
Capture a sample lead with the Test step
When you click Connect to Webhook, OptinMonster sends a test lead to the URL. Have the trigger listening first, so it captures that lead as a sample. The Test step replaces the Get samples button of earlier versions.
- In the recipe, keep the recipe switched off (Recipe off); the test listens only while the recipe is off. In the Set up step, Fields can stay empty: the test fills it in step 4. Click Test, then Listen for webhook. The test listens for one minute.
- Switch to OptinMonster and click Connect to Webhook.
- Return to the recipe. When the test lead arrives, the test shows Test passed and A webhook was received! with the keys and values it received, such as the lead’s email address and first name.

- Click Use these fields and confirm with Use these fields. The builder returns to the Set up step with one row in Fields for each key received, such as
lead/email; these rows become the trigger’s tokens. Delete the rows you do not need and click Save.
When the connection succeeds, OptinMonster adds the webhook integration so you can use it in your campaigns.
Webhook data is organised as key/value pairs: the key names a piece of data, and the value is its content. OptinMonster’s keys are grouped under lead, such as lead/email and lead/firstName. If you cannot run the test, you can enter the keys yourself in Fields with Add pair; Incoming webhook triggers explains the fields.
Add the webhook to a campaign
- In OptinMonster, create or edit a campaign. In the campaign builder, click Integrations at the top of the page.
- On the left, click Add New Integration.
- Choose Webhook as the Email Provider and the webhook name you created earlier as the Email Provider Account.
- Click Connect to Webhook.
No other settings are needed, but you can review the Lead Options if you want to change them.
Finish the recipe
Add the actions that should run for each new lead, inserting the lead’s details as tokens with the ∗ button. If an action needs a WordPress user, set up the Run recipe as card; see Recipes for Everyone. Then switch the recipe on with the Recipe on switch and submit a test lead through the campaign.
Related: OptinMonster, Incoming webhook triggers, Testing triggers and actions, Recipes for Everyone
Comments (0)