Summary
"Schedule Email" is a type of step you can use when configuring Custom Automations
It enables you to automatically send emails to your customers/prospects
You can use the other Custom Automation features in combination with Schedule Email steps - e.g. you choose what triggers the Automation, you can generate content using AI, you can add a Human-in-the-Loop (HITL) check to approve emails before they are sent, and so on
Dynamic references / replacement codes / merge tags can be used to automatically personalize emails based on a single template
There is an option for the sent email to be a threaded reply rather than a separate sent email
Who is this article for?
Planhat Users who are building Custom Automations for their organization (e.g. Tech/Ops)
Series
This article is part of our extensive series on Automations. The most relevant articles are:
Article contents
Introduction
While historically you may have used Sequence Workflows to automate sending emails to your End Users (people who are your customers or prospects) via Planhat, you can now automatically email End Users via Custom Automations, using the "Schedule Email" step type.
Key features of sending emails via Automations:
You can use replacement codes (dynamic references) to bring data from other Automation steps into the email
Optionally, a "Use AI" step in the Automation can draft the email for you
Human-in-the-Loop (HITL) functionality gives you the opportunity to review/revise an email draft before it's sent out
You can even use the Schedule Email step to reply to an email in a thread, rather than sending a separate/individual email
We go through each of these points - and more - in this article.
This is a technical deep-dive article
Read on if you'd like to learn about Schedule Email steps - a type of step you can use when configuring Custom Automations. Ensure you read our article on Custom Automations before this one, so you are familiar with the context of where these Schedule Email steps can be used.
If you would simply like a general introduction to Automations, check out our overview article here.
What are Schedule Email steps?
A "Schedule Email" step is a type of action step that you can include when configuring a Custom Automation.
This step type is used to automatically send emails to your customers/prospects. These emails are like any other email in Planhat - e.g. they're sent via the Gmail or Outlook integration, they're saved in Planhat as a record of the Conversation model, you can view them on the relevant Company Full-Page Profile, and so on.
You define what triggers each Custom Automation - and therefore the email being sent via the Schedule Email step - meaning you can act automatically in response to any of your Planhat data.
You can use both Automation replacement codes (dynamic references) and email merge tags in the Schedule Email step, so that although you write/select a template email within the step, it can be automatically customized with values such as the recipient's name in each Automation run.
A "Use AI" step in the Automation can generate the contents of the email. This is commonly used in combination with Human-in-the-Loop (HITL) functionality, which pauses the Automation run to allow you (a named approver) to review/edit the contents and then choose to proceed - sending the email, in this case. You can see an example of this in the screenshot below, and we also go through it in further detail in one of the worked examples later in this article.
🚀 Tip
You apply the Human-in-the-Loop (HITL) to the Schedule Email step, as shown above, rather than on the Use AI step. This means that the Automation run will pause for review after the AI step has generated the content, but before the email using that content has been sent.
📌 Important to note
Despite the name "Schedule Email" step, the email will be automatically sent, without approval, unless you set up HITL. Similarly, it won't be scheduled to send in the future (unless you have built timing into the Automation via a "Wait" step).
Schedule Email steps also have options for email engagement tracking (email analytics), and replying within an email thread. We describe the latter option in more detail in one of the worked examples later in this article.
Why use Schedule Email steps?
Schedule Email steps are a way for you to automatically send emails to your End Users (people who are your customers or prospects).
Although there are many ways in which you can send emails via Planhat, the particular advantages of using Custom Automations to send emails are:
Automating the process of sending emails removes manual work, enabling you to save time and act quicker
Custom Automations are incredibly flexible, for example enabling you to trigger the Automation (and therefore send the email) in response to your choice of data change
Custom Automations have many other built-in features, which you can utilize as part of this automated email sending - for example:
The "Use AI" step type, which can generate email drafts for you
The Human-in-the-Loop (HITL) feature, which gives you the opportunity to review and adjust content (e.g. checking an AI-generated email draft before it's sent out, in this case)
The ability to build advanced pathways with branching and "Wait" steps
Example use cases could be:
When an Invoice is created ...
... send an email ...
... wait for 4 weeks ...
... branch: if unpaid, send a reminder email; if paid, don't send an email
After a meeting with a Company (saved in Planhat as a new Conversation record of a particular Conversation Type) ...
... use an AI step to analyze the call recording transcript, and create a draft email summarizing key points discussed and action items ...
... have a HITL check to review the generated content, and edit it as necessary (set up as HITL on the Schedule Email step) ...
... then approve the Schedule Email step to proceed and send the email to the End User attendees
How to set up Schedule Email steps
📌 Important to note
At time of writing, access to HITL in Automations is controlled via a toggle switch within Planhat Labs (in the Help menu): "Email Action in Automations". Please reach out to your Planhat representative if you don't currently have access to this feature but would like to enable it.
When you are configuring a Custom Automation (in the App Center), you will see "Schedule Email" as an available step type (in the "Communication" category).
Let's go through the configuration within a Schedule Email step itself.
Sender and recipients
At the top of the configuration panel, you define who the email will be from ("Sender") and who it will be sent to ("Recipients").
These boxes start as dropdown selection menus as default, for example:
As you can see, you can select named Users you have access to (yourself and email addresses with public email account usage), Account Owner/CoOwner (dynamic references), and Email Automation Provider email addresses if applicable.
However, if you click on an icon of an arrow in a circle, it will change that field into a text entry box where you can enter a replacement code (dynamic references; sometimes called merge tags, not to be confused with standard email merge tags):
🚀 Tips
In the specific example above, it's a Company that triggers the Automation, and "owner" is a system (standard/default) field on the Company, while "Billing contact (EU field)" is a custom field on the Company model of type "End User". You could also use a Company field of type "email" in this case
(After clicking on the circle arrow) if you start typing
<<in either a Sender or Recipients box, you will see a dropdown menu of replacement codes to choose from. As you continue typing (e.g.<<objectin this case), it will narrow down the available optionsFor more about these dynamic references / replacement codes / merge tags, see our separate article here
📌 Important to note
If you enable "Reply to an email" within the "Options" of the Schedule Email step, the "Recipients" box here changes to "Additional recipients", and you define the main recipients within the "Reply to" box that appears - we'll go through later in this article.
Email content
After you have set the sender and recipients, you next configure the actual email content - the email subject and body.
This is similar to the process of creating/sending emails elsewhere in Planhat.
For example, you have the option to apply an existing email template ...
... and you can use email merge tags:
In addition to this, you can use Automation replacement codes (dynamic references) within the email (both the subject/body). This is particularly useful if you want to populate the email with data from earlier in the Automation - e.g. text generated from an AI step prior to the Schedule Email step. For example:
🚀 Tips
The replacement codes in the example screenshot above refer to the previous step (a "Use AI" step), in this case called
s-LKq. Remember to always refer to the unique step name in your own AutomationIf you start typing
<<in either the subject or body boxes, you will see a dropdown menu of replacement codes to choose from. As you continue typing (e.g.<<s-LKQin this case), it will narrow down the available options
Options
Underneath the email text, next in the Schedule Email step configuration panel is "Options". Here you will find a series of checkboxes, which are unselected by default, but you can choose to enable.
Email engagement tracking
The first two options - "Track open rate" and "Track click rate" - are for email engagement tracking (email analytics), which you can read about in our series of articles starting here.
Reply to an email
The third option is "Reply to an email". If you select this, you can send this email as a reply in an existing thread, instead of having separate emails. We go through this in a worked example later in this article.
📌 Important to note
For replies to work, the original email must be synced into Planhat first
Make sure the Inbox and Sent labels/folders (and any other relevant labels/folders) are being synced into Planhat
When you select the "Reply to an email" checkbox, this opens up another two fields for you to complete:
"Reply to" is a dropdown menu, where you can choose between "Sender" (of the original email - this is the default option) and "All recipients"
You will note that the standard "Recipients" specified higher up the configuration panel changes to "Additional recipients"
In the "Email to reply to" box, you need to specify the ID of the email you want to reply to
You can use a replacement code (dynamic reference) to refer to whichever email is relevant to the Automation run - so, for example, if the trigger of the Automation is a Conversation, and you want the Schedule Email step to reply to that email, you would use
<<object._id>>You can alternatively directly specify the ID of a Planhat-sent email
Worked examples
Here we'll go through a couple of simple proof-of-concept illustrated examples of Custom Automations with Schedule Email steps, to show you what some of the technical options can look like in practice.
Example 1: "Use AI" and Human-in-the-Loop (HITL)
Let's take a basic example involving an AI step and HITL functionality, in combination with the Schedule Email step.
In this example, the Automation has been built to send an automated billing email to a billing contact (End User) at a Company when a bill is due.
Once the Automation is triggered (from Company data), we use a "Use AI" step to generate a draft email to send out.
Click the image to view it enlarged
While you can read more about the AI step type more generally in our separate article here, some key points to point out about our example are:
We've used replacement codes (dynamic references) within the prompt, e.g. to specify what data it should use (remembering that "object" is the record that triggered the Automation)
Within the prompt, as well as objectives and data set etc., we have defined exactly what we want the output of the step to be. For example:
Output:Write a professional email in rich text format. The email should state that the bill is due by the end of the month. Do not include markdown. Headlines should be marked in bold format, as **example** will NOT work. HTML is used only. Do not use emojis as this is a professional email.Make sure you are providing the output in the following format (JSON)"title" - "appropriate subject of email and task""body" - "appropriate email body"In this example, we have specified that the "Output Format" is "Structured (JSON)", as shown in the screenshot above. We have also clicked on the "Configure Schema" button (shown in the screenshot above) and specified custom properties of "title" and "body" (shown in the screenshot below), matching those stated in the prompt's output
Next is the Schedule Email step. In our example, it looks like this:
Some important points to note are:
Once again, we have used replacement codes (dynamic references)
Key examples of this are
<<s-LKq.title>>and<<s-LKq.body>>s-LKqis the specific name of the previous step in this particular Automation - the AI step we have just gone throughNote the references to
titleandbodythat we just specified in the AI step
We've also used an email merge tag (in the square brackets)
We have enabled Human-in-the-Loop (HITL) on this step, as you can see by the green check mark (tick) in the top-right corner. Scrolling down the email configuration panel, you can see we have chosen an approver, and set the Automation to halt (pause) at this point in the run until it's approved
Let's take a look at what the HITL approval process looks like, once the Automation has been triggered to run. As described in the main HITL article, the approver will receive a notification to review the contents of the step before it proceeds - in this case it's the email draft before it's sent out.
Click the image to view it enlarged
The approver checks the draft details - this is particularly important and recommended when the draft has been generated by AI - and can edit it here, changing wording if desired, before clicking "Approve" to allow the Automation run to continue and the email to be sent out.
Example 2: "Reply to an email"
Let's take a look at how the "Reply to an email" option works, in a basic proof-of concept Custom Automation.
Emails are saved in Planhat on the Conversation model. This example Automation is set up to be triggered when a Conversation is created in Planhat of type "email", and we have specified a particular email subject in the conditions.
In the Schedule Email step, we have selected the "Reply to an email" checkbox.
In the fields that opened up below this checkbox, we have set:
The "Reply to" to be the "Sender"
We do not need to set a recipient (in the now-called "Additional recipients" box) higher up the step configuration panel
The email to be replied to is
<<object._id>>- this replacement code (dynamic reference) refers to the email (Conversation) record that triggered the Automation run
Here is the whole Schedule Email step:
When an appropriate email is synced into Planhat and triggers the Automation, the email we have defined (in the "Email Content" of) the Schedule Email step will be sent, replying to the trigger email in a thread. You can see this thread in both in Planhat and the external email platform - example screenshots below.
📌 Important to note
For replies to work, the original email must be synced first
In the example above, once an email that meets the conditions is synced into Planhat, it triggers the Automation and thus the reply is sent
Make sure your Inbox and Sent labels/folders (and/or whichever labels/folders the relevant emails will be under) are being synced to Planhat
For more on general email syncing, see here
More tips and troubleshooting
In addition to the tips and notes shared in the gray boxes throughout this article ...
As with any other emails in Planhat, you can view emails sent via Automations in various places in Planhat, e.g.:
Data Table Pages built on the Conversation model (and filtered for Type = email to be more specific)
Company and End User Full-Page Profiles
For troubleshooting any issues, the main places for you to view error messages - indicating that you may not have set up the Automation correctly - are as follows:
Like other Automations, you can dive into the Automation run logs, clicking into any failed runs and then into specific failed steps to see the details
Email Manager - check the "Outgoing - need action" tab to see which emails have been blocked and why




























