I have tried to update my PowerApps flow to use the V2 trigger. I basically want the user to export records from the gallery and the flow uses File as the input. But I'm getting the following error when I run it.
ExportChangesToExcel.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.'."
}
}
Any idea what I'm doing wrong here?
My code is:
//Create a collection for the data export
ClearCollect(colExport, {});
ForAll(GalleryAllRequests.AllItems, Collect(colExport, {ChangeNo: ThisRecord.ChangeNo.Text, Title: ThisRecord.Title4.Text, Origator: ThisRecord.Originator.Text, ChangeOwner: ThisRecord.ChangeOwner.Text, DateRaised: DateValue(ThisRecord.DateRaised.Text), Status: ThisRecord.StatusBtn.Text}));
RemoveIf(colExport, IsBlank(Title));
Set(varFileLink, 'ExportChangesToExcel'.Run({file:{contentBytes: JSON(colExport,JSONFormat.IgnoreUnsupportedTypes), name:Concatenate(varEV.projectname, "-", Now())}}).filelink);
Launch(varFileLink);