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.

Follow

Create Email Templates for Workflows

avatar of OpenCities Product Team

OpenCities Product Team

Last updated

This task is for users with the OC Site ManagerOC System Administrator, or OC Workflow Manager roles.

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 sent as part of the workflow. This includes emails to both internal and external approvers.

Once you've created email templates, you must 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 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 the 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 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 can 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 create text and HTML views for it.

  1. You can start by selecting the text/html alternate view we created for you.Email templates alternative views tabThe email body text comprises a combination of plain text, HTML tags, and data tags, which add 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.
  2. Edit directly in the text area to change plain text components and HTML tags or delete data tags.email template edit screen
  3. To add 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 select Insert. You'll find a list of Data field descriptions below.the data fields in the email template edit screen
  4. Save, and repeat these steps for any additional alternate views you must create.
  5. 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.

Data Field Descriptions 

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

Fields

  • 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

  • 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): A 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 to which the page belongs to.

System Fields

  • Group Name: Name of the site the page is in (e.g., Public or Theater).
  • 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

You must create an additional version of each email template if you have external approvers. This version must include a unique 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.

  1. In your email template for external approvers, delete the following part of the default link:
  2. Choose External Approver Link (Content) from the Data fields drop-down list.
  3. Select Insert and the link will now contain a reference to the token.

external approver link in email template

Apply Email Templates to a Workflow

Once you've created email templates, you must apply them to the workflow stages they relate to using the Email tab.

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

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