is it possible to create an email template that will dynamically get the user's name in the template depending if the request is accepted or rejected?

2 Answers 2


You can have two email templates with different formatting, and use them separately when approval process is rejected or approved. If you want to get other users, you can set field with specific value when it's rejected or approved (for example status), and based on this, trigger the flow, get user name you want and send email with created text template in flow for each status.

  • How to execute this? It would be helpful to have a visual
    – rameesha
    Commented Mar 11 at 7:22
  • I'll find some time today, and I'll put a visual exemple for you if you still need it
    – Qba2312
    Commented Mar 13 at 7:43
  • Yes please that would be great!
    – rameesha
    Commented Mar 13 at 19:05

I write new reply because answer to comment reached characters limit.

  1. Create Approval Process, let's say, when the request is approved - update record with Approved status value, if rejected - Rejected. Learn about the approval process: https://trailhead.salesforce.com/en/content/learn/modules/business_process_automation
  2. Create a record triggered flow and check if status is updated to rejected or approved, in flow create two text template for approved and rejected.

Here you find about text template: https://trailhead.salesforce.com/content/learn/modules/flow-basics/learn-about-flow-variables?trail_id=build-flows-with-flow-builder

Record-triggered flow: https://trailhead.salesforce.com/content/learn/modules/record-triggered-flows?trail_id=build-flows-with-flow-builder

If I helped, please mark this answer as solution

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .