Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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. 

  • Verified answer
    v-LilyW-msft Profile Picture
    on at
    Re: Textfunctions or substring- what am I doing wrong?

    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow