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 / When a file is added o...
Power Automate
Unanswered

When a file is added or modified (Validate new rows only)

(0) ShareShare
ReportReport
Posted on by 12

Hi all, 

 

I have created a flow where it reads the file from file-system(Trigger: When a file is added or modified) and if it finds the keyword ERROR in the file it sends out an email. 

It works ok but say there is an ERROR keyword in the first row, it sends the email but if the file is edited another 5 times, it will send out 5 emails because every time catches the ERROR keyword in the first row. 

 

Is there any way I can check in the flow that there has been an email sent out for the ERROR message and no need to send it again? But only send a new email if a new ERROR keyword appears in the text file? Or Just start reading the file from the new rows inserted and not from the start? 

 

PranavPh_1-1687441419693.png

 

Need your inputs @Expiscornovus @ManishSolanki @rzaneti 

 

Regards,

Pranav

 

PowerAutomateIssue.png
Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,692 Moderator on at

    Is this just a .txt file? Not a spreadsheet? 


    If it were a spreadsheet you could just add a column that defaults to "No" and then updates to "Yes" if an email is sent, so you could filter out any "Yes"es. 

     

    If it's a text file, though, you could keep a list separately and just say the filename, the occurrences of the word "Error" and the amount of emails sent out. Ie, if there are 3 errors and 3 emails, great. If there are 3 errors and 2 emails, time to send out another email.

     

  • PranavPh Profile Picture
    12 on at

    Hi, No its not a spread sheet. Its a .txt file which holds the logs from the system. 

     

    Syntax is something like this

     

    DateTime INFO Log-details

    DateTime ERROR Log-details

    Datetime WARNING Log-details

    Datetime INFO Log-details

     

    Flows reads the file > Sees ERROR > Sends email > Fine. All ok. 

     

    But file gets edited and another INFO row is added, flow reads the first ERROR and sends email > Don't want that since an email has been already sent. I want the FLOW to send an email only new New ERROR is logged in the file. 

     

    Regards,

    Pranav 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard