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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,258)