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 Automate - Building Flows
Answered

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

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,600 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard