i am using the single email api to send mail to the user , but i also want to log the email into the system , it sends the mail using this api but not logging the email using the create email api
Hey @aliqazi2
If we are correct you should go through this guide here: Marketing API | Marketing Email - HubSpot docs
It says that: HubSpot does not save the HTML/JSON sent through this API. You can review the email template from the recipient contact’s timeline, but if you want to keep a record of the email’s contents, it’s recommended to add a BCC to the email.
Hi @aliqazi2 ,
There are two ways to address the issue of logging emails in HubSpot using the API:
1. Single Send API and Engagement API:
The Single Send API can be used to send your email as planned. However, it doesn’t directly log the email within HubSpot.
After a successful email delivery (confirmed through the Single Send API response), you can utilize the HubSpot Engagement API’s POST /crm/v3/objects/emails endpoint to create a new email record within the system. This logs the email details in HubSpot.
2. Workflows with Custom Properties (Alternative):
HubSpot workflows can be triggered by the Single Send API call.
Within the workflow, you can create a custom property to indicate the email was sent via Single Send API.
The workflow can then create a new email record using the CRM Email API.
Refer to HubSpot’s Documentation:
For detailed instructions on using these APIs, refer to the HubSpot developer documentation:
Single Send API: Accounts Dashboard | HubSpot
Engagement API: Accounts Dashboard | HubSpot
CRM Email API: Accounts Dashboard | HubSpot
By following these steps, you can ensure your emails are sent and logged effectively within HubSpot.
