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 / Create File action not...
Power Automate
Suggested Answer

Create File action not saving a PDF but a weird file name

(0) ShareShare
ReportReport
Posted on by 6
I am trying to run an automated cloud flow that monitors an email that has attachments and the subject or body matches key words. When there is a match I want the flow to create a pdf file in a specific sharepoint folder. The actions are executing but the file being saved is not the pdf. I am trying to make the flow rename the pdf.
I have the same question (0)
  • Suggested answer
    BCBuizer Profile Picture
    22,718 Super User 2026 Season 1 on at
     
    Can you please share what you have set for the FileName parameter in the Create File action? I suspect you missed to include the file extension in there.
     
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • J-Rod Profile Picture
    6 on at
     
    The file name currently uses this expression 
    concat('E&O app _',triggerOutputs()?['body/receivedDateTime'])
     
    I bet that I did.
  • David_MA Profile Picture
    14,614 Super User 2026 Season 1 on at
    Part of the "weird" filename, in addition to the concat() not including the file extension, is that you are using the created date raw as part of the filename. You could use the formatDateTime() expression to format it in a more user-friendly manner. Otherwise, it will be written in the ISO8601 format, which is what you are getting now. Here is information on using formatDateTime() Customize or format date and time values in a flow - Power Automate | Microsoft Learn
  • J-Rod Profile Picture
    6 on at
    @David_MA Thanks to that response I was able to get the file to show up as a pdf and with a better name! Thank you, but a different problem popped up.

    I only ran a test, but when I went to open the content of the file this is what I got
  • Suggested answer
    Srini007 Profile Picture
    3,471 Super User 2026 Season 1 on at
    Hi @J-Rod,
     
    Good, the file is created, but as far I see it is not opening because there is no extension, that's why it is showing that error, you can try  below expression and let us know if you able to resolve
     
    concat('E&O app _',triggerOutputs()?['body/receivedDateTime'],'.pdf')
     
    above expression will add .pdf to your file which is a valid extension to open
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Srini
  • BCBuizer Profile Picture
    22,718 Super User 2026 Season 1 on at
    Hi @J-Rod,
     
    Just to make sure: was the attachement to the email actually a pdf file? If not, some file conversion may be required.
     
    Also, can you please share the expression used in the filecontent parameter of the Create File action? If the file was a pdf indeed, this expression is the next thing to check.
     
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard