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
Flow.Run(
JSON(
Patch (
Form.Updates, {Test1: String_Variable1, Test2: String_Variable2}),
JSONFormat.IgnoreBinaryData & JSONFormat.IgnoreUnsupportedTypes
),
{file:{contentBytes: Attachment_File, name: Attachment_Name}}
);
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 can I make it work?
Thank you so much! I appreciate any help!

Report
All responses (
Answers (