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 / Extracted Excel Data T...
Power Automate
Answered

Extracted Excel Data To Attach In Email

(0) ShareShare
ReportReport
Posted on by 13

I've successfully set up a process where I receive around 10 to 15 emails daily, each containing an Excel attachment. My initial action is to save these attachments onto OneDrive, a step that is facilitated by the "When a File is Created" trigger.

Subsequently, I proceed to structure the data by creating a table within the Excel file. The columns of interest to me are "level1status" and "level2status". Both of these columns contain entries that could be either "success" or "failure".

Here's where the additional step comes into play: I want to introduce a scenario where if a "failure" is identified in either the "level1status" or "level2status" columns, an immediate email notification is triggered. This email should contain the exact Excel file as an attachment, allowing for a swift and efficient examination of the issue at hand.

Mhdirbaz_0-1691987556916.pngMhdirbaz_1-1691987604122.pngMhdirbaz_2-1691987725626.png

 

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @Mhdirbaz 

     

    I can see filter array action before apply to each action, could you pls share the screenshot of that action or tell me the intent of that action. This will help in finding the accurate solution.

     

    Thanks

  • Mhdirbaz Profile Picture
    13 on at

    Hi @ManishSolanki ,
    Screenshot for your reference 

    Mhdirbaz_0-1691990154190.png

     

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @Mhdirbaz 

     

    As per my understanding, you are looking for "failure" status in multiple columns and if found you want to send an email with newly created one drive file as an attachment. If that is true, then pls make the following changes in your flows:

    ManishSolanki_0-1691992039750.png

    here I have filtered out records with failure value from 2 columns 'level1status' & 'level2status':

    @or(equals(item()?['level1status'], 'failure'),equals(item()?['level2status'], 'failure'))

     

    Next, we will check the length of filter array using length() function. We need to write an expression to execute the length function, the expression needs to be entered in expression box:

    ManishSolanki_1-1691992319680.png

    Expression used to check the length:

    length(body('Filter_array'))

     

    If filter array returns some records or has some failure records, then we need to add "Send an email" action inside "Yes" section or box. The details of email attachment come from the output of one drive action (When a file is created):

    ManishSolanki_2-1691992601127.png

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

     

  • Mhdirbaz Profile Picture
    13 on at

    Hi @ManishSolanki 
    I am grateful for your assistance, Your input has been tremendously helpful in refining my workflow.
    Thankyou

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard