cancel
Showing results for 
Search instead for 
Did you mean: 

Outlook Flow COndition Based on Attachment Contents

It would be a great feature to have the ability to search the contents of a .txt attachment for a string and perform an action based on specified values within the attachment.

 

For example, a .txt document is emailed to a distribution list every hour with results of a data load. The word 'ERROR' is present if the data load fails. However, because the word 'ERROR' is within the body of the attachment, it cannot be filtered using current Outlook Rules. My request is that Flow be able to move this email to a specified folder in Outlook when the word 'ERROR' is present in the .txt document.

Status: New
Comments
Level: Power Up

I know this is old, but I managed to do this using expresion:

Where outputs('AttachmentContent') is the result of a compose using the AttachmentContent.

I then used:  base64ToString(outputs('AttachmentContent'))

This then gave me the actual text (converted from base64encoding) of the txt file that I coudl then use.

You can then create a new compose and use:

IndexOf(base64ToString(outputs('AttachmentContent')),'ERROR')

 

if that is greater than 0 then the text file contains the word.

Level: Power Up

Could you expand on this abit @moonman ? maybe some Screenshots? thanks