How to get a Task Reminder Based on Due Date using Flow
Introduction:
A Salesforce user needs to get a reminder email to complete the task based on the task due date.
For context, a reminder email should be sent to the user 1 day before the due date of the task if it is not completed. This automation can be built with the Record-Triggered Flow based on the Task object. Please see the following steps for how you can accomplish it:
Step 1. Navigate to Setup
Step 2. In the Quick Find box, enter Flows, and then select Flows
Step 3. Click on New Flow button, select Record-Triggered Flow and press on Create button
Step 4. Under the Select Object section, set the object as Task, and in the Configure Trigger, choose A record is created or updated
Step 5. In Condition Requirements, choose All Conditions Are Met (AND). Add the following details as your Entry conditions:
First entry condition:
- Field: Status
- Operator: Does Not Equal
- Value: Completed
Second entry condition:
- Field: Activity Date
- Operator: Is Null
- Value: False
Step 6. In When to Run the Flow for Updated Records section, choose Only when a record is updated to meet the condition requirements, select Actions and Related Records, and click on Done
Step 7. Click on + Add Scheduled Paths (Optional) action
Step 8. Set the Schedule Path with following details and click on Done
- Path Label: Schedule one Day Before Task Due Date
- Time Source: Task: Due Date Only
- Offset Number: 1
- Offset Options: Days Before
Note that the record with the past date will also enter the path, so to avoid that, the Decision Element can be added to not run the path if it’s past the date
Step 9. Add a Decision Element using the following details below, and in the When to Execute Outcome section, select If the condition requirements are met and click on Done
- Label: Check Due Date Is Greater Than Today
Outcome details:
- Label:True
- Field:{!$Record.ActivityDate}
- Operator:Greater Than
- Value: {!$Flow.CurrentDate}
Step 10. Under the Yes route, add an Action and select the Send Email core action to send an email to the owner of the task. Email template can also be used instead of Email Core action.
Step 11. Save your Flow and give it a Name. Flow API Name will auto generate
Step 12. Click on Activate to start reminding task owners via email
All done, and here is what the complete Flow looks like
Conclusion :
In conclusion, Salesforce offers flexible and user-friendly options to implement reminder emails for tasks based on due dates. Triggered Flow with a Scheduled Path, approach leverages the declarative capabilities of the platform, eliminating the need for extensive coding.
Related Links:
https://www.merfantz.com/blog/how-to-modify-task-composer-on-activity-tab-in-lightening/
https://www.merfantz.com/blog/how-to-schedule-next-job-automatically-in-fieldax/