APIs & Integrations

Not applicable

Creating emails via API

Can you create emails and select a template etc via the api?

Cannot seem to find this functionality

8 Replies 8
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Creating emails via API

Hi @Lee_Jackson,

After creating the workflow in-app, you’ll need to use the API to pull the data for that workflow. The workflow ID appears in the URL of that workflow:

0 Upvotes
Not applicable

Creating emails via API

That’s great, thanks Derek, help much appreciated

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Creating emails via API

Hi @Lee_Jackson,

You can create workflows via the API, and those workflows can include email send actions. But those emails must already exist in HubSpot before they can be included in the workflow JSON.

0 Upvotes
Not applicable

Creating emails via API

Hi Derek

Is there some more detailed documentation on how you would accomplish this? Or could you just paste in a json example for sending a saved email.

The following page https://developers.hubspot.com/docs/methods/workflows/v3/create_workflow gives a very basic overview but I would have no idea which parameters would be needed to accomplish this.

The documentation on that page also mentions creating a workflow manually, then “copy the json of these steps” which makes perfect sense, but when I create a workflow I have no option visible to export the json representation. Could you point me in the right direction?

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Creating emails via API

Hi @Lee_Jackson,

By transactional email, I was referring to the transactional email API, which is only accessible to customers with the transactional email API. The article below has some more information on that. It’s not possible to create an email via the API, though.

0 Upvotes
Not applicable

Creating emails via API

Hi Derek

Thanks, also is it possible to create a workflow that sends emails using the workflow api? Wasn’t a lot of info on all the different flags I’m assuming are available so wasn’t sure

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Creating emails via API

Hi @Lee_Jackson,

It’s not possible to create/send batch emails via the API, other than in the case of transactional email.

0 Upvotes
Not applicable

Creating emails via API

Thanks for replying. By transactional emails, do you mean just simple emails sent as required?

What I’m trying to do is add emails using an email template and use this within a workflow, all via the api, so this isn’t possible?

0 Upvotes