Step 6: Result notification email

After we get the manager's response to the task, a notification email is sent to the initiator. Follow the steps below:

1

Configure Send an email action to send the leave approval email.

  1. Click the User Interaction action group in the action toolbox and find the Send an Email action.
  2. or

    Type Send an Email in the Search field at the top of the action toolbox.

  3. Insert the action to the Approved branch of the Assign a task action and do one of the following to open the Action Configuration window.
    • Double-click the action.
    • Click on the action and then click Configure.
  1. Add the recipient of the email in the To field:
    1. Click and in the Equals section that appears select Workflow Context in the first drop-down.
    2. Expand the second drop-down and select Initiator.
    3. Click Insert.

    [%Workflow Context:InitiatorUserId%] displays in the To field.

  2. In the Subject field enter the following:
  3. Your {Current Item:Leave type}‍ has been approved.

    {Current Item:Leave type} is a reference which you can select from the Insert References pane. To insert a reference do the following:

    1. Click inside the field. The Insert Reference pane opens on the right,
    2. Expand the Item Properties section and double-click on Leave Type.

  4. In the Body enter the following:
  5. Your manager has approved your ‍{Current Item:Leave type}‍.

    {Current Item:Leave type} is a reference which you can select from the Insert References pane. See step 4 for instructions on how to insert a reference.

  6. Click Save.

2

Configure Send an email action to send the leave rejection email.

  1. Click the User Interaction action group in the action toolbox and find the Send an Email action.
  2. or

    Type Send an Email in the Search field at the top of the action toolbox.

  3. Insert the action to the Rejected branch of the Assign a task action do one of the following to open the Action Configuration window.
    • Double-click the action.
    • Click on the action and then click Configure.
  4. Add the recipient of the email in the To field:
    1. Click and in the Equals section that appears select Workflow Context in the first drop-down.
    2. Expand the second drop-down and select Initiator.
    3. Click Insert.

    [%Workflow Context:InitiatorUserId%] displays in the To field.

  5. In the Subject field enter the following:
  6. Your {Current Item:Leave type}‍ has been rejected.

    {Current Item:Leave type} is a reference which you can select from the Insert References pane. To insert a reference do the following:

    1. Click inside the field. The Insert Reference pane opens on the right,
    2. Expand the Item Properties section and double-click on Leave Type.

  7. In the Body enter the following:
  8. Your manager has rejected your ‍{Current Item:Leave type}‍.

    {Current Item:Leave type} is a reference which you can select from the Insert References pane. See step 4 for instructions on how to insert a reference.

Follow along

This is what your workflow looks like at this point in the solution:

Previous step:

Step 5: Get the response for the leave request

Next step:

Step 7: Configure start options