Hi,
I would like to save files from mails based on their content. If I do not apply any confitions, it is ok. But I added condition
"if content contains ABC" - "save it to folder A" else "save it to B" and this does not work. I tried .txt., .csv, .xls and without success.
Do you have any idea?
Thank you, Vašek
Solved! Go to Solution.
Hi @VTobiska,
Could you please share a screenshot of your flow's configuration?
Do you want to save files from emails based on the content of the attachment files or the content of the email?
If you want to save files from emails based on the content of the attachment files (DOCX file, CSV file, Excel file, etc.), I afraid that there is no way to achieve your needs in Microsoft Flow currently. But if the attchment files is a .txt file, you could take a try with the following workaround:
@contains(base64ToString(items('Apply_to_each')?['ContentBytes']), 'ABC')
Within "If/yes" branch of Condition, add a "Create file" action, Folder Path set to Directory A. Within "If/no" branch of Condition, add a "Create file 2", Folder Path set to Directory B.
Note: I assume that you save the attachment files into the folder of OneDrive for Business.
Image reference:
The flow works successfully as below:
If you want to save files from emails based on the content of the email, please take a try with the following workaround:
Best regards,
Kris
Hi @VTobiska,
Could you please share a screenshot of your flow's configuration?
Do you want to save files from emails based on the content of the attachment files or the content of the email?
If you want to save files from emails based on the content of the attachment files (DOCX file, CSV file, Excel file, etc.), I afraid that there is no way to achieve your needs in Microsoft Flow currently. But if the attchment files is a .txt file, you could take a try with the following workaround:
@contains(base64ToString(items('Apply_to_each')?['ContentBytes']), 'ABC')
Within "If/yes" branch of Condition, add a "Create file" action, Folder Path set to Directory A. Within "If/no" branch of Condition, add a "Create file 2", Folder Path set to Directory B.
Note: I assume that you save the attachment files into the folder of OneDrive for Business.
Image reference:
The flow works successfully as below:
If you want to save files from emails based on the content of the email, please take a try with the following workaround:
Best regards,
Kris
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
User | Count |
---|---|
75 | |
20 | |
17 | |
14 | |
13 |
User | Count |
---|---|
127 | |
35 | |
31 | |
28 | |
25 |