Skip to main content

HOW TO

EDIT Existing Email Content

  1. Open “Email Content” Dataverse table.
  2. Click Export > Export data and download the Excel file of existing email content and keep it somewhere safe as backup.
    TIP: Rename the file with client or environment name and the date the file was pulled.
  3. Please read IMPORTANT CONSIDERATIONS section before making any changes.

A. Minor change for a single or a few emails

  1. Back on Dataverse table screen, click the small down arrow next to EDIT > Edit in new tab.
  2. Locate and select the appropriate email, then click Edit row using form.
  3. Make required changes, Save and close.
  4. Repeat steps above for any additional emails.

B. Major change requiring bulk update

  1. Make a copy of the backup file and open the new file.
  2. Make required changes, save, then close it.
  3. Back on Dataverse table screen click Import > Import data with Dataflows and follow the steps.

ADD New Email Content

  1. Open “Email Content” Dataverse table.
  2. Click Export > Export data and download the Excel file of existing email content and keep it somewhere safe as backup.
    TIP: Rename the file with client name and date the file was pulled.
  3. Please read IMPORTANT CONSIDERATIONS section before making any changes.

STEP 1 – Power Automate

  1. Open any existing flow using the Email Content table (referred to as source flow).
    Example: Send Welcome Back email to Client
  2. Open the flow this new email content is for (referred to as destination flow).
  3. On the source flow, find and copy:
    • Scope: Get Email Content Template
    • Scope: Update EmailTemplate
  4. On the destination flow, paste both scopes just before the step that sends the email.
  5. Under Get Email Content Template, update the compose action FlowEmailTemplate Filter:
    • Set FlowName and FlowEmailID to appropriate values.
  6. Under Update EmailTemplate, update compose action ReplacementMapping:
    • Add or remove required or unnecessary wildcards (see Wildcards section).
      • Unused wildcards are acceptable as long as their Replacement value is valid.
    • Take note of wildcards used by this email content, as they are required in STEP 2.
  7. Use:
    • @{outputs('Replace_Wildcards_in_EmailSubject')?['body/result']} for Email Subject
    • @{outputs('Replace_Wildcards_in_EmailBody')?['body/result']} for Email Body

NOTE

When adding scopes for subsequent emails in a single flow, make sure to check:

  1. Update EmailTemplate > Replace Wildcards in EmailSubject
  2. Update EmailTemplate > Replace Wildcards in EmailBody

Dynamic content under the Text property may need updating.

Example:

@{outputs('Get_EmailContents_by_ID')?['body/tt_emailsubject']}

May need to be updated to:

@{outputs('Get_EmailContents_by_ID_2')?['body/tt_emailsubject']}

Note the incrementation.


STEP 2 – Dataverse

  1. On Email Content table screen, click the small down arrow next to EDIT > Edit in new tab.
  2. Click New row > New row using form.
    • Toggle Enabled for review to ON for testing.
    • Provide Flow Name this email relates to.
    • Fill out Email Subject and Email Body, including required wildcards noted in STEP 1.
    • Enter Flow Email ID:
      • First email for flow: 1
      • Additional emails: increment by 1 from the last value
        Example: If there are 4 existing emails, the new one becomes 5.
    • Click Save & Close.

Wildcards

When creating or updating emails, refer to Email Content Wildcards table and reuse existing wildcards where possible.

If a required wildcard does not exist:

  1. Do not use spaces in wildcard names.
  2. Add it to Email Content Wildcards table.
  3. Add it to flow [ADMIN]-Generate email for selected Email Content [single email] in the ReplacementMapping compose action.
  4. Add it to flow [ADMIN]-Generate email for selected Email Content table rows [multiple emails] in the ReplacementMapping compose action.

IMPORTANT CONSIDERATIONS

  1. Expressions like @{variables('Salutation')} must be replaced with wildcards such as {{var.salutation}}.
  2. All " in Email Body and Email Subject must be escaped as \".
  3. All " in Flow Name must be replaced with ".
  4. Check for special characters rendering incorrectly (often shown as ?).
  5. Replace long dashes generated by MS Office with standard dashes.
  6. Flow names must not contain &, ", or other special characters.
  7. Always test each new or updated email and visually verify the output.

Testing

New or updated emails must be tested using one of the following:

  • [ADMIN]-Generate email for selected Email Content [single email]
  • [ADMIN]-Generate email for selected Email Content table rows [multiple emails]

Notes:

  • Enabled for review should be toggled to ON, on the Email Content table, for any flows that are to be selected by this flow.
  • Email will be generated for visual review.