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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to create file ...
Power Automate
Unanswered

Unable to create file in SharePoint using an attachment from an Outlook email.

(0) ShareShare
ReportReport
Posted on by 18

I am creating this topic after none of the similar topics' solution worked for me.

 

I receive an email daily on Outlook that I want to save to save on SharePoint. 

The flow is as follows:

Create file.PNG

And the error received is below.

Prompt.PNG

I am using a new email arrives (V3) because I am told (V2) is not suitable for this kind of flow. What can I do differently to get this flow to save the file correctly?

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

    Hi @sshet,


    You not really need that Compose action. You can use the Attachment Name and Attachment Content directly in the Create File action.


    Below is an example

     

    attachmentnamecontent.png

     

     

     

  • sshet Profile Picture
    18 on at

    Hello @Expiscornovus ,

     

    Thank you for responding! I need the file name to be the Subject of the email. Cannot use attachment name because the attachment name changes daily, I need yesterday's created file (in SharePoint) to be overwritten by today's file. 

     

    I have tried using Attachment Content as File Content. But it wasn't working. That's when I found the alternate way of using Compose here: Solved: Re: Create File Corrupting - Power Platform Community (microsoft.com) I found this blog: {FIX} Corrupt or Bad File When Trying to Open a File That Was Saved to SharePoint Using Power Automate – Ellis Karim's Blog

  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @sshet,

     

    In that case try the below expression for the File Name (that should replace the current name by the subject).

    concat(triggerOutputs()?['body/subject'], '.', last(split(items('Apply_to_each')?['name'], '.')))

     

    subject_concat.png

     

    In my test I saw that when I used the Automatically testing option with attachments, in the subsequent runs the file content got encoded (for some strange reason).

     

    So, please test this flow manually. In other words, send a new e-mail again with new attachments, after you changed your flow. Don't reuse the earlier send e-mail. 😁

  • sshet Profile Picture
    18 on at

    This did it for me. Thank you so much! @Expiscornovus 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard