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 rename and u...
Power Automate
Unanswered

Unable to rename and upload the file on sharepoint document library

(0) ShareShare
ReportReport
Posted on by 248
hi - i have to save the file on the sharepoint document library and i want when this gets uploaded then it should add the value from power app Label.
Here is my flow - 
 
Power Apps (V2) - Input Type - Text, FileName > Input Type - Text, RegionName  > Input Type - File,  FileContent
Compose action > Expression > 
concat(
    substring(triggerBody()?['FileName'], 0, sub(length(triggerBody()?['FileName']), add(length(last(split(triggerBody()?['FileName'], '.'))), 1))),
    formatDateTime(utcNow(), 'dd-MM-yy_HH_mm'),
    '_',
    triggerBody()?['RegionName'],
    '.',
    last(split(triggerBody()?['FileName'], '.'))
)
Create file (sharepoint) Action -  Site address selected as actual , Folder path select as actual , File name Outputs from compose action , file content as triggerBody()?['FileContent']?['contentBytes']
 
Respond to a Power App or flow - Input type as Text named as File uploaded and Outputs from compose action
 
this is the formula i have applied on Power Button onselect property 
newupload.Run(
    First(attach.Attachments).Name,          // FileName (Text)
    Label1.Text,                             // RegionName (Text)
    First(attach.Attachments)                // FileContent (File)
)
however while running getting this error 
newupload.Run failed: {
  "error": {
    "code": "TriggerInputSchemaMismatch",
    "message": "The input body for trigger 'manual' of type 'Request' did not match its schema definition. The input body is missing required schema properties. "
  }
}
 
Categories:
I have the same question (0)
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    Your flow looks good for me.
    I doubt the power app side, do you use any function for your attachment ?
    you can try to test the flow only ( better to open it and test it in power automate portal).
    then you will know which part has problem.
  • aayaanmayank Profile Picture
    248 on at
    hi i have tried in Stand alone in power platform then getting the error in compose Action 'Compose' failed: Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'length' expects its parameter to be an array or a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#length for usage details.'.
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    I see, you didn't specify value one of them which use null as default, and you get error.
    try to give it values for you FileName, RegionName  , and upload a file at the same time.
     

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard