web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Apply_to_each referenc...
Power Automate
Answered

Apply_to_each referenced by inputs in Compose action are not defined in the template

(0) ShareShare
ReportReport
Posted on by 29

Am creating a simple flow to populate an excel file with the details of people that have access to a PowerApp. I want their email address, their roleName and the createdOn date.

 

DaveMack_0-1707738808377.png

 

Above image shows the flow structure and it works fine for Email and roleName and the excel file is updated correctly, so the Compose and Compose 2 steps work okay.

However, because createdOn doesn't appear as an option in the Get App Role Assignments list, I tried using a dynamic expression for Compose 3:

 

 

items('Apply_to_each')?['properties/createdOn']

 

 

But saving throws this error:

 

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'Apply_to_each' referenced by 'inputs' in action 'Compose_3' are not defined in the template.'.'.

 

This is a copy of the first record of the JSON for the array so you can see the items:

 

DaveMack_1-1707739211997.png

 

So createdOn is there within the properties part, but for some reason I can't access it like I can others. I can even get the scope and the notifyShareTargetOption, but not the createdOn or createdBy.


Am I missing something here? Anyone explain how I can extract the createdOn date ?

 

Thanks

 

 

 

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @DaveMack 

     

    Correction, Ofcourse it is within the properties so like @ManishSolanki  mentioned use that. I clearly didn't looked into it. 😂

     

    items('Apply_to_each')?[properties]?['createdOn']

  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @DaveMack 

     

    Pls try this:

    items('Apply_to_each')?['properties']?['createdOn']

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • DaveMack Profile Picture
    29 on at

    Thanks but have tried below and get same error message

    items('Apply_to_each')?['properties']?['createdOn']

     

  • Verified answer
    DaveMack Profile Picture
    29 on at

    I'm an idiot !

     

    I overlooked the correct name of the Apply_to_each step. In my example it should have been:

     

    items('Apply_to_each_2')?['properties/createdOn'] 

    and not 

    items('Apply_to_each')?['properties/createdOn'] 

     

    Thanks for the help though 🙂

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard