I have a connection to my organization’s mailbox. Using the MS Graph API, the response from the API returns the given message’s attachment (which originally is a .xlsx file) as content bytes. I use the following documentation: Get attachment - Microsoft Graph v1.0 | Microsoft Docs
Depending on the API call that I use, this either looks something like this:
Or like this:
I tried decoding it as base64, but I get an error that it contains non-base 64 characters, more than two padding characters or an illegal character among the padding characters. I would like to turn the result into a .xlsx file.
If you are reading the value from an annotation document, you should pay attention to the encoding settings while reading.
Specify an encoding while reading. The link below may help you.
I have found the solution that I was looking for. The API call needs to return the attachment in this format:
I need to put this result into a string and decode it based on Base64, explained below. This helps me convert and save it to a .xlsx file.
Convert Base64 string to Image - Help / Studio - UiPath Community Forum
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.