APIs & Integrations


Export notes, attachments, emails, and deal info when a Deal closes?

Hello, I am wondering if there is an easy way to have Notes, Attachments, Emails, and Deal info exported when a Deal closes?


2 Replies 2

Export notes, attachments, emails, and deal info when a Deal closes?


Consider Help Desk Migration to export ticket notes, attachments, and emails (contacts) automatedly. You can export this data to CSV or database format and check reports with the exported records. The free demo shows how it works so that you can decide if this tool fits you before paying.

Guide | Platinum Partner
Guide | Platinum Partner

Export notes, attachments, emails, and deal info when a Deal closes?

Hello @BFPM,


What I would do is set up a push to a webhook whenever a deal is closed, you can do that by using workflows (see capture below).



You would need to set up a webhook to receive the information whenever the deal is closed.
To do that you have plenty of options, including hosting a function in the cloud (Google Cloud functions, AWS, etc.) but depending on your coding skills, low/no-code services like Integromat or Zapier make it easy to do so and Integromat really is on the cheap side.


Then once you get the real-time information that a deal is closed, you can call several API endpoints to collect the data you want to export.



You have the engagements API documentation here, this will let you collect notes and emails linked to the deal.

You'll have to get all associations for the deal first and it will return a list of associations.

Then you can use the call GET "/crm/v3/objects/notes/{noteId}" or GET "/crm/v3/objects/emails/{emailId}" with the ids from the previously generated list to get the metadata of all desired notes/emails.




I don't really remember how is built the JSON you receive on your webhook, but it should contain the "deal info" you'd like to export.

If not, you can use the deals API, and more specifically the GET "/crm/v3/objects/deals/{dealId}" endpoint to collect the properties you want for the deal.


Doing this will let you build a dictionnary of all metadata related to the closed deal so you can export it to your platform of choice.


That's what I would do and it should work, but obviously there are other parameters to take into account like the amount of deals you manage on a monthly basis and the number associated communications/notes which would basically dictate where it would be best to export/store that info.


Hope this helps !


Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !