Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

If in excel column date matches today's then send it as attachment by email

(1) ShareShare
ReportReport
Posted on by 8

Dears,

 

I have following issue: We have an excel file with a lot of data updating everyday. There is a column "Date".

I need to create a flow which checks everyday (recurrency flow already created), if column "Date" matches for today's date, the other columns should be extracted and send as attachment by email to recipients.

 

At the moment I cannot save these data as an attachment

  • Community Power Platform Member Profile Picture
    on at
    Re: If in excel column date matches today's then send it as attachment by email

    thank you very much!!!!

  • Pstork1 Profile Picture
    66,026 Most Valuable Professional on at
    Re: If in excel column date matches today's then send it as attachment by email

    YOu are still using is equal to in the Filter array instead of Starts With

  • Squarantinio Profile Picture
    8 on at
    Re: If in excel column date matches today's then send it as attachment by email

    Hi,

     

    Thank you for your reply. Flow is working well, I received an email with excel attachment, however as you can see from attachment it has extracted all data, instead of today's data. Maybe there is some error in function formatDate? Email and outputEmail and outputFilter array and Create CSVFilter array and Create CSVResultResultSectionSection

  • Pstork1 Profile Picture
    66,026 Most Valuable Professional on at
    Re: If in excel column date matches today's then send it as attachment by email

    It stripped out most of my screenshots so let me send those again.

    1) 

    image.png

    2)  

    image.png

    3) 

    image.png

    4) 

    image.png

    5) 

    image.png

  • Pstork1 Profile Picture
    66,026 Most Valuable Professional on at
    Re: If in excel column date matches today's then send it as attachment by email

    I basically gave you everything you need in the reply above.  But here is the full flow.

    1) Trigger the flow manually and then do a List Rows in Table from your file.  Make sure to set the Date Format to ISO 8601
    2) This next thing is an optional step, but if you don't do it you'll end up with an extra column with a GUID in it.  Do a Data Select to choose and Map only the columns you want in the file.

    3) Filter the output of the data select . The Left side is the Date Column from Excel, the comparison is StartsWith and the Right side is formatDateTime(utcNow(),'yyyy-MM-dd')

    4) Use the output of the Data Select to Create a CSV Table.
    5) Send the Email.  Fill in the File Name with something appropriate and use the output of the CSV table as the file content.
    If you click on the .csv file extension in the email it opens in Excel.

     

    image.png

    image.png

  • Community Power Platform Member Profile Picture
    on at
    Re: If in excel column date matches today's then send it as attachment by email

    please show me how to do this by example, How to make today's dates read from excel and send as excel attachment by mail?

  • Pstork1 Profile Picture
    66,026 Most Valuable Professional on at
    Re: If in excel column date matches today's then send it as attachment by email

    Instead of the Create HTM you can either use Create CSV to create a CSV file and send that or actually create another worksheet, create a Table and add the array as rows. Creating the CSV is much easier and it can be opened directly in Excel.

  • Squarantinio Profile Picture
    8 on at
    Re: If in excel column date matches today's then send it as attachment by email

    Thanks for your reply. List rows is working properly. But I need to extract the data as an excel file attachment not HTML. Do you have any idea how to do it?

  • Pstork1 Profile Picture
    66,026 Most Valuable Professional on at
    Re: If in excel column date matches today's then send it as attachment by email

    There are a couple of things you need to do to make this work.

    1) In the List Rows action you need to set the date format to ISO 8601.  (See last field in advanced)

    2) UtcNow will contain the current time in addition to the date.  So you need to use a FormatDateTime() to filter that out.

    formatDateTime(utcNow(),'yyyy-MM-dd')

    3) The date column value will also contain a time element pointing to Midnight if your Excel column only had the date.  So the ISO 8601 value will look something like this.  '2023-12-04T00:00:00.0000Z'. So your comparison needs to be StartsWith, not Equals.

    4) Once you have the Filtered array you can use a Select to get the columns you want and then a Create HTML table to get the output you want in the email.  Loops will not be necessary.

     

    image.png

  • Squarantinio Profile Picture
    8 on at
    Re: If in excel column date matches today's then send it as attachment by email

    This is my current flow

     

    MicrosoftTeams-image.png

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,026 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow