Hi folks,
I'm creating a Photo Uploading Power App to allow my team to easily search for a project, select it and then add 1 or more photos to an attachment control. They would then hit submit and the Power App will trigger a Flow that will create the files in a specific folder in a SharePoint document library.
When they search for the project and select the project folder, this then gives me the basis for the folder path. Each project folder follows an identical structure, so once the app knows which project they are selecting, it knows the path to save the photos to.
I have created a global variable to store the folder path: varUploadPhotoPath
Now onto the problem. I cannot seem to pass this variable through to Power Automate no matter what I try. I have tested the flow manually, providing it with the image and the folder path string and it works. But when I try to test it by triggering the flow through Power Apps, it won't even trigger the flow, instead throwing the following error:
UploadFileToDocumentLibrary.Run failed: {"error":{"code": "TriggerInputSchemaMisMatch", "message": "The input body for the trigger 'manual' of type 'Request' did not match its schema definition. Error details: 'Required properties are missing from object: text.'."}}
Here is the code triggering the flow:
ForAll(
attachPhotos_1.Attachments As Photo,
UploadFileToDocumentLibrary.Run(
{
contentBytes: Photo.Value, // This is for the File Content input
name: Photo.Name, // This is for the file name (file.name)
varUploadPhotoPath // This is for the Folder Path input (Text input)
)
);
Here is the Flow itself:
This is heavily based on Matthew Devaney's post: https://www.matthewdevaney.com/power-apps-easiest-way-to-upload-files-to-a-sharepoint-document-libra...
Any tips or pointers would be much appreciated!


Report
All responses (
Answers (