Allow your Hubspot users to run airSlate workflows from Hubspot records by configuring a HubSpot smart link. The smart link is a link that starts airSlate workflows using a parameter that connects to a specific Hubspot record.
The HubSpot record ID parameter is used by airSlate for Hubspot bots to pre-fill data from a Hubspot record or transfer data to this record. In your airSlate workflow, set up the following bots to perform these actions:
Pre-fill from HubSpot records bot
Update HubSpot records bot
Export to HubSpot bot
Send documents to HubSpot contact bot (the bot is configured inside the workflow builder and is used for assigning a step)
To enable your users to start airSlate workflows from Hubspot records, you will need to configure:
a workflow in Hubspot that will add a smart link to new and existing records of the type you’ve selected
a workflow in airSlate that contains necessary documents and HubSpot bots to transfer data between airSlate and your HubSpot records.
Note: The following instruction is intended for Hubspot administrators only.
1. In HubSpot, navigate to the Automation tab. Then, select Workflows from the list.
Select Create workflow. You can create a new HubSpot workflow from scratch or by using a template.
Next, select the entity that your workflow will be based on when triggered. Now choose how you want the workflow to start.
Once done, click Next.
2. The Workflow builder will open. Select Set up triggers. Then, select the trigger you need for your HubSpot workflow. In the current example, we’ll choose the When filter criteria is met trigger.
Next, select the filter category where you will choose the criteria for finding the contact you need (Contact properties in the example).
Then, select a filter you need (Last name in the example).
Next, select a condition and specify the value for finding the contact you need (is equal to any of Depp in the example).
Once the filter for finding the needed contact has been set up, save your settings.
In the HubSpot workflow builder, add a new step. Then, select a Custom code action for this step.
In the Custom code settings, select Python 3.9 for a language.
Then, proceed with adding a secret key with a link to the airSlate workflow that you need to be started via a smart link. To do so, in the Secret section, click Choose secret.
Then, select Add secret.
The Add secret modal window will open. Enter a name for your secret (airSlate_workflow_link in the example). Then, enter the airSlate workflow link. Once done, save your settings.
To retrieve the airSlate workflow link, navigate to airSlate and select the workflow you need to run automatically via a HubSpot smart link. In the Distribute tab, select Via public link.
In the Share link modal window, enable the link by switching the toggle. Then, copy the airSlate workflow link by clicking the corresponding button.
Note: Make sure you’ve installed and set up the Pre-fill from Hubspot records bot (link to the article) for the selected airSlate workflow.
Now add properties that will be included in the code:
The first row: hs_object_id (is added automatically after selecting Record ID) → Record ID
The second row: createdate (is added automatically after selecting Create date) → Create date.
Replace the code in the box with the following code. Be sure to replace the secret’s name that you have added to the workflow (airSlate_workflow_link in the current example). Also, remember to change the record type (contacts in the current example).
import os import hashlib def main(event): sign = hashlib.md5(event["inputFields"]["hs_object_id"].encode() + event["inputFields"]["createdate"].encode()[:-3]).hexdigest() return { "outputFields": { "airSlate_workflow_link": os.getenv('airSlate_workflow_link') + "?hubspot_data[record_id]=" + event["inputFields"]["hs_object_id"] + "&hubspot_data[sign]=" + sign + "&hubspot_data[record_type]=contacts" } } |
In Data outputs, select Add output. Select string for the first field. Then, enter the secret name in the second field.
Once done, click save your settings.
Now proceed to create the last step in the Pipedrive workflow. To do so, click the plus icon in the HubSpot workflow builder under the step with Custom code settings. Then, add the Copy property value action.
Once added, select the secret you used in the Hubspot workflow as a place from where the property value will be copied from. Target object is selected by default. Then, select the Hubspot record field where the generated smart link will be embedded.
Once done, click Save.
After the Hubspot workflow has been set up, click Review and publish.
On the next page, you’ll see the number of existing contacts for which the smart link will be generated. Select the Yes, enroll existing contacts who meet the trigger criteria as of now checkbox. Then, click Turn on to activate the Hubspot workflow.
That’s it! The smart link for creating airSlate documents using Hubspot data will be automatically generated and added to the specified Hubspot record field.
Users need to click the link from directly inside the Hubspot record to run the airSlate workflow. Once clicked, the created document will open in a new window and will be pre-filled with the data specified when setting up the Pre-fill from Hubspot record bot.























