Skip to main content

Notifications

Power Apps - Error Handling
Suggested answer

Error running flow from Power Apps

Posted on 26 Nov 2024 16:26:24 by 148
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);
  • Suggested answer
    Pstork1 Profile Picture
    Pstork1 63,797 on 26 Nov 2024 at 16:40:08
    Error running flow from Power Apps
    You can't pass a dynamic JSON collection as a file object. Instead you should be passing it as a string and then run a ParseJSON action on that string in the flow to unpack the collection and turn it back into a typed array.

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.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,129

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,797

Leaderboard

Featured topics