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 / Daily Recurrence, Chec...
Power Automate
Unanswered

Daily Recurrence, Check SharePoint List for upcoming anniversaries, for each, Send email to supervisor w/attachments from SP List.

(0) ShareShare
ReportReport
Posted on by

Hello helpful community experts,

 

I'm looking to build a flow that will check a SP List daily for employees with work anniversaries that are 30-days out, and for each employee that meets that criteria, send an email to that employee's supervisor with 3 unique documents attached which are specific to the employee (these 3 documents are saved in the SP List in columns formatted as hyperlinks).  

Additional Info
a)  The SP List is secured to HR access only due to its inclusion of confidential info, so sending supervisors a direct link to the SP List itself is not allowed.

b)  I'd prefer that the email send the 3 documents as links rather than actual attachments, but if that's not a possibility I can save the 3 documents in the "attachments" column of the SP List.

 

Here is an image of my SP List:
EE Perf Eval - SP List.JPG

 

I've attempted a few variations flows, but none have worked thus far.  The most recent trial included using the Initialize Variable steps, but when there was a 2nd employee which had an anniversary 30-days out, the email to the supervisor included attachments from the 1st employee in addition to its own.

Categories:
I have the same question (0)
  • PrasadAthalye Profile Picture
    on at

    Can you post a screen shot of your flow? 

  • Community Power Platform Member Profile Picture
    on at

    Here's an overview of the current flow, which is using the Initialize Variable step, but is lumping ALL attachments for subsequent employees instead of just the current employee's. 

     

    EE Perf Eval - Flow Overview.JPG

  • v-litu-msft Profile Picture
    on at

    Hi @Anonymous,

     

    The reason why you will get the attachments of all the qualified item should be Get items have obtained the previous item. Can you expand the action of Get items?

    If you want to get item that 30DayNotice equals to today, you could format 30DayNotice and today to "yyyy-MM-dd" before compare them.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    on at

    Here is the expansion of my Get Items:
    EE Perf Eval - Get Items expansion.JPG

     

    I can't use the formula you suggest to get the items with the 30-day notice due to the YYYY.  My 30DayNotice column is calculating just the MM-dd since it's using Hire Date which could have any hire year associated with it.  I haven't found a way to use the Filter Query in Get Items that works to find the 30-day items.  (Please share if you know - for now I have a Condition that is working to get these items.

    Here is an expanded view of my two Apply To Each's, including the 30-day condition that's currently working:
    EE Perf Eval - Apply to Each expansions.JPG

  • v-litu-msft Profile Picture
    on at

    Hi @Anonymous,

     

    OK, if the 30-day column is "MM-dd", you could format utc time to "MM-dd" and compare, for example:

    Annotation 2020-08-06 101412.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    on at

    I attempted your suggestion for the Filter Query within the Get Items step, but I don't have the Dynamic option of selecting my 30DayNotice column, so I ended up just typing it in there.  It didn't work.  The error details state:

    EE Perf Eval - Fail Get Items Filter Query.JPG

  • v-litu-msft Profile Picture
    on at

    Hi @Anonymous,

     

    OK, how about use filter array action to filter out these items:

    item()?['30DayNotice']
    utcNow('MM-dd')

    Annotation 2020-08-07 112345.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    on at

    We're getting closer, I can feel it!  I guessed that the Filter array step should be inserted just after Get Items, hopefully that was the right spot, but tell me if I guessed wrong. 

     

    I'm also guessing I no longer need my original Condition to get the 30DayNotice employees since we've added the Filter Array step to get these?... but that condition is where I had my Send an Email step...  I did a test run with leaving that Condition in, and I got 2 emails for my 2 employees, which is great, however the linked attachments in both emails were for the same (1st) employee, so there's something not working correctly still.

     

    Here's the updated flow image below.  The Condition with Send an Email was at the very end.  Where should the Send an Email step be inserted so that each email gets its own attachments?

    EE Perf Eval - Flow Overview 8-7-20.JPG

  • PrasadAthalye Profile Picture
    on at
    I think it should be inside loop
  • v-litu-msft Profile Picture
    on at

    Hi @Anonymous,

     

    In the Apply to each 2 action body field, it should be the output of the Filter Array action:

    Annotation 2020-08-10 134924.jpg

    And the dynamic content couldn't see, but you could use the expression to get these properties, for example:

    item()?['ColumnName']

    Annotation 2020-08-10 134925.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard