Scheduled Banner Updates for Autotask Email Notifications
This tutorial walks through building a scheduled task that automatically updates a banner message on every Autotask Account. When combined with Autotask notification templates that reference the banner field, this lets you display time-sensitive messages (holiday hours, maintenance windows, announcements) in every outbound email from Autotask without manually editing templates.
Overview
The workflow uses three components:
- A User-Defined Field (UDF) on the Account entity in Autotask that holds the current banner text
- Autotask notification templates that reference the UDF, so the banner appears in every outbound email
- A scheduled task in Email2AT that runs daily, determines the correct banner for today's date, and updates the UDF on every Account
Related pages:
Prerequisites
Create the UDF in Autotask
- In Autotask, navigate to Admin > Features & Settings > User-Defined Fields
- Create a new UDF on the Account (or Company) entity
- Name it something like
Email Notification Banner Text - Set the type to Text or Long Text
- Make sure the UDF is visible on the appropriate Account categories
Insert the UDF in Autotask Notification Templates
- Navigate to Admin > Automation > Notification Templates
- Edit the templates for ticket notifications (creation, update, etc.)
- Insert the Account UDF variable where you want the banner to appear (typically at the top or bottom of the email body)
- Save the templates
Now every outbound email from Autotask will include whatever text is stored in that UDF on the ticket's Account.
Building the Scheduled Task
Create the Scheduled Task
- In Email2AT, navigate to Scheduled Tasks
- Click Add New Scheduled Task
- Name it
Update Email Banner - Set the cron schedule to run daily. For example:
7 0 * * *(every day at 00:07 UTC)
The cron schedule runs in UTC by default. If your team operates in a different timezone, offset the cron hour accordingly. For example, to run at midnight US Eastern time, use 7 5 * * * (5:07 AM UTC). The offset matters because the scheduled task determines "today's date" at the moment it runs, which affects which banner message is selected.
Action 1: Define the Banner Messages
Use a Render Text and Store as Variable action to define your date-to-message map.
- Click Add New Action, select Render Text and Store as Variable, click OK
- Name the step
Define Banner Messages - In the text field, enter your banner definitions, one per line, in the format
date|message:
2026-01-01|Happy New Year! Our offices are closed today. Normal hours resume January 2nd.
2026-05-25|Memorial Day: Our offices are closed. Normal hours resume May 26th.
2026-07-04|Independence Day: Our offices are closed. Normal hours resume July 7th.
2026-12-24|Holiday hours: Our offices close at noon today and reopen December 26th.
2026-12-25|Merry Christmas! Our offices are closed today and reopen December 26th.
- In Store results in variable, enter
banner_definitions
For easier management, you can store the definition list in an Autotask Account note or a dedicated UDF instead of hard-coding it in the action. Query for the note in a previous step and use its contents as the definition list.
Action 2: Extract Today's Banner
Use a Perform a Regular Expression Match action with "Return all matches" enabled to find the banner for today's date.
- Click Add New Action, select Perform a Regular Expression Match, click OK
- Name the step
Find Today's Banner - Set Pattern to:
/^{{date format="Y-m-d"}}\|(.+)$/m
This pattern looks for a line that starts with today's date followed by a pipe and captures the message text.
- Set Input to
{{custom.banner_definitions}} - Enable Return all matches
- In Store results in variable, enter
banner_match
Action 3: Set the Banner Text
Use a Render Text and Store as Variable action to set the banner text. If no match was found for today's date, use a default (empty or a standard message).
- Click Add New Action, select Render Text and Store as Variable, click OK
- Name the step
Set Banner Text - In the text field, enter:
{{#if banner_match.[0].[1]}}{{custom.banner_match.[0].[1]}}{{else}}{{/if}}
This uses the first match's capture group if one exists, or renders empty if no match was found.
- In Store results in variable, enter
banner_text
Action 4: Query All Accounts
- Click Add New Action, select API: Query for Object(s), click OK
- Name the step
Get All Accounts - Set Entity Type to
Account - Add query conditions:
Activeequals1(ortrue)
- In Store results in variable, enter
accounts
Action 5: Iterate and Update Each Account
- Click Add New Action, select Iterate Through Array, click OK
- Name the step
Update Banner on Each Account - Set Field to Iterate to
custom.accounts - Set Value Variable Name to
account
Nested action: Update the Account UDF
- Inside the iteration, click Add New Action, select API: Update an Object, click OK
- Name the step
Set Banner UDF - Set Entity Type to
Account - Set Only perform this action if: the account's current UDF value differs from the new banner text (this avoids unnecessary API calls). If you cannot easily compare, skip this condition and update all accounts unconditionally.
- Configure fields:
- ID:
{{custom.account.id}}(unlock the field) - UDF: Email Notification Banner Text:
{{custom.banner_text}}(unlock the field)
- ID:
Activating the Schedule
- Test the scheduled task manually by clicking the Run button
- Open the processing log in History and verify:
- The correct banner was selected for today's date (or empty if no match)
- Accounts were queried
- Each account was updated with the new banner text
- Open a test Account in Autotask and confirm the UDF was updated
- Send a test notification from Autotask and verify the banner appears in the email
- Once confirmed, enable the schedule
Key Takeaways
- UDFs bridge Email2AT and Autotask templates: the scheduled task writes to the UDF, and the Autotask notification template reads from it
- Date matching drives the banner: define date/message pairs and the regex selects today's match automatically
- Empty banner clears the message: when no match is found, the UDF is set to empty, so no banner appears in emails
- Timezone matters: the cron schedule and
{{date}}helper both use UTC by default; offset the schedule if your business operates in a different timezone - Update only when changed: if possible, compare the current UDF value to the new one to avoid unnecessary API calls
Related Documentation
- Core Concepts: how rules, actions, and variables work together
- Iterate Through Array: looping over query results
- API: Query for Object(s): querying multiple Autotask entities
- API: Update an Object: updating any Autotask entity
- Perform a Regular Expression Match: extracting data with regex