@Bowles, Mickey Thanks for reaching out. You should make GET call /users/{id | userPrincipalName}/messages/{id}/attachments/{id}
removing the $value so you can get the contentType, name of the file and other details if needed.
Now you can leverage the Parse JSON action to tokenize your output so you can further use it in your workflow. You can leverage the below schema for your Parse JSON action or leverage the Use sample payload to generate the schema
and provide the sample output to generate the schema.
{
"properties": {
"@@odata.context": {
"type": "string"
},
"@@odata.mediaContentType": {
"type": "string"
},
"@@odata.type": {
"type": "string"
},
"contentBytes": {
"type": "string"
},
"contentId": {},
"contentLocation": {},
"contentType": {
"type": "string"
},
"id": {
"type": "string"
},
"isInline": {
"type": "boolean"
},
"lastModifiedDateTime": {
"type": "string"
},
"name": {
"type": "string"
},
"size": {
"type": "integer"
}
},
"type": "object"
}
Once you have the tokenized value you can leverage the Create Blob (v2) action and pass the blob name, blob content (convert it to base64ToBinary) along with the content type
base64ToBinary(body('Parse_JSON')?['contentBytes'])
With the above flow it will save any file format along with the filename and content. Feel free to get back to me if you need any assistance.