Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Extract Outlook table data in excel table

(0) ShareShare
ReportReport
Posted on by 9

Hello everyone.

 

I need one help in extracting data from outlook. i manage to extract all data from outlook but i stuck at place. I am not able to understand how to extract data which have no specific end character. i need help in extracting last column data pls someone help me.

I am using function like: 

1. When a new email arrives

2. HTML to text

3. add a row into a table

 

My data is like

 

Region : South

trim(first(split(last(split(body('Html_to_text'),'Region:')),'Branch')))

Branch Name: 445

trim(first(split(last(split(body('Html_to_text'),'Branch Name:')),'Branch Code:')))

RM Name: Rohit Nair

trim(first(split(last(split(body('Html_to_text'),'RM/BSSM Name:')),'RM ID:')))

 

PS ID: 2003272 

KamleshKadu_0-1701232429664.png

 

Please help in getting ps id number. 

 

Thank you

  • KamleshKadu Profile Picture
    9 on at
    Re: Extract Outlook table data in excel table

    KamleshKadu_0-1701321850378.png

    KamleshKadu_1-1701321974806.png

     

    I need expression which i can add in ps id column.

     

     

  • KamleshKadu Profile Picture
    9 on at
    Re: Extract Outlook table data in excel table

    Hello, I am new in power automate. can you please help me with this. project stuck on that part only.

  • v-yetonggu-msft Profile Picture
    on at
    Re: Extract Outlook table data in excel table

    Hi @KamleshKadu ,

    When you finished writing the formula, did you click the update button?

    Please check the formula of your ‘PS ID’ column.

     

    Best Regards,

    Sunshine Gu

  • KamleshKadu Profile Picture
    9 on at
    Re: Extract Outlook table data in excel table

    I am not able to add data in excel

    KamleshKadu_0-1701247633535.png

     

  • v-yetonggu-msft Profile Picture
    on at
    Re: Extract Outlook table data in excel table

    Hi @KamleshKadu ,

    Because there are many newlines, an error will occur when you use decodeUriComponent('%0A') to locate, so you'd better find a special and fixed index field.

    You can also try this:

    vyetonggumsft_1-1701244432710.png

    trim(split(split(outputs('Html_to_text')?['body'],'*')[0],'PS ID: ')[1])

     

    Best Regards,

    Sunshine Gu

  • v-yetonggu-msft Profile Picture
    on at
    Re: Extract Outlook table data in excel table

    Hi @KamleshKadu ,

    Is your PS ID number a fixed length?

    If so, please try this expression:

    vyetonggumsft_0-1701241629968.png

     

    substring(split(outputs('Html_to_text')?['body'],'PS ID: ')[1],0,7)

     

     

    Best Regards,

    Sunshine Gu

  • KamleshKadu Profile Picture
    9 on at
    Re: Extract Outlook table data in excel table

    You have add HI in text but that is body text and that wont fix i need ps id and its number after that number there will be blank or other text. and request you to pls suggest expression 

     

  • v-yetonggu-msft Profile Picture
    on at
    Re: Extract Outlook table data in excel table

    Hi @KamleshKadu ,

    Please try this expression:

    vyetonggumsft_1-1701234853066.png

    trim(split(split(body('Html_to_text'),'HI')[0],'PS ID:')[1])

     

    Best Regards,

    Sunshine Gu

     

     

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 66,004 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow