Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_3')?['id']' is of type 'Integer'. The result must be a valid array.

(0) ShareShare
ReportReport
Posted on by

Hello, I am getting list of all job posting from a site.

 

For Each ID, I am trying to add that to SharePoint List.

 

But I am getting this error as  '@items('Apply_to_each_3')?['id']' is of type 'Integer'. The result must be a valid array.

 

How to resolve this ?

 

  • v-LilyW-msft Profile Picture
    on at
    Re: The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_3')?['id']' is of type 'Integer'. The result must be a valid array.

    Hi @Anonymous 

    Thanks for your posting here and sharing the solution in the forum as it would be helpful to anyone who encounters similar issues. Please consider Accept your answer as the solution to help the other members find it more quickly!

    Best Regards.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_3')?['id']' is of type 'Integer'. The result must be a valid array.

    Hey, Thank you for responding though.

     

    I figured out the solution for this. Just had to add compose to check that into array.

     

    KarthikMahendra_1-1635434414553.png

     

     

     

     

  • eliotcole Profile Picture
    4,260 Super User 2025 Season 1 on at
    Re: The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_3')?['id']' is of type 'Integer'. The result must be a valid array.

    I can't be immediately sure, but I suspect that there's no need to run embedded/double Apply to each loops, and possibly no need for them at all.

     

    You might be better served with an initial filter and/or select action, *then* perhaps an Apply to each loop to add each item.

     

    One request, if you don't mind, @Anonymous ... If possible, could you edit into your question a code sample of what the initial List Jobs call responds with? Just make sure to obfuscate/block out any sensitive data, for example replace URLs with something like startpage dot com. 👍

     

    If that data is something I can grab myself, just lemme know the connector and I'll pull some sample data.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1