PocketKnife - QR Code
Generate QR codes through a workflow, store them as HubSpot files and use them anywhere
Using QR Code
Use PocketKnife as your own QR code generator in HubSpot. Add a destination URL to a workflow action, and PocketKnife generates the QR code and saves it as a file in HubSpot. You can use the QR code in three ways:
- File URL: the link to the QR code image, for example for a custom code action, a webhook or a web page.
- File ID: the HubSpot ID of the QR code image, for use within HubSpot, for example in a custom code action or a webhook.
- Base64 text: the content of the QR code as text, to embed the image directly in an email with an HTML module, without loading it from a server. Gmail doesn’t support this.
Use cases
A few examples of what you can do:
- Email your contacts a QR code with a payment link.
- Lead visitors to your product catalog with a QR code on printed materials or presentations.
- Show a QR code on a web page that leads to a promo or showcase page.
- Email your contacts a QR code as their entry ticket to a fair or event.
Getting started
No setup is needed in the PocketKnife app. As soon as PocketKnife is connected to your HubSpot portal, the QR Code action is available in your workflows.
Create a QR code in a workflow
Below is a step-by-step guide based on a specific use case. The QR Code action creates a file in your HubSpot file manager. From that file, you get three outputs: a file URL, a file ID and base64 text. Use the one that fits your use case.
Example scenario: an entry ticket for your event
Contacts register for your event through a landing page on your website. After they register, they get an email with a personal QR code. This QR code is their entry ticket and is scanned when they arrive at the event.
Follow these steps to add the QR Code action to a workflow.
- Create a result property. Create a single-line text property to store the result. Use a contact, company or deal property, of the same record type as the workflow you’ll create.
- Create a workflow. Create a workflow of the same record type as your result property, and set your enrollment triggers.
- Add the QR Code action. Add an action and choose QR Code under PocketKnife.
- Add the URL. In URL, enter the page the QR code should lead to. Add personalization tokens to pre-fill a form on that page, for example the contact’s first name, last name and email.

- Add a branch for successes and errors (optional). Add an OK-ERROR branch to check whether the QR code was generated.

- Save the result. Add an action and choose Edit record. Under Property to edit, select your result property. Under Choose a value, go to Action data > QR Code and select URL. This saves the link to the QR code image on the record.

- Save other results (optional). Repeat the previous step with a separate result property for each other output you need, such as Base64 or ID.
💡 Pro tip
Add a delay after you save the result, before the next action. That gives the result property time to fill in.
Use your QR code
Once your QR code is created, you can use it right away:
- PNG in a custom email module: show the QR code image in your marketing emails, using the file URL.
- File ID: use the QR code within HubSpot, for example in a custom code action or a webhook.
- Base64: embed the QR code directly in an email as text.
Note
-
Showing the QR code in your marketing emails with a custom module is only available with Marketing Hub Professional or Enterprise.
-
Want to scan QR codes with a phone, for example to check registrations at your event? That needs extra development and HubSpot serverless functions. Contact our support to request it.
⚠️ Attention!
Gmail doesn’t show base64 images in emails: it hides them or removes them from the email. To show a QR code in an email, use the file URL output instead. This links to the PNG image of the QR code.
Check your progress and credits
In the PocketKnife app, open QR Code History to see your generated QR codes, failed runs and credits used. The number of credits allowed depends on your subscription plan (Freemium, Single Feature, Pro or Enterprise).
To upgrade, click your username, go to Subscription & Billing and choose the plan that fits your needs.
Any Questions
Please contact our support team via this form