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 / Unable to process temp...
Power Automate
Suggested Answer

Unable to process template language expressions in action 'Add_a_row_into_a_table'

(0) ShareShare
ReportReport
Posted on by 3
 

Below is an example of the error I’m receiving. Out of the last 10 automatic runs, 3 were successful and the remaining 7 failed—no changes were made in between. I reviewed all the HTML-to-text output for both failed and successful runs, but I cannot identify anything that could be causing the error or missing content. I would appreciate any help with this.

 
Action 'Add_a_row_into_a_table' failed: Unable to process template language expressions in action 'Add_a_row_into_a_table' inputs at line '0' and column '0': 'The template language expression 'trim(split(split(body('Html_to_text'), 'Document Name')[1],'Form Number')[0])' cannot be evaluated because array index '1' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'.
 
 
Flow:
'trim(split(split(body('Html_to_text'), 'Document Name')[1],'Form Number')[0])'
 
Categories:
I have the same question (0)
  • Suggested answer
    rzaneti Profile Picture
    4,491 Super User 2026 Season 1 on at
     
    Based on the error message, Power Automate could not access the second element of the array generated by the inner split. It usually happens when the text doesn't contain the string used as separator ("Document Name", in your case). 
     
    My recommendation is to add a Compose before the Add a row into a table action containing only the split(body('Html_to_text'), 'Document Name') expression, so you can clearly spot any email bodies without the "Document Name" keyword. 
     
    If you are expecting emails that may or may not contain the "Document Name" keyword, I recommend you to handle this logic with an IF function within your expression:
     
    if(
      contains(body('Html_to_text'), 'Document Name'),
      trim(split(split(body('Html_to_text'), 'Document Name')[1],'Form Number')[0]),
      trim(split(body('Html_to_text'),'Form Number')[0])
    )
     
    The logic highlighted in yellow above is splitting your text by "Form Number" only for the cases where there's no "Document Name" in the email body - it may require some changes to fit your use case.
     
    I'm also sharing some blogs that I wrote about the topics discussed here, which can be helpful for you or for other users that eventually find this thread in the future:
    - Data extraction from email to Excel with Power Automate: https://digitalmill.net/2023/11/02/data-extraction-from-email-to-excel-with-power-automate/
    - Video: Automate data extraction from email to Excel with Power Automate: https://youtu.be/RIaAi6Cmevw
     
     
    Let me know if it works for you or if you need any additional help!
     
    If this solved your issue, please mark it as Accepted Answer.
    👍 If it helped, feel free to give it a like!

    🌐 Explore more Power Platform content on my Website or on my ▶️ YouTube
    💼 Find me on LinkedIn
     
     
  • BD-04112047-0 Profile Picture
    3 on at
    Thank you, @rzaneti, for spending your time to look into this for me. I really appreciate your help. 
     
    I checked all the failed & successful run's html-to-text output and the "Document Name" does exist in all of them that's why I'm unable to pin down the issue. Please see the example below (first section is the output at html-to-text step for the failed run). Is this helpful for you? 
     
    I'm trying to extract the following from this correspondence: Claim Number, Creator, Document Name, Form Number, Rejection Message, link. I'm using similar functions to capture all these values as document name. 
    Example function to capture claim number: 
    trim(split(split(outputs('Html_to_text')?['body'],'Claim Number')[1],'Creator')[0])

  • Suggested answer
    rzaneti Profile Picture
    4,491 Super User 2026 Season 1 on at
     
    Thank you for the images: it brought some additional context! It looks like you actually have a "Document [line break] Name", which is why your expression was failing. 
     
    Here is your fixed expression: trim(split(split(body('Html_to_text'), concat('Document', decodeUriComponent('%0A'), 'Name'))[1],'Form Number')[0])
     
    The relevant change is highlighted in yellow. We're basically using the decodeUriComponent to generate a line break between Document and Name, and then concatenating these 3 values to use it as separator. 
     
    Here is an example of email body that I used for testing it:
     
     
     
    And here are the outputs of my Compose, where I used the expression above:
     
    Let me know if it works for you or if you need any additional help!
     
    If this solved your issue, please mark it as Accepted Answer.
    👍 If it helped, feel free to give it a like!

    🌐 Explore more Power Platform content on my Website or on my ▶️ YouTube
    💼 Find me on LinkedIn

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 957

#2
Valantis Profile Picture

Valantis 847

#3
Haque Profile Picture

Haque 609

Last 30 days Overall leaderboard