APIs & Integrations

hubsp
Contributor

Import Email and attachments

SOLVE

Hi

 

I'm migrating from superoffice to hubspot and need to import emails with their attachments.

Do I upload the attachments to the "/filemanager/api/v2/files" -endpoint with the "hidden" -property set to "true". And then take the id from the response and add under attachments when  creating email in "Engagement"?

0 Upvotes
1 Accepted solution
Willson
Solution
HubSpot Employee
HubSpot Employee

Import Email and attachments

SOLVE

Hey @hubsp 

 

You're absolutely correct! The steps below is the best solution to achieve this as you have outlined:

 

  1. Upload the desired files to your file manager using the CMS Files API.
  2. When successful, the endpoint above will return a file id which you can then use in the next step.
  3. Create EMAIL engagements on the desired contact, company, or deal record with the file id in the attachments array.
  4. If done successfully, this will create email engagements with files attached to them on any contact, company, or deal record timeline.

I hope this helps!

Product Manager @ HubSpot

View solution in original post

0 Upvotes
3 Replies 3
Willson
Solution
HubSpot Employee
HubSpot Employee

Import Email and attachments

SOLVE

Hey @hubsp 

 

You're absolutely correct! The steps below is the best solution to achieve this as you have outlined:

 

  1. Upload the desired files to your file manager using the CMS Files API.
  2. When successful, the endpoint above will return a file id which you can then use in the next step.
  3. Create EMAIL engagements on the desired contact, company, or deal record with the file id in the attachments array.
  4. If done successfully, this will create email engagements with files attached to them on any contact, company, or deal record timeline.

I hope this helps!

Product Manager @ HubSpot
0 Upvotes
hubsp
Contributor

Import Email and attachments

SOLVE

There is something I'm doing wrong when uploading a file. I can't open any file except from pdf's and they seems to be corrupted cause I get error when open them.

 

When clicking all file types except pdf it looks like this. 

Capture.PNG

 

Capture.PNG

Capture.PNG

 

 

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Import Email and attachments

SOLVE

Hey @hubsp 

 

I just want to acknowledge your latest query here and can see that my colleague, Wendy is helping out via the thread here: https://community.hubspot.com/t5/APIs-Integrations/Upload-emails-and-attachments/m-p/321951#M31003

Product Manager @ HubSpot
0 Upvotes