Welcome to the OpenCities help centre. Search for what you're after, or browse the categories.
Can't find what you're looking for? Submit a support ticket and we'll be in touch.


Create email templates for workflows

avatar of OpenCities Product Team

OpenCities Product Team

Last updated

This task can be undertaken by users with the following roles: OC Site Manager, OC System Administrator, and OC Workflow Manager.

This article will take you through creating Email Templates, including:

When you set up a workflow, you'll need to create a template for each notification email that gets sent as part of the workflow. This includes emails to both internal and external approvers.

Once you've created email templates, you'll need to go back to the workflow and apply them.

If you use Outlook as your email client, you might have some issues with links in workflow emails. Microsoft Advanced Threat Protection automatically changes any links it sees as 'suspicious', including OpenCities workflow approval links. Sometimes this means the link gets broken. To stop this from happening, set up a custom do-not-rewrite URLs list in Office 365, and add your site's URL.

Create email templates

Go to More > Email TemplatesCreate New Workflow Email.

To access previously created email templates, click on the drop-down menus on the left side of the screen. These templates are divided into System Email Templates and Workflow Email Templates.

Creating your own template, or editing one of the existing ones, will take you to an Overview tab view.

The Overview tab

  1. In the Overview tab, add an Email name – this is used internally, to access this template for future edits and to differentiate it from other templates when you are selecting it for a workflow.
  2. Add a Subject, From name, and From email – these will appear in the email itself.
  3. Click Save and you will be able to access the Alternate Views tab.

Email templates overview tab

The Alternate Views tab

Go to the Alternate Views tab to enter the body text for the email, and to create text and HTML views for it.

You can start off by using the alternate view we created for you: text/html. Click to open it.

Email templates alternative views tab

The email body text is made up of a combination of plain text, HTML tags, and OpenCities data tags. OpenCities data tags are used to add in data about the submitted page and the related workflow stages. For example, the tag "<ItemData DataDefinition="Author Name" Template="default" />" will appear in the email as the page author's name. 

To change plain text components and HTML tags, or delete OpenCities data tags, edit directly in the text area.

email template edit screen

To add OpenCities data tags, place your cursor in the text area wherever you want the tag to appear, choose an option from the Data fields drop-down list and click Insert. See the Data field descriptions section below for more information.

the data fields in the email template edit screen

Click Save, and repeat these steps for any additional alternate views you need to create. 

Then, Save the email template, and repeat these steps to create a template for each status (i.e. approved or rejected) involved in the workflow. Note that if you have external approvers, you'll need to create additional versions for them – see the External approvers section below.

Data field descriptions 

The following list defines all data fields available in OpenCities. Please note that not all data fields will be applicable to email templates for Workflows.

Data definitions Description
Name The page name
Activate Date The publish date of the latest version
Create Date The creation date of the first page version
Review Date When the current version of the page was activated
Deactivate Date The date the page will expire
Owner Name The creator or assigned owner of the page
Author Name The editor of the latest version of the page
Content Type The page's content type
Linked Content A list of inbound internal links to the page. This is useful for deletion workflows, as pages that link to each other may need to be relinked to avoid broken links
Link The live link to the page once it is approved and published, or to the most recent published version of the page
Content Version Number The version number of the content in the workflow
Breadcrumb Path

The plain text of the navigational path of the page.

For example: [your site]/Council/[page name]


Workflow fields Description
User Performing Action The user who has made the most recent action
Stage Name The workflow stage the page is in
Action Performed The last action taken 
Latest Comments The last comment submitted with this page version
All Comments

All comments submitted with this page.

Note: We recommend using the Latest Comments field, as the All Comments field lists all comments made from all versions. This can get very long and confusing.

Workflow Item Link (Content)

Link to the content page in workflow approval. 

Note: you need to include Admin Domain Name and Admin Url Scheme before the Workflow Item Link

Review Item Link (Content)

Provides a link to the page admin, from which reviewers can preview the page.

Preview Item Link (Content) Provides a link to page preview and comments field, does not provide access to admin
External Approver Link (Content) Link to the content page in workflow approval for an external approver
Number Pending Days
Number of days a page has been pending in the workflow
Web Root Url
URL of the site which the page belongs to


System Fields Description
Group Name Name of the site the page is in (e.g. Public or Theatre?)
Admin Url Scheme The Url for the page
Admin Domain Name The domain name for the page
Email Signature - Text Email signature in text form, pulled from: More > Site Management > Email > Field
Email Signature - HTML Email signature in HTML form, pulled from: More > Site Management > Email > Field

External approvers

If you have external approvers, you'll need to create an additional version of each email template. This version must include a special link in the body text that allows the external approver to access the page. The link contains a token that gives one-off access to the page. Once the page has been actioned, the token will expire.

In your email template for external approvers, delete the following part of the default link:

From the Data fields drop-down list, choose External Approver Link (Content) and click Insert.

The link now contains a reference to a token.

external approver link in email template

Apply email templates to a workflow

Once you've created email templates, you need to apply them to the workflow stages they relate to. For more information, see Create a workflow.

Need some more help? Check out our sample HTML templates for workflow emails.

Was this article helpful?
0 out of 0 found this helpful