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 / I made a flow to extra...
Power Automate
Unanswered

I made a flow to extract data to excel categories from email, but how do I make it say "no" when there is no text after the colon in a category. read on..

(0) ShareShare
ReportReport
Posted on by 38

Hello everyone, I really need some help here. I made a flow that takes each category in an email and adds the information that appears next to each colon for each category  into a spreadsheet. 

 

Current flow that parses all data is -

1. When a new Email Arrives (V3)

2. HTML to Text (Body is selected) 
3. Add a Row into Table (the result of how it's exported into spreadsheet is below under capture.

---------------

Here is what the email typically looks like (with this structure it populates everything correctly to include every category in structure below. Please read on.

Dear Class Recordings Approvers,


The following class recording has been requested:

Class: Test Test 
Faculty Member/Instructor: Jim Brown
Date and Time: 08-21-2023 14:58:27 EDT
Recording Type: Audio Only
Requestor: Johnny B.
Reason for Recording: Personal Emergency
Additional Information: Test test 


Now the above flow works to parse the data when every category has text next to it, but the only variation we have is when all that text is there EXCEPT the faculty member/instructor category sometimes that's left blank as seen below. 

 

that is because the person who put in the request did not include an instructor. Now with the normal flow setup if there is no name entered in that category after the colon in faculty member/instructor the flow fails. So how do i get it to show the instructor name when it is entered after the colon, and how do i get it to show nothing  or say "no" when it is NOT entered. i assume this involves using conditioning. thanks!!

Class: Test Test 
Faculty Member/Instructor: 
Date and Time: 08-21-2023 14:58:27 EDT
Recording Type: Audio Only
Requestor: Johnny B.
Reason for Recording: Personal Emergency
Additional Information: Test test 

Capture.PNG
Categories:
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @mystery-no ,

    I believe you are extracting each line and inserting them in excel. So, you can use an expression as below:

    if(empty(trim(last(split(outputs('Compose'),':')))),concat(outputs('Compose'),'NA'),outputs('Compose'))

     Where outputs('Compose') contains the line with the instructor name

     

    SudeepGhatakNZ_0-1692655001556.pngSudeepGhatakNZ_1-1692655047358.png

     

  • mystery-no Profile Picture
    38 on at
    • Hello, thanks so much for your reply. I just want to confirm, will this work to create a result that shows “NA” only when the faculty member/ other does NOT show text? Faculty Member/Instructor: 

    see sometimes that category comes in with no text next to the colon, meaning someone didn’t enter any text in. I need it to recognize it received no result and enter N/A into the spreadsheet. Please see the screen shot of my flow, and tell me how I can incorporate the correct code into my existing flow thanks. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard