web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Issue saving email att...
Power Automate
Answered

Issue saving email attachment to Onedrive

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,869 Most Valuable Professional on at

    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']

     

    createfileattachments.png

     

    Can you also share a screenshot of the output of your create file action?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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:

    Capture2.PNG

     

    Capture4.PNG

    After: 

    Capture3.PNG

  • Expiscornovus Profile Picture
    33,869 Most Valuable Professional on at

    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?

    includeattachments_yes.png

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey @Expiscornovus 

     

    I checked and it was set to No. Changed to Yes but same result

  • Expiscornovus Profile Picture
    33,869 Most Valuable Professional on at

    Hi @Anonymous,

     

    Can you show the output of the trigger action of your last test?

  • Verified answer
    tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    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.

    image.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

     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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 450

#2
Haque Profile Picture

Haque 366

#3
Valantis Profile Picture

Valantis 349

Last 30 days Overall leaderboard