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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Stuck with a flow to r...
Power Automate
Unanswered

Stuck with a flow to read email content

(0) ShareShare
ReportReport
Posted on by 2

Hello

 

I am trying to read an email and populate a SP list.  My flow looks like this but the output from the filter array action seems to be correct as the body of the email is listed as an array with \n for each new line.

 

vDemarais_0-1715034320736.png

the expression for the last action is split(body('Filter_array')[15], '\n')[1] and there are well over 20 lines in the output text from the last action.  Please help me make sene of the error message.

 

thanks

 

Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @vDemarais The split() function requires a string (not an array) as the first parameter.

    creativeopinion_0-1715034966320.png

    The Filter Array action outputs an array. Can you provide more insights to your flow logic?

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

  • CU15011035-0 Profile Picture
    2 on at

    thanks for your help.

     

    Compose action: SplitIntoLines - 

    split(body('Html_to_text'), outputs('NewLine'))
     
    Filter array:
    vDemarais_0-1715035662727.png

    takes the output from SplitIntoLines action and keeps only lines with values

     

    the next Compose action is supposed to look say line 11 and return the values after \n.  A sample of the output text from the filter array is

    \n
    \nENVIRONMENT\n\nUPDATE WINDOW START
    \n
    \nUPDATE WINDOW END
    \n
    \nUAT UK
    \n
    \nThursday, April 18, 2024
    \n2:00 PM (14:00) GMT
    \n
    \nFriday, April 19, 2024\n4:00 AM (4:00) GMT

     
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @vDemarais You can't use the split() action on an array. If you want to return the 11th line from the array, you need to use the array index. The first item in an array is [0], second, is [1] etc.

     

    In your case, you will need to compose an expression. Start with

    ?[index key]

    creativeopinion_0-1715036149249.png

    Click on the dynamic content tab and press the up arrow key to go to the start of the expression. Insert the body dynamic content from the Filter Array action.

    creativeopinion_1-1715036204192.png

    Run a test. Tip: Remember to rename your actions to keep your flow organized!

     

    To learn more about the Filter Array action, check out this YT Tutorial: Are you using the Microsoft Power Automate Filter Array Action wrong?

     

    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.

     

    1️⃣ Cross-Referencing Data

    2️⃣ Filtering by Key

    3️⃣ Substring Matching

     

    Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.

     

    IN THIS VIDEO:

     3 Ways to Use the Filter Array Action

     How to use the Scope Action to Group Actions

     How to Check the Number of Items returned from a Filter Array Action

     How to Cross-Reference Data in Excel with a SharePoint List

     How the Filter Array Action Works

     How to Access the Dynamic Content from a Filter Array Action

     How to Filter Items by a Key

     How to Filter Items by Matching a Substring

     How to Use Multiple Conditions in a Filter Array Action

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Expiscornovus Profile Picture

Expiscornovus 199 Most Valuable Professional

#2
David_MA Profile Picture

David_MA 194 Super User 2025 Season 2

#3
harshdeol Profile Picture

harshdeol 167 Moderator

Last 30 days Overall leaderboard