Hi
@spalkar1,
The existing Outlook connector for Graph doesn't include any options for pulling saving attachments from a received email. That's due to a couple issues including the fact that the Web API feature of Blue Prism doesn't support binary data. It's also an oversight on our part because this should have been added to the
Download Files asset for Graph. I'll get that updated ASAP.
In the meantime, here's the basic process.
- Each received message includes a property called hasAttachments. This is a boolean so true if there are attachments or false otherwise. Be aware that if the sender includes a picture as part of the signature, that picture will also be handled as an attachment.
- If you have an email where the hasAttachments flag is set, you want to get the unique ID of the email and then issue an HTTP GET request to /users/[ID]/messages/[Message ID]/attachments. This will return details about all of the attachments. The details of each attachment include information about the content-type of the attachment (ex. image/png).
- In some cases, you can find the binary data of the attachment under the property called contentBytes. In other cases, you'll want to get the unique ID of the attachment from its details and then issue another HTTP GET request to /users/[ID]/messages/[Message ID]/attachments/[Attachment ID]/$value.
Cheers,
Eric