Thank you for choosing Microsoft Community.
Sounds like you're almost there! Let's refine your flow to ensure it sends reminders correctly based on the task's priority and progress.
Here's a step-by-step approach to achieve this:
Initialize Variables:
Initialize a variable for the priority (e.g., Priority set to 5 for medium).
Initialize a variable for the current date.
Get Tasks:
Use the "List tasks" action to get all tasks from the plan.
Filter Tasks:
Use the "Filter array" action to filter tasks based on the priority and progress. The condition should check if the task's priority matches the initialized variable and if the progress is "not started".
Loop Through Filtered Tasks:
Use an "Apply to each" action to loop through the filtered tasks.
Get Task Details:
Inside the loop, use the "Get task details" action to get details of each task.
Send Email:
Use the "Send an email" action to send an email reminder. Include the task title, bucket name, and details in the email body.
Here's a sample flow outline:
1. Initialize variable: Priority = 5
2. Initialize variable: CurrentDate = utcNow()
3. List tasks (Planner)
4. Filter array (Tasks where Priority = 5 and Progress = "not started")
5. Apply to each (Filtered Tasks)
5.1 Get task details (Planner)
5.2 Send an email (Include task title, bucket name, and details)
Make sure your filter array condition looks something like this:
@and(equals(item()?['priority'], 5), equals(item()?['percentComplete'], 0))
This should help you send reminders only for tasks that match the specified priority and progress criteria. If you encounter any specific issues or errors, feel free to share them, and I'll be happy to assist further! 😊
If this Post helped you, please click "Does this answer your question" and like this post to help others in the community find the answer too!
Happy to help
Robu 1