I am struggling with a feature to implement an Optional! file upload as part of submitting form content from Power Apps to Power Automate using the Flow.Run() function.
The PowerAutomate Flow is set up to get a required text input and an optional file input. I am calling the flow with
Submitting form content like this works well, when a file is attached. If not it yields the error: FlowName.Run failed: { "error': { "code": "TriggerInputSchemaMismatch", "message": "The input body for trigger manual' of type 'Request' did not match its schema definition. Error details: 'Invalid type. Expected String but got Null.,Error details: 'Invalid type. Expected String but got Null.'.
How exactly are you sending it though when you have no attachment.
That code above should fail if you use it and there is no attachment. If you want it to be optional, then you have to NOT pass anything, not pass the json with blanks essentially.
So I would have an If to check if you have an attachment, if so use that code, if not just pass the things that are required
Was this reply helpful?YesNo
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.