HubSpot
NEW: we have a free HubSpot app that you can use
You can easily install the HubSpot app directly from our portal:
Log in to portal.print.one
Go to Integrate > Integrations > HubSpot and click Install
If you do not want to use the app, your HubSpot account must meet the following condition:
You must have access to the Workflow builder under the "automate" heading in the HubSpot dashboard.
This article will explain how to implement Print.one in your HubSpot workflows. In doing so, the following steps will be explained:
Linking Print.one with HubSpot can be done in Javascript (NodeJS) and Python. These are flexible programming languages supported by HubSpot. In this example, only Javascript will be used.
Links to consult
1. Creating a HubSpot workflow
Go to your HubSpot dashboard and click on "Automation" -> "Workflows" at the top of the menu. From there, click on "Create workflow" at the top right. Choose a template, or start from scratch.
In the workflow, click on the plus and in the menu that follows on "Custom code". See also the image below.
2. Linking the Print.one API Key to HubSpot
After creating the custom code action in the workflow, a menu appears on the right where the action can be edited. There, under "Secrets", click "Add secret", as shown in the image below.
In the pop-up, enter a name (letters and low dashes only) and a Print.one API key as the value. Print.one API keys can be found at https://portal.print.one/devs/apikeys.
The Print.one API Key is now linked to HubSpot.
3. Adding a Print.one action to the workflow
Add properties
In the same menu, it is possible to add properties to the code action. To do so, click "Add property" and add all desired properties. To send cards to a person, it is important that at least the following data is known:
A name;
An address;
A postcode;
A city;
A country.
If these details are missing, a card may not arrive correctly to the recipient. See the image below for the data for this example.
Call print.one with desired properties
To convert the desired data into a map, the code snippet below can be used. The code also includes comments with additional explanations. Don't forget to enter your own data in all fields.
Finally, click save to save the action.
4. Testing the workflow
Now that the action is finished, it can be tested. To do so, click on "Testing" in the workflow menu. Click on "Testing" in the menu of the action. Enter the data you want to use for testing and click "Test". If everything went well, the workflow will have been executed successfully and a card will have been sent to the specified data. The map will also show up in the Print.one dashboard.
Help, something isn't working!
Don't worry, when testing the action, a clear error message will appear, for example the one below. In that error message you can clearly see which template is not set correctly.
Should you still encounter a problem, you can always consult HubSpot's documentation.
Transform to static
In some cases, you may not be able to include all fields in the action to send cards. For this, there is the "Print.one - Transform to static" action, which converts these fields so they can be used You do this by placing this action before "Print.one - Send" or "Print.one - Add to Batch."
Next, configure "Print.one - Transform to static" with the fields that are not available. For all mandatory fields, there are fields with the same name to make them easy to find. If you need additional fields, there are 10 extra fields available for this purpose.
Once you have filled these in, you can add them to your send step. To do this, you need to select the output from the previous step by using "Action outputs" on the next page.
You can then use these fields for sending cards!