Flow Automation problem

2023-10-27T10:26:50.4766667+00:00

Hello,

 

Could you please help me to create the following flow. I've been trying for 2 weeks but can't get anything to work.

I have a SharePoint List that consists of Action Points. These Action Points have an AP ID, DEADLINE, Status and Assigned to fields. Assigned to field is a multi person field in SharePoint, take it into an account.

I want the flow to check everyday if there are any Action Points due in 2 days. If there are Action Points due in 2 days, I want the flow to make a table from any Action Points assigned to a specific person and send the table via email to this sepecific person only (the Assigned to -person). The table should only have the Action Points that are for the same person as the email is going to.

 

Example from SharePoint Action Point list:

AP ID 1, Deadline in 2 days, Assigned to Tuukka

AP ID 2, Deadline in 2 days, Assigned to Tuukka

AP ID 3, Deadline in 2 days, Assigned to Laura

AP ID 3, Deadline in 3 days, Assigned to Matias

The above list should send separate emails to Tuukka and Laura with only the action points assigned them. So Laura shouldn't get email that has a list of Action Points assigned to Tuukka and vice versa. Matias shouldn't get any email.

 

Please help me...

 

The main problems are that I can't get any Get items -query to work, and when I try to do anything with Assigned to-field, Power Automate creates new loop...

Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

2 answers

Sort by: Most helpful
  1. Yanli Jiang - MSFT 31,666 Reputation points Microsoft External Staff
    2023-10-30T10:29:46.84+00:00

    Hi @Strömberg Tuukka (Sp-Liitto External) ,

    Based on my research and testing, you can try the following Flow:

    This is the list:

    User's image

    For the Deadline and AP ID column, since you didn't say what type they are, I use the single line of text type.

    This is the flow:

    1, Get items perform the first filter based on Deadline equal to 2.

    10301

    2, Get filter result.

    User's image

    3, Perform a second screening based on the person assigned to, tabulate the results, and send the email.

    10302

    The input are there:

    union(body('Select'),body('Select'))
    items('Apply_to_each')?['Personemail']
    item()?['assignto/DisplayName']
    item()?['Deadline']
    item()?['APID']
    items('Apply_to_each')?['Personemail']
    

    The result:

    User's image

    Hope this helps you.

    Because the Q&A forum currently does not support Power Automate, and I am not very good at it, the answers may be flawed. If there is any confusion, please feel free to contact us.

    Updated on 11/1/2023

    according to your reply, that would require changes in two places:

    1. Change the filtering part of deadline to the following:

    11011

    The input are there:

    utcNow('yyyy-MM-ddThh:mm:ssZ')
    formatDateTime(addDays(utcNow(),2),'yyyy-MM-ddThh:mm:ssZ')
    
    1. Modify the date-related parts of the output result table. Please note the time difference between the applications. In my environment, the time difference between Outlook and SharePoint is 1 hour:

    11012

    The input is there:

    formatDateTime(addHours(item()?['Deadline'],-1),'yyyy-MM-ddThh:mm:ssZ')
    

    And the result:

    User's image

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Strömberg Tuukka (Sp-Liitto External) 0 Reputation points
    2023-11-23T12:37:00.6766667+00:00

    This doesn't work. Is there any other way to do the flow I need?
    Should I edit my list?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.