cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kensley
Resolver I
Resolver I

File ID invalid when working with Get file content for OneDrive

I need help understanding why file id is invalid when we are working with the "Get file content" component in a flow, which in my case connects to OneDrive.  Here is my original setup...

 

kensley_0-1627566096935.png

 

The Id formula used in the File field is a custom expression....

 

 

items('Apply_to_each_to_loop_through_Photo_Cover_array')?['id']

 

 

When A user submits the original Microsoft Form which I created, and adds an attachment (the photo cover image), it all comes back to this flow.  The flow at the moment is throwing the following error...

 

But when I submit a form that invites the user to submit a photo, it connects back to this piece in my flow, but throws the following error...
 
kensley_0-1627507937203.png

 

My question...why is 1 or 2, or even 10 as the file id, invalid???

 

Many thanks on helping me understand this fully.

1 ACCEPTED SOLUTION

Accepted Solutions
kensley
Resolver I
Resolver I

Solve my issue by using a Compose process, to detect what the id value is of my array item like so...

 

 

items('Apply_to_each_to_loop_through_Photo_Cover_array')?['id']

 

 

... and assign that id value to the value for File:

 

 

View solution in original post

2 REPLIES 2
kensley
Resolver I
Resolver I

Within my flow component "Get file content from OneDrive for Photo Cover" is the main issue.  That value I have set for the File input is :

kensley_0-1627567135010.png

 

I have a feeling that value is incorrect, but not sure what to do next?  What should this File value be in theory? an ID value? a binary of the actual image attached? a path? 

 

Many thanks on helping me get closer to solving this!  

 

kensley
Resolver I
Resolver I

Solve my issue by using a Compose process, to detect what the id value is of my array item like so...

 

 

items('Apply_to_each_to_loop_through_Photo_Cover_array')?['id']

 

 

... and assign that id value to the value for File:

 

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,773)