HubSpot + n8n integration: Better way to send and associate emails automatically to tickets?

Hi everyone,

We’re working on an automation flow between HubSpot and n8n, and we’d appreciate your help improving the part related to sending emails and associating them automatically with tickets.


:wrench: Current Flow

  1. A ticket is created in HubSpot via API.
  2. A HubSpot workflow trigger checks certain conditions.
  3. If those conditions are met, it calls an n8n webhook.
  4. The n8n workflow currently does:
    • Webhook Trigger
    • Business rules
    • AI-generated response
    • Email sent via Gmail node
    • Attempt to associate the email with the ticket

:thinking: Where we’re struggling

The most confusing part is the behavior of sent emails and their association with the ticket.

Right now:

  • We send the email using BCC to HubSpot.
  • This makes the email appear in the contact’s activity, and then we manually associate it to the ticket using the API.
  • Issues:
    • The email appears as an incoming email, not an outgoing one, because it arrives through BCC.
    • When the customer replies, the HubSpot conversations inbox doesn’t always associate the reply with the ticket, even if we keep the subject line the same and include the ticket ID.
    • The experience is not the same as replying directly from HubSpot’s inbox.

:test_tube: Other option we tested

We also tried another approach:

  • Not using BCC, and instead creating a Logged Email via the API to record an outgoing email.
  • But with this option:
    • If the customer replies, the reply is not automatically associated with the ticket in the inbox.

:red_question_mark: What we’re trying to achieve

We’re looking for behavior as close as possible to:

:check_mark: Replying from HubSpot’s Conversations Inbox
:check_mark: The email appearing as a true outbound ticket email
:check_mark: If the customer replies, the reply is automatically associated with the ticket


:sos_button: Can you help us?

  • Is there a recommended best practice for sending emails from n8n that get properly associated with tickets?
  • Is there any HubSpot-approved method to simulate a “real” reply from the inbox?
  • Has anyone achieved a similar integration where replies are consistently associated with the ticket?

Any guidance or suggestions would be greatly appreciated.
Thanks in advance!

Hey @CarlosBB and welcome, it’s a pleasure to have you here! :orange_heart:
Thanks for reaching out to the HubSpot Community!
I’d love to put you in touch with our Top Experts: Hi @Anton, @MichaelMa and @SteveHTM do you have recommendations for @CarlosBB, please?
Thanks so much and have a lovely day!
Bérangère

@CarlosBB - I am not an n8n user, but in related workflow situations, I believe triggering a 1:1 email from HubSpot (ticket/contact record) would give your the relationships/associations you are looking for.

Hope this is helpful.

Steve
Moderator note: While this solution may not address the original poster’s specific situation, it could be helpful for other community members facing similar challenges.

Hi @SteveHTM,

Can you give me more information? I’ve researched the API but can’t find much information about it. I’ve seen some Marketing email sending endpoints but they require a template, whereas we generate the email dynamically.

I guess my point here as that you shoudl be able to send an email through HubSpot automation - and customize the content to any extent, based on templates that you set up. That would give you exactly what you are seeking without having to jump through hoops.

Steve

Hi @SteveHTM , thank you for your response, but I can’t do this directly from HubSpot automations because we need to create a business flow to build a valid response, among other things.

Is there another solution to mimic the “reply” from HubSpot?

Hi @CarlosBB and thanks for getting back to us!
To replicate a “reply” programmatically in HubSpot:

- Use the Email Engagements API to log emails on CRM records. Simply make a POST request to /crm/v3/objects/emails with your email details, and associate it with your ticket.
- Be sure to include the association type ID 223 (which represents Ticket to Email). You can do this within the same request by adding an associations object, or do it separately via:
PUT /crm/v3/objects/tickets/{ticketId}/associations/email/{emailId}/223
If you need to send transactional emails, the Single-Send API (POST /marketing/v4/email/single-send) is the way to go. Just keep in mind that this option requires either Marketing Hub Enterprise or the transactional email add-on.

A helpful note: while the HubSpot API doesn’t offer a direct “reply to ticket” endpoint that perfectly matches HubSpot’s native threading, you can achieve a similar result by:

- Creating the email engagement,
- Associating it with the ticket (type ID
I hope this helps!
Bérangère
This post was created with the assistance of AI tools

Hi @CarlosBB,

I agree with @SteveHTM’s direction here, if your goal is to replicate the native Conversations Inbox behavior (true outbound classification, automatic ticket association, and proper reply threading), the most reliable approach is to let HubSpot send the email.

The key difference is that when emails originate from HubSpot (either from the ticket record or via workflow/API), HubSpot generates and manages the internal metadata (message IDs, headers, ticket associations, etc.) that power native threading. That’s what allows replies to automatically attach to the correct ticket.

When sending via Gmail + BCC or logging an email through the CRM API:
- You can associate the email record,
- But you’re not reproducing the Conversations channel behavior,
- So reply threading may not behave consistently.

Given that you still need n8n for business logic and AI generation, a cleaner architecture could be:
1. Ticket created in HubSpot
2. Workflow triggers n8n webhook
3. n8n runs business rules + AI and returns subject/body
4. HubSpot sends the 1:1 email from the ticket record (via workflow or API)

This way:
- HubSpot remains the actual sender
- The ticket ID and internal headers are generated natively
- Replies automatically associate with the ticket
- No BCC workaround required

In practice, using n8n for logic and content generation, but delegating the actual send back to HubSpot gives you behavior closest to replying directly from the Conversations Inbox.

Hope this helps clarify the distinction between logging an email and truly sending one through HubSpot’s ticket channel.