Services Plugins FAQs

Gmail Small Business - Message Payload Content Missing

I’m not seeing the option to retrieve message content using the API. I’m able to retreive the a message’s size and a snippet (short preview), but I can’t seem to get the entire content of a message.

From my end, it looks like it could be missing from the Plugin’s API template. I’ve perused the expression editor for the API response and I just don’t see it :slight_smile:

Still investigating myself, but I’m wondering if this may help :wink:

Messages API Documentation
https://developers.google.com/gmail/api/reference/rest/v1/users.messages#Message.MessagePart

MessagePartBody Object Documentation

https://developers.google.com/gmail/api/reference/rest/v1/users.messages.attachments#MessagePartBody

Thanks in advance

Ok, so I’m going to (partly) answer my own question here. So the Messages api does return an individual message’s content as a list of base64 strings called parts. Each part contains mimeType text and body data for whatever is in the message–rich text, attached images, files, etc

However, the API also seems to return a mimeType multipart/alternative. This is when messages have mixed text and embeded images in line. In this case, when multipart/alternative is used, the body b64 text is empty and the documentation seems to suggest that the recursive parts object is full of additional data for this mime type.

You can use the base64 plugin from Zeroqode to decode the base64 returned by this plugins, but if the plugin template doesn’t support additional nested layers for data on these more complex messages, then it doesn’t much matter.

By including a 2nd layer of parts array into gmail api response template for this plugin, would allow for some way to dig into multipart/alternative messages. Right now the body for multipart/alternative message is empty the missing data being under the parts array.

From the google documentation about parts
https://developers.google.com/gmail/api/reference/rest/v1/users.messages#Message

The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/* . For non- container MIME message part types, such as text/plain , this field is empty. For more information, see RFC 1521.

If anyone knows a solution to reading message text into bubble

Hi @jon1, thanks for reaching out.
Allow us to analyze it and check on our side for possible issue.
We will come back in due course.

Thank you for understanding and have a nice weekend!

Regards,

Hi @jon1, thanks for your patience.
We’ve checked the plugin functionality on our end and it works well. The plugin is developed to work in accordance with the Google API documentation. https://developers.google.com/gmail/api/reference/rest/v1/users.messages.attachments/get

Allow me to recommend checking if the plugin setup is done right.
For that, you can use the plugin demo page as a reference: https://bubble.io/page?id=zeroqode-demo-16&name=gmail&tab=tabs-1

In case the issue will persist, please provide more details, namely:

  • screenshots and/or screencasts of your setup - workflows, plugin settings (for the screencast recording, let me please suggest using the Loom tool).

  • screenshots and/or screencast of the issue you have (debugger, browser console, etc);

Also, in order to check what’s wrong with your setup and test it out in your workspace, would it be convenient for you to add our support@zeroqode.com as a collaborator of your app?

Enter your Bubble editor page -> Settings -> “Collaboration” tab -> Invite a user (email).

(Note: you can add our support account to the collaborators list even if your app is on a Free/Hobby plan.)

I will check your setup and do a few tests in an attempt to find the root cause and help you fix it.

In case it is ok for you, please let me know.

Regards,