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 / Textfunctions or subst...
Power Automate
Answered

Textfunctions or substring- what am I doing wrong?

(0) ShareShare
ReportReport
Posted on by

I have tried to use both textfunctions and substrings in my flow and I keep getting close but no actual solution. I receive a ton of emails that I need to keep track of what is included in the body of the message.  The emails come mainly like this: 

Line 1: column1

Line 2: column2

Line 3: column3

Line 4: column4

 

I tried substring- and got half the information. I tried textfunctions and still can't narrow it down to the right data.  The "line 1:" will always be the same (they are using a template) but the column1 data changes based on what is written. 

Amrutledge_0-1623161199393.png

Am I missing something? I have looked at multiple sites and I can't seem to get it narrowed down right. 

Categories:
I have the same question (0)
  • Verified answer
    v-LilyW-msft Profile Picture
    Microsoft Employee on at

    Hi @Amrutledge 

    Thank you for your posting.

    Do you want to get the data behind 'Line1-4"? If misunderstanding, please kindly let me know.

    I create a Flow to get the data behind Line1-4 and then add the data to an excel.

    You can refer to as below screenshots:

    v-LilyW-msft_0-1623231804286.png

    Expression:last(split(outputs('Compose'),'Line 1: '))

    v-LilyW-msft_1-1623231804290.png

    Expression:first(split(outputs('Compose_2'),' Line 2:'))

    v-LilyW-msft_2-1623231804292.png

    Expression:last(split(outputs('Compose'),'Line 2: '))

    v-LilyW-msft_3-1623231804302.png

    Expression:first(split(outputs('Compose_3'),' Line 3:'))

    v-LilyW-msft_4-1623231804303.png

    Expression:last(split(outputs('Compose'),'Line 3: '))

    v-LilyW-msft_5-1623231804304.png

    Expression:first(split(outputs('Compose_4'),' Line 4:'))

    v-LilyW-msft_6-1623231804304.png

    Expression:last(split(outputs('Compose'),'Line 4: '))

    v-LilyW-msft_7-1623231804305.png

    v-LilyW-msft_8-1623231804310.png

    When receive an email as below:

    v-LilyW-msft_9-1623231804311.png

    The new row will be added to the Excel:

    v-LilyW-msft_10-1623231804313.png

    For more info about these functions you can refer to:

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

    Hope the content above may help you.

    Best Regards

    Lily

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard