Email

How to use Single-Send in an email to merge custom properties

Last updated: September 12, 2016

Available For:

Product: HubSpot Marketing
Subscription: Basic, Professional, & Enterprise

So you're all set up with transactional email and want to get started with single-send.

By selecting Save for single-send API during the recipient step of building an email, you can use this endpoint to render the email, add some customizations on the fly, and send the email to the intended recipient. The Email ID provided in the Email Tool is used to specify which template to render.

Follow the instructions below to learn how to set up a single-send email for things like sending your user a purchase receipt or order confirmation.

  • From your HubSpot Marketing account, navigate to Content > Email.
  • Click Create new email > choose a template > name your email > click Create.
  • In the Edit tab, navigate into your Main Email Body module and add any contact property tokens into the body of your email. You can do this by inserting any existing contact properties - click Insert > Personaliztion token > choose your token > click Insert.
  • If you want to insert a custom property that doesn't exist, you will want to do this manually within the Main Email Body module - click Tools > Source code and type in a custom token like {{custom.ITEM_1}}
  • Click into the Settings tab next and choose Transactional from the Email type dropdown menu.
  • Now go to the Recipients tab and choose Save for single-send API.
  • Click the blue button to Save for single-send API when you're done editing your email.
  • Once saved, you'll get an internal email ID for use with the API, where you'll be pushing the appropriate information into the custom tokens you set in your email. Copy the internal email ID.
  • Next, take a look at the developer documentation here on how to use this API endpoint (along with a JSON example for reference) to push values to the tokens you set with your email.

Was this article helpful?