I have a fairly basic workflow built from the "Save Office 365 email attachments to OneDrive for Business" template, modified to check for attachment name contains .csv
The flow executes successfully and the csv file produced has the correct filename but only contains a single value of "null" instead of the contents from the attachment
I've created similar flows in the past with no issue, and I tried recreating everything from scratch multiple times. Also tried triggering from a shared mailbox instead. All return the same value. Anyone know why this is happening and how I can create a file with the correct content?
Thanks in advance
Solved! Go to Solution.
Hello @Anonymous ,
try to convert the 'Attachments content' into binary encoding using the base64ToBinary(...) expression when creating the file, Power Automate has often problems with processing email attachments.
When building the expression with base64ToBinary(...) the 'Attachments content' dynamic content will probably be missing, but you can solve that by storing the 'Attachments content' in a 'Compose' action and then use the output from the 'Compose' in the expression.
Hi @Anonymous,
Just to validate. I assume the create file action is configured like this? It's using name and contentBytes fields from the Attachments array of the trigger action output?
triggerOutputs()?['body/attachments']
Can you also share a screenshot of the output of your create file action?
Hello there @Expiscornovus!
You are correct. My create file action is configured exactly as pictured. I have attached some screenshots of the file before and after processing, along with some test results that show the new 4byte filesize
Before:
After:
Hi @Anonymous,
Another question. Can you check the configuration of your trigger action.
Is the Include attachments by any chance set to No instead of Yes? If so, can you change that to Yes?
Hi @Anonymous,
Can you show the output of the trigger action of your last test?
Hello @Anonymous ,
try to convert the 'Attachments content' into binary encoding using the base64ToBinary(...) expression when creating the file, Power Automate has often problems with processing email attachments.
When building the expression with base64ToBinary(...) the 'Attachments content' dynamic content will probably be missing, but you can solve that by storing the 'Attachments content' in a 'Compose' action and then use the output from the 'Compose' in the expression.
Thank you both for the assistance! I'm marking @tom_riha post as my solution. I'm not sure why the original configuration stopped working, but using the base64toBinary expression has restored functionality to my flow. Thank you much!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
29 | |
28 | |
26 | |
25 | |
23 |
User | Count |
---|---|
63 | |
52 | |
44 | |
34 | |
30 |