Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Help me please!

(0) ShareShare
ReportReport
Posted on by 13

Hello everyone!

I am new user of Power Automate and I really need your help. 

Every day I get a lot of Excel files. File name structure is "Validation result  Company Error Date.xlsx"

I have a distribution list for each customer and each type of error

Customer                Error               Email

Customer101email1
Customer2Big Orderemail2
Customer3C01email3
Customer4C10email4
Customer5no errorsemail5
Customer6Q-ty erroremail6

 

I have to send many emails depending on the name of the customer and the type of error
Letters with error type "01", "no errors" - must contain a link to the file (stored on the SharePoint)
Letters with error type "Big order" and "C01" - must contain an attachment.
Letters with error type "C10" and "Q-ty error" - must contain a table with data from the excel file in the body of the letter.

 

All files and Excel file with distribution list may be changed any moment. And I have to send emails as soon as new files are created on SharePoint.

I would be very grateful for your help! 😊

  • Michael E. Gernaey Profile Picture
    41,020 Super User 2025 Season 1 on at
    Re: Help me please!

    Hi

     

    I really suggest doing the Learning Path (on Microsoft.com) for Power Apps. It will be super valuable. 

    App Maker learning catalog - Power Apps | Microsoft Learn

    Get started with Power Apps canvas apps - Training | Microsoft Learn

    Developer learning catalog - Power Apps | Microsoft Learn

    Error, IfError, IsError, and IsBlankOrError functions in Power Apps - Power Platform | Microsoft Learn

    Debugging canvas apps with Monitor - Power Apps | Microsoft Learn



    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Kaputina Profile Picture
    13 on at
    Re: Help me please!

    Hi Michael,

    Thank you again!

    Thanks for your advice, but I can't understand it😔. What do you mean "wrap your work in Error handling"? Where is it? And how? And what is "Monitor"? Where are such magic buttons? 😃

  • Michael E. Gernaey Profile Picture
    41,020 Super User 2025 Season 1 on at
    Re: Help me please!

    So glad I could help and more so that your stuff is working properly 🙂

     

    Dont hesitate to open more questions if you need help.

     

    One last thing, and I know In my examples I don't, but I always mention it, you should wrap your work in Error handling and then either reply to the Power App or Terminate to log success / failure 🙂 it will help with any debugging you need and make Monitor your best friend.

  • Kaputina Profile Picture
    13 on at
    Re: Help me please!

    Hello Michael,

     

    Thank you SO MUCH!!! Now my flow is working as I wish 

  • Michael E. Gernaey Profile Picture
    41,020 Super User 2025 Season 1 on at
    Re: Help me please!

    Also, if and only if you use any of the variables in your Apply to each, make sure to set the concurrency to 1 in the configuration off the Apply to Each or you will get messed up resets. If you aren't using the variables that you created at the top IN the apply to each (anywhere) then you don't need to.
    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Michael E. Gernaey Profile Picture
    41,020 Super User 2025 Season 1 on at
    Re: Help me please!

    Hello,

     

    That is the part I talked about and is in my picture where you need to use the Create Table action and is my step 3 note to you above.

     

    please review that and it will solve your issue.


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Kaputina Profile Picture
    13 on at
    Re: Help me please!

    Hello Michael,

     

    Thank you so much for your reply.

    While I was waiting for any reply on my asking for help, I created a flow which allow to me create a lot of emails with correct links/attachments, correct email addresses, email text and other.

    Kaputina_0-1694422768366.png

    But I faced only one problem - I can't convert Excel files to Excel Table via Power Automate. It is required to create a  table with the data in the body of email.

     

  • Verified answer
    Michael E. Gernaey Profile Picture
    41,020 Super User 2025 Season 1 on at
    Re: Help me please!

    Hello,

     

    This is actually a big ask. I started to actually write it up but showing you how to build it and get around whether you have a bunch of requirements not listed is not feasible and is very time consuming.

     

    Here are the straight forward basics of what you need to do.

     

    1. You need to use a Trigger for when a new file is added to a SharePoint document library

    2. You need to have a folder that gets only the excel files you want to process, or you have a pattern that you can compare against the name when the Trigger files, so you know if you want or should process.

     

    3. Once the file is determined to be processed you must do the following

    a) List the rows in the sheet -- IMPORTANT NOTE the data has to be in a table so you either need to have it configured already, or you need to create one using the Create Table Action in power automate, giving it all the properties it needs to do its works

     

    4) Right after the action that reads the data (again either via a script which has to already be in the file) or via List Rows, if it has a table, you need an Apply to Each. This is a loop that lets you access the output from a previous step.

     

    5. For each row, you have to get the value of the columns you want to compare. In my opinion, you should have a CurrentErrorType, CurrentError, CurrentEmail variables. You would use these to do the following

    -CurrentError (get the data from the current row in the loop)

    -CurrentEmail(get the current email from the current row in the loop)

    -CurrentErrorType. This is a little bit of simple magic. You said you have options of what to do depending on the error. And a switch is perfect for this. But you cab use a Number. So in the loop when you use the Value of the Set Variable action for CurrentErrorType to set it to 1,2,3,4,5 depending on how many different error processings you can do.

     

    6. Add in the switch, setting each block equal to 1,2,3,4,5 whatever. In each block you would do the following

    -Create an Email to send out

    -Either Attach, Send Link, Whatever, but it would be different in each block.

     

    I am sorry I don't have time to write the whole thing for you, but I am happy to help answer questions.

     

    Here is a screen shot with some notes (you can see them written in an action header). The work isn't all that difficult if what you say is true, then the below (should add error handling too), is what you need.

     

    FLMike_0-1694306004574.png

    Cheers
    --------------------------------------------------------------------------------
    If I had answered your question, please mark your post as Solved
    If you like my post please give it a thumbs up
    Thanks
    Michael
    https://gernaeysoftware.com

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

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow