Log engagement email to ticket, and have replies automatically associated with ticket

I would like to:

1. Send an email from my own web app

2. Log that email to HubSpot and associate it with a HubSpot ticket, presumably through some version of the engagements API:

- Accounts Dashboard | HubSpot

- Accounts Dashboard | HubSpot

3. When the email recipient replies, have the reply be automatically associated with the same HubSpot ticket

I can use a reply-to email address in step 1 that will ensure that replies are handled by HubSpot, but I’m not sure how to associate the reply with the ticket. Does anyone know?

I think HubSpot does this for HubSpot-delivered emails via the email message ID and the “References” or “In-Reply-To” email header. But I can’t tell if those values can be set in step 2 above when logging an email via the engagements API. Or if there’s some other way to ensure that the reply to an original email that didn’t originate from HubSpot is automatically associated with some ticket.

Thanks in advance,

Noah

@noahfpf - there may be a faster route to what you want here. If you establish a HubSpot inbox mapped to a given corporate address, emails can be arranged to create a ticket automatically and thread replies sent through HubSpot omto that ticket. Emails and attachments woudl be included.

There would be fancier things you could do to contril ticket naming etc., but the basic functions cover a lot of bases.

Steve

Hi Steve, thanks for your suggestion.

I think you mean: when our web app sends an email to the recipient, we could BCC our HubSpot mapped address to create a ticket? That makes sense.

However, we’re already using the HubSpot API to create an appropriate ticket before sending the email, and we’re setting various values on the ticket (pipeline, stage, category, subject, content, and adding a note with additional details from our web app).

Other than asynchronously waiting for the BCC email to generate the ticket and then modifying it, do you see some way to create a ticket with all the data we need and map the outbound email to the ticket?

Thanks,

Noah

You say that you have already generated the ticket for this workflow based on some other system to system trigger. There’s alearly a lot not stated in the details here, but to duplicate the ticket/email functionality offered by default I’d still route the inbound email to an inbox and then code the handling of that email in a custom conversations workflow. I use this extensively to work around more complex external email handling scenarios - and I believe these mechanisms would support threading the conversation on an existing ticket ID (if you can identity the right ticket from the incoming email.

Best of luck.

Steve