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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to set "File Name"...
Power Automate
Unanswered

How to set "File Name" property on "Create File" SharePoint action dynamically

(0) ShareShare
ReportReport
Posted on by

Hello,

I have created a flow with a CDS trigger When a record is selected. In this trigger I have a user input of type File. Below the trigger I have a SharePoint action to Create File.

 

I need to set the File Name property of Create File action to the file name of the file that user would select. I tried Dynamic Content pane but no luck.  Can we have any workaround to get this done?

 

Flow to upload SharePoint document.jpg

Categories:
I have the same question (0)
  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at
    Re: How to set "File Name" property on "Create File" SharePoint action dynamically

    HI @KAL 

     

    To get the file name you can add a text input and ask user to add file name. 

    here is an example:

    CDS.png

     

    -----------------------------------------------------------------------------------

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

  • Verified answer
    abm abm Profile Picture
    32,856 Most Valuable Professional on at
    Re: How to set "File Name" property on "Create File" SharePoint action dynamically

    Hi @KAL 

     

    You can get the filename using the below expression

    triggerBody()['file']['name']
     
    For the file content you need the following
    triggerBody()['file']['contentBytes']

     

    image.png

     

    Here is my run result

     

    image.png

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard