Intro
This article explains how to choose the right email function from the Domo Notifications package, configure its inputs, and send styled emails to Domo users, Domo Groups, and external addresses from a Workflow. The package provides several focused email functions—one for each common recipient type, plus a flexible catch-all—and every function produces the same clean, styled email.Required Grants
The email functions belong to a global package that Domo maintains, so you don’t need any special grant to use them. Anyone with access to Code Engine and Execute permission on the package can call these functions from a Workflow. Contact your Domo account team to enable Code Engine for your instance. Learn more about grants.Access the Domo Notifications Package
The email functions are part of the Domo Notifications package, one of the global packages Domo maintains in the Code Engine library. Because it’s a global package, it’s available to anyone with access to Code Engine, so you don’t need to create or import anything. There are two ways to use these functions:- In a Workflow (most common) — Add a Code Engine function step, select the Domo Notifications package, and choose the email function you need. The step’s configuration panel displays the function’s inputs so you can map your Workflow Variables to them.
- Directly in Code Engine — Open the Domo Notifications package from the Code Engine repository list to review a function’s inputs and run it with test values.
Choose the Right Email Function
Start with the shape of your recipient list, then pick the narrowest function that fits. Choosing the most specific function keeps your Workflow readable and its configuration minimal.Understand the Common Inputs
Every function in the package shares the same set of optional inputs, described once here. Each function’s reference table below lists them again so that each table stands on its own.Note: A file ID is the numeric ID of a file stored in Domo, such as a file produced by an earlier step in your Workflow. Use
attachment for a single file and attachments for several.Review the Email Functions
Each function below leads with the goal it serves, the recipient types it accepts, its full list of inputs, and its return value. TheType column uses Code Engine data types; a [] suffix means the input is a list of that type.
sendEmailToPerson
Sends an email to a single Domo user in your instance. For example, email the assigned reviewer the moment a request lands in an approval Workflow. Best for: A clean, minimal call when you already have one specific Domo user in mind and don’t want to manage lists.
Output:
true if the email sent successfully, false otherwise.
sendEmailToPeople
Sends the same email to a list of Domo users at once. For example, notify every member of a project team when a DataSet they depend on finishes refreshing. Best for: Sending to several known Domo users in your instance without building each recipient by hand.
Output:
true if the email sent successfully, false otherwise.
sendEmailToGroup
Sends an email to every member of a single Domo Group. A Domo Group is a pre-defined collection of users managed in your instance, similar to a distribution list. For example, email the entire Finance Group when a month-end report publishes. Best for: Reaching recipients who are already organized into a Group, so you don’t have to maintain an individual user list.
Output:
true if the email sent successfully, false otherwise.
sendEmailToGroups
The multi-Group version ofsendEmailToGroup. Sends the same email to every member across multiple Domo Groups at once. For example, email both the Finance and Operations Groups when a shared budget updates.
Best for: An audience that spans several pre-defined Groups in Domo.
Output:
true if the email sent successfully, false otherwise.
sendEmailToListOfEmails
Sends the same email to a plain list of email addresses by looping through the list. For example, send a status summary to a fixed set of internal addresses that aren’t tied to Domo Groups. Best for: A simple list of email addresses when you want to send the same message to all of them.
Output: None.
sendExternalEmail
Sends an email to recipients outside your organization, but only to addresses whose domain has been pre-approved in your instance’s authorized domains list. It automatically filters out any recipients whose domains aren’t on the allowlist, protecting against accidental messaging to unauthorized parties. For example, send an order confirmation to a customer’s email address while guaranteeing that messages only reach approved external domains. Best for: Emailing people outside your organization when you need the safety of domain allowlisting.
Output:
true if the email sent successfully, false if it failed or no recipients had authorized domains.
Note: Recipients whose domains aren’t on your instance’s authorized domains list are removed silently, without an error. Confirm that every domain you intend to reach is on the allowlist. Contact your Domo account team to review or update your authorized domains.
sendEmailToAnyEntity
A flexible, all-in-one function that lets you mix and match any combination of raw email addresses, individual Domo users, and Domo Groups in a single send. For example, email a project’s owner, the wider stakeholders Group, and an external auditor’s address in one request. This makes it one of the most flexible email functions in the package and an ideal choice when your recipient list is mixed or comes from different sources. Best for: A recipient list that combines addresses, users, and Groups, or one assembled from several different sources.
Output:
true if the email sent successfully, false otherwise.
sendEmail
The core function that all other email functions rely on. It sends a styled, formatted email to one or more recipients and supports email addresses, Domo users, and Domo Groups at the same time, wrapping your message in an HTML layout automatically. For example, build a single notification step that reaches a support address, an on-call Domo user, and an escalation Group together. Best for: Full control over a mixed recipient list, or building your own recipient logic on top of the function every shortcut is based on.
Output:
true if the email sent successfully, false if it failed.
FAQ
Which email function should I use?
Which email function should I use?
Start with the shape of your recipient list and pick the narrowest function that fits, using the Choose the Right Email Function table. Use a focused function such as
sendEmailToPerson or sendEmailToGroup when your recipients are all one type, and sendEmailToAnyEntity or sendEmail when the list is mixed.Do my recipients need Domo accounts?
Do my recipients need Domo accounts?
It depends on the input. The
person, people, group, and groups inputs (and their sendEmail equivalents) reference Domo users and Domo Groups in your instance, so those recipients must exist in Domo. The email-address inputs—to, recipientEmail, and recipientEmails—accept any address and don’t require a Domo account.How do I email recipients outside my organization?
How do I email recipients outside my organization?
Use
sendExternalEmail. It sends only to addresses whose domain is on your instance’s authorized domains list and silently filters out the rest. Contact your Domo account team to review or update your authorized domains.How do I attach a file?
How do I attach a file?
Pass a Domo file ID to the
attachment input for a single file, or a list of file IDs to the attachments input for several. A file ID is the numeric ID of a file stored in Domo, such as one produced by an earlier step in your Workflow.How do I know whether the email sent?
How do I know whether the email sent?
Most functions return
true if the send succeeded and false if it failed, so your Workflow can branch on the result. The exception is sendEmailToListOfEmails, which returns nothing. If you need confirmation of success, use sendEmailToPeople or sendEmailToAnyEntity instead.Can I format the email body with HTML?
Can I format the email body with HTML?
Yes. The
body input supports HTML, and the function wraps it in Domo’s styled email layout so every message arrives in the same clean, consistent format.