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.
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. "
}
}