# Email Notifications

{% hint style="info" icon="lightbulb-on" %}
**Download the master template and notification email templates from Gallagher's** [**Security Hub**](https://resources.security.gallagher.com/Sales_and_Marketing_Tools/Sales_Toolkits/Product/AccessNow). \
They can be reused to expedite workflow configuration.
{% endhint %}

Email notifications are used to send custom messages to the end users of Access Now, including approvers, requesters, and the access operations team. Notifications use master email templates to define the static elements like the footer, header, and branding. The content of the notification is added to the master template in place of the `{ContentPlaceholder}` marker.

### **Creating a new email notification** <a href="#id-4linkingaregularemailtemplatetoamastertemplate" id="id-4linkingaregularemailtemplatetoamastertemplate"></a>

{% stepper %}
{% step %}

### Open the Email Templates module

The module includes a list of all notification templates, including the master templates.
{% endstep %}

{% step %}

### **Click the + New Template button**&#x20;

This opens a window that allows choosing between creating a master template or a regular notification template. Choose the **Regular Email Template** option.&#x20;

<figure><img src="/files/NOhT0BedWJduzW2mBgJC" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Insert the notification content  (HTML or Plain text)&#x20;

Enter the notification content in either HTML or plain text format. You may use the [available variables](#use-of-variables), such as "Requester Name" or "Area Access Requested," to tailor your message. Preview shows the notification content without branding. Next, we will apply branding using the applicable master email template.

<figure><img src="/files/xjb8qO9MpMCn1KSfJvdm" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Set the content type&#x20;

From the content type dropdown, select either HTML or plain text, based on the content used in the master template.

{% hint style="info" %}
Ensure the Content type —HTML or plain text—matches the one used in the master template.
{% endhint %}
{% endstep %}

{% step %}

### Choose the Master Template&#x20;

Select the desired template from the **Master Template dropdown.** The notification email body, provided in the previous steps, replaces the `{ContentPlaceholder}` in the master template. Preview shows the email content with the branded template.&#x20;

<figure><img src="/files/MYVIwwYGIXW1zlSRvDBd" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Customising Email Notifications with Variables  &#x20;

The email templates in AccessNow are constructed using HTML, allowing for complete customisation of their appearance and structure. Users have the flexibility to write their own templates using HTML code, which enables them to incorporate styling and formatting to match their organisational branding.&#x20;

### Use of variables

To dynamically include system data within the emails, AccessNow provides a list of pre-defined variables. By inserting these variables in the designated placeholders `{}`, the system automatically populates the emails with relevant information such as requester details or status. \
\
**Example Variables**\
\
People Data:\
Requester Name: `{Request.RequestFields[requestername]}`\
Cardholder Name: `{Request.RequestFields[forcardholderfirstname]}` \
Cardholder Last Name: `{Request.RequestFields[forcardholderlastname]}`\
\
Request Data:\
Request Type: `{Request.RequestType}`\
Request Status: `{Request.CurrentStatus}{Request.RequestFields[]}`\
Amend Reason: `{Request.RequestFields[rejectreason]}`\\

\
Access Area:\
Area Requested: `{Request.RequestFields[areasrequested][value:]}`\
Lift Group Requested: `{Request.RequestFields[liftgrouprequested]}`\\

\
Delivery and Collection\
Collection Method: `{Request.RequestFields[collectionmethod]}`\\

Delivery Comments: `{Request.RequestFields[deliverycomments]}`

### Triggering a Workflow from an Email Using a Workflow ID

Notification emails can trigger workflows to automate tasks. A typical example is enabling a cardholder to activate a new credential through a workflow.

To trigger a workflow from an email using a workflow ID, use the below link. Make sure to replace **XX** in the link with the actual [workflow ID](/command-centre/accessnow-user-guide/workflow-creation/creating-and-managing-workflows/workflow-management.md#workflow-id) you'd like to trigger.

```
https://accessnow.security.gallagher.cloud/requests/new?workflow_id=XX
```

**Example Use:**

`<a href="https://access-now-au.security.gallagher.cloud/requests/new?workflow_id=XX” class="btn">Activate Card</a>`

<div data-with-frame="true"><figure><img src="/files/ckMmzybtZmWaz6dy27hn" alt=""><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.security.gallagher.com/command-centre/accessnow-user-guide/workflow-creation/creating-and-managing-workflows/workflow-configuration/email-templates/email-notifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
