Get full message body from email

As you can read in the documentation, there is a parameter include_body when requesting the mailMessages endpoint, but setting it to either 0 or 1 will return only a short snippet of the email body. What am I doing wrong?

Hey @severinsimmler
Welcome to the community :wave: & thanks for being patient

Do you notice any difference when you set it to 0 / 1? Ideally there should be.

Hi @Hem,

thank you very much for welcoming me and your response :blush:

There is in fact a difference: Setting it to 0 will result in a response without a body key. With 1 it does contain a body, but it’s not the full message body (as it says in the documentation), but the exact same as snippet (which both responses have). It’s only the first few characters of the email message body with ... at the end.

There is also a body_url key with a URL, but I get a 403 Access Denied when trying to access it.

Hey @severinsimmler

Can you help with a couple of things?

  • Do you see the entire message in the Pipedrive Mailbox UI ? For instance, you should be able to see the end of the message ideally

  • The CloudFront URL is generated with an expiry date and a key for temporary access. As long as you make a subsequent call with those params, you should be able to retrieve them. Can you confirm if you are able to access it before the expiry?

For one of the mail messages,

the expiry (obtained from the Expires parameter) is a a day

Thank you very much, @Hem! Turned out I was testing with a quite old email. Requesting a more recent one behaves just as described and the body_url works as well. Thanks again for your time and support :smiling_face_with_three_hearts:

1 Like

Hi @Hem,

Posting here too for better visibility

Hope its okay to jam in as I was/am facing similar issues.

First of all: Your workaround works - also for me.

Now I have another issue. The Body URL that is being generated expires in one day. This is very unfortunate as I need to be able to access this BODY URL for longer than just 24 hours.

Is there any way to achieve this?

Hey @Yannik_Sommer

I’ve answered it here