Another customer asked us at Bright Aspects recently,

Can we add QR codes to RSVP confirmation emails that would essentially act as tickets?

Event registrants would bring print-outs of the QR code to an event, and scanning the code would update the attendance status for that lead in Marketo.

Hmm. We did build a QR code generator that will work great with Marketo for them. But we thought, why not create it as a service for all our Marketo friends?

We did.

We created a web-based service for any Marketo customer to be able to create dynamic QR codes. In 10 minutes or less.

No manual work. No alerts. No coding. No SFDC trigger. No server needed. Simple few steps.

How It’s Done

The process is really easy even if you can’t write a line of code. The secret ingredient is again, an extremely useful service that essentially lets you pick any web hook service from a set of 25+ web hooks (and growing) and call it from a Marketo Smart Campaign.

Even if you consider yourself non-technical, you don’t need your developer to do it. You do not even need any help from your IT guy. You can do it all by yourself. Here is how it’s done…

Step 1: Create a Bright Hooks Account

Step 2: Create a ‘QR code’ web hook at

Here you will set up a ‘web service’ that will allow you to set up ‘QR code generation’ logic for your needs. Once set up correctly, your Marketo flow action can request this web hook, pass a field (or set of fields) and receive back the URL of the QR code generated dynamically. Then you can use that value in any email, landing page, smart list, or smart campaign.

It is more like you are ‘creating’ PHP server based business logic to do the job without writing a single line of code.

Simply log in to

Click on My Webhooks> Self-serve Webhooks

Click on ‘Add New’ button at the top.

A new window will open. Simply select ‘Generate Event QR code’ as the web hook type. And provide a short ‘name’ in ‘Your Notes’ field. That will help you to identify this webhook service in the future.

Bright Hooks will automatically generate the required code in the background and give you the ‘webhook Url’ and ‘Output JSON format’.  You will use these 2 values to configure your Marketo web hook as we will see below.

That’s it. In less than 5 minutes, you are done. As needed, you can also create any other web hook service based on the business need. In future, you can log in and see all of your web hook services anytime.

Step 3: Create a Custom Field for storing the QR code

Inside Marketo, go to Admin > Field Management > New Custom Field. Choose a “String” field and call it whatever you’d like. Here I used ‘Field 1”.

Step 4: Create Your Marketo Webhook

In Marketo, go to Admin > Webhooks > New Webhook.

The screenshot below shows what your webhook needs to look like,

Webhook Name: Something descriptive and memorable, so you can easily call it in Flow Steps and recognize it in a lead’s Activity Log.

Description: What this Webhook is for and what it should do with a concise description.

URL: This is the value of the BrightHooks web hook service URL you got from step 1.

Use the rest of the setting as specified below,

  • Request Token Encoding: Form/Url
  • Request Type: POST
  • Response Format: JSON

Pass 3 parameters in the web hook call.

  • email
  • lead_info : Information that will contain information about the lead. You can merge multiple field tokens to make this parameter. And,
  • event_info : Information that will contain information about the event. This is optional as you might use this QR code for non-event purpose.

Authentication Headers

Add your BrightHooks userid and authkey in the custom header for this webhook. You will need to pass this information to authenticate the usage of your BrightHooks powered web hook. If this information is blank or incorrect, the web service will reject the request.

When viewing your Webhook, click on Webhook Actions > Set Custom Header.)

  • userid: Paste your User ID you copied from your profile.
  • authkey: Paste your Auth Key you copied from your profile.

Step 5: Map the API Response

When you run a lead through this Webhook, it will now make a call to the Bright Hooks web service, pass the field values. In response, Bright Hooks web service will send back a response containing the URL of the newly generated QR code image to Marketo. You can see all these details in the lead’s Activity Log.

Basically by this mapping, you’re telling Marketo, “look through the response until you see an attribute called ‘qrcodeurl’, then take that value and put it into this field ‘Field1’.

Here you can see that the Webhook was called and that there was a response.

The data value change looks like,

Step 6: Deploy Your New Marketo Webhook

You can deploy your Webhook using a Flow Step in any ‘triggered’ Marketo Smart Campaign. For now, let’s create a very simple test campaign so we can verify that it’s working.

Create a Test Lead

Go to Lead Database > New > New Lead and create a test lead with email address that can receive email. We will send an email to these test leads which will contain the field1 field that is returned by Bright Hooks powered web hook.

Build a Test Email Asset

Create an email and insert a field token for the field ‘Field1′.

Build a Test Smart Campaign

Smart List

Use a “Campaign is Requested” trigger so we can easily request this campaign for testing purpose.

Flow Steps

In the first flow step, we’re going to request the Webhook we created.

In the second flow step, we’re going to send the email document containing QR code image (Field1) to the lead.

Note: for a production campaign, I’d recommend using a 1-minute wait step in between these two steps, to ensure the web service has time to come back and populate the Marketo field with the proper value.

Send Your Test

Go to Lead Database > All Leads and look up your test lead by email. From the menu, select Lead Actions > Special > Request Campaign, and request the test campaign you just build.

Step 7: Celebrate!

You should receive your test email with the test information merged in it

The image is shown as ‘broken’ as the field1 field is blank right now. You will get another test email shortly after the web hook is called. And that will look like,

You do not have to send emails like these. These are just to demonstrate that it works so smoothly.

The event attendees can bring this email (printed or on a cellphone) to the event. You can use any QR code scanners to scan this QR code and update the lead in Marketo, SFDC, and / or trigger any other business logic automatically.

That’s it. You are done. In less than 10 minutes you have empowered your Marketo flow to automatically generate QR codes with whatever data you want to encode in the QR code.

Marketo Super Experts from Bright Aspects

Need help with your Marketo? Big or small, we’ve got a solution for your Marketo related needs when you need it.