Anybody know how to decode a raw body e-mail from Gmail api to FileMaker? I have success to read an e-mail from Gmail API but no idea to decode the body of the message.
Thanks in advanced.
Which format parameter are you using?
Maybe you are using Raw. This is base64url encoded. It is different than regular base64 encoding.
You can research the differences and script the decode.
You can use a plugin. Base elements has BE_Base64_URL_Encode ( data )
There seem to be some JS libraries that do this as well so maybe a webviewer to process the decode.
Maybe an online decode API?
thank you for your suggestion.
I did use insert from url with the format below.
"https://www.googleapis.com/gmail/v1/users/" & Substitute ( gmail API::email;"@";"%40" )& "/messages/"&gmail API::message_id&"?format=raw&?key=" & gmail API::api_key
Yes, I am using raw
(SimplyCalc) base64 / base64url decoder
This site provided decoding online.
They give you the JS source so you can use that inside FM.
I am a newbie on JS. Could you please guide me how to use it inside FM?
I have copy and paste to webviewer inside
but got only a blank screen
It's a little more than that. You need some HTML as well. Looking at the source code for the web page may help.
jbrown has a very useful example file with a few JS integrations that can guide you. You can find the file and other materials at the following link to his DevCon 2017 presentation.
ADV004 - Web Viewer Integrations - Jeremy Brown
Here's the video as well.
Web Viewer Integrations (Advanced Track 004) - YouTube
Retrieving data ...