Skip to main content
All CollectionsIntegrations
HubSpot integration
HubSpot integration

Integrate Scribeless with HubSpot to programmatically trigger handwritten mailers for contacts from workflows.

Updated over a week ago

Connect Scribeless to HubSpot to send handwritten mailers programatically in a prospecting sequence, when meetings are booked, deals are closed, and much more.

You will need to have "Operations Professional" to integrate Scribeless & HubSpot directly. You can choose to integrate via Zapier instead if you are on a HubSpot starter plan.

Getting started

  1. Sign up to the Scribeless platform and create your campaign

  2. Create your HubSpot workflow

  3. Select the trigger event from within a contact, company, or deal property

  4. Add any filters or time delays as needed

  5. Set the action to "Custom code"

Mapping HubSpot properties

Map the relevant properties in HubSpot to the following naming conventions. If done correctly, this will result in the code snippet below working correctly first time, with the only changes you need to make being the API key & Campaign ID.

Custom code

const axios = require('axios').default;

exports.main = async (event, callback) => {
Use inputs to get data from any action in your workflow and use it in your code instead of having to use the HubSpot API.
const campaign_id = ""
const api_key = ""
const testing = true

const title = ""
const firstName = event.inputFields['firstName']
const lastName = event.inputFields['lastName']
const department = ""

const address1 = event.inputFields['address1']
const address2 = ""
const address3 = ""

const city = event.inputFields['city']
const region = event.inputFields['state']
const zip = event.inputFields['zip']
const country = event.inputFields['country']

const custom1 = event.inputFields['custom1']
const custom2 = event.inputFields['custom2']

const result = axios.put(`${campaign_id}`, {
recipients: [
"first name": firstName,
"last name": lastName,

"address line 1": address1,
"address line 2": address2,
"address line 3": address3,

"state/region": region,
"zip/postal code": zip,

"custom 1": custom1,
"custom 2": custom2
params: {

console.log("Result", await result)

Use the callback function to output data that can be used in later actions in your workflow.
outputFields: {

Scribeless support

Any issues, concerns or difficulties you run into - reach out to us through our live chat. We'll hop on a quick call with you to implement and will have you up and running in no time.

Did this answer your question?