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 Automate
Unanswered

Inconsistency?

(0) ShareShare
ReportReport
Posted on by 2

I get the below message on one of my flows where it goes and updates a system from another system. The weird thing is that the flow seems to fail with this error inconsistently. I have verified that the data the flow needs is there. There are times when it will fail with this message after having succeeded just a minute before with another record. I realize there could be some difference in the records but I checked the results and it has the 1 piece of data it needs to perform the update. I am at a loss as to how to even troubleshoot this .

 

InvalidTemplate. Unable to process template language expressions in action 'Update_Samsara_Branch_Code' inputs at line '0' and column '0': 'The template language expression 'first(body('Parse_Tags')?['id'])' cannot be evaluated because property 'id' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.

 

The below is the step that fails. What it does is take a list of codes that have unique ID's assigned and filters the codes to the value needed to provide the ID data to update the other system.

 

As you can see there are several different ID's and Codes in the input that this step filters. In this case it looked for code 004 and as you can see from the output, Code 004 was returned with ID 2938892. 

Mharper1970_0-1659537465356.png

 

 

The next step does a patch back to the target system - 

Mharper1970_1-1659537760709.png

 

This is where the error occurs, but makes no sense since other records have completed just fine. I have to use the "FIRST" statement because Power Automate isn't smart enough to realize there is only one record and if I don't use that statement it automatically does another Apply to each which isn't necessary and causes longer runtime and resources. 

 

here is the full statement for the patch 

first(body('Parse_Tags')?['id'])
 
I know someone will probably say, create a variable and reconcile the ID in the variable and use the variable to patch the other system. I can try that, but would like to know why this is failing. 
 
Any help is appreciated - while powerautomate is decent, it's not very intuitive or helpful with errors.

 

Categories:
  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @Mharper1970  the expression  first(body('Parse_Tags')?['id']), should it be using body('Parse_Tags') or body('Filter_tags')

  • Mharper1970 Profile Picture
    2 on at

    Anna THANK YOU!! That apparently was the issue although I don’t know why it would work sometimes and not others. But it doesn’t matter.

     

    appreciate another set of eyes on this, not sure I would have seen it because the flow has so many steps.

     

    thank you again!!

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @Mharper1970  if you think my answer helped you, it would be helpful mark it as solution 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard