Send email from template via Pantarey (internal)
The service task "Send email from template via Pantarey (internal)" renders subject and HTML content from a Handlebars template and sends the email through the Pantarey internal service with the sender benachrichtigung@pantarey.io. Recipients can only be users of the own Pantarey account. The service suits notices to staff, not customers or other external parties. Without a template, with ready-made HTML, Send email via Pantarey (internal) does the same.
Technical name prio_sendCustomEmailTemplate · Category in the "Select service task" dialog: Email
When is this service used?
- Report an incoming request: At Musterfirma GmbH the responsible employee is informed when a training request arrives, with company, topic and preferred date from the request.
- Reminders to staff: A timer detects that a quote has been open for 14 days and notifies sales.
- Status to the team: After a goods receipt the hardware manager gets a summary of the items.
Which email service?
| Service | Sender | Recipients |
|---|---|---|
| Send email from template via Pantarey (internal) – this page – and Send email via Pantarey (internal) | benachrichtigung@pantarey.io |
users of the own Pantarey account only |
| Send email to external recipients (own domain) | own domain, approved for the account | any |
| Send email (via SMTP) and from template | own mail server, any address the server allows | any |
| Send email (Microsoft Graph) | Microsoft 365 account | any |
Prerequisites
- Every recipient address has to belong to a user of this Pantarey account. Unknown addresses cause no mail to be sent at all.
- Attachments together must not exceed about 5 MB.
- No credentials needed; this service does not resolve secrets.
Input
| Field | Type | Required | Meaning |
|---|---|---|---|
subject |
string with Handlebars | yes | Subject template, rendered with contentData |
contentTemplate |
string with Handlebars | yes | HTML template for the content; has to be text, an object aborts |
contentData |
object | no | Data for the placeholders; default {} |
toRecipients |
string or string array | yes | Recipients; each address is trimmed, lower-cased and checked against the users of the account |
attachments |
file object or array | no | Attachments {referenceId, filename, contentType} from the Pantarey storage |
All Handlebars helpers are available for the templates. The HTML is sent as rendered; it is not embedded in the Pantarey system template.
{
"subject": "New training request from {{request.company}}",
"contentTemplate": "<p>Hello {{assignee.firstName}},</p><p>{{request.company}} requests a training on \"{{request.topic}}\" for {{request.participants}} people. Preferred date: {{toGermanDate request.date}}.</p>",
"contentData": { "request": request, "assignee": assignee },
"toRecipients": [ assignee.email ],
"attachments": [ request.attachment ]
}
Output
{ "status": 200 }
If a recipient address is not a user of the account, { "status": 400, "message": "One or more users do not exist" } is returned and nothing is sent. The result is stored under the result path; if it is not needed, switch on Discard result.
Errors and behavior
- Unknown recipient returns
{status: 400, message}and the process continues without any mail having been sent. If the instance should abort in this case, putstatus = 200 ? $ : $error(message)in the output expression. - Attachments over about 5 MB throw:
Attachments too large for the internal email service (~x MB encoded, limit ~5 MB). Use an external email task (Office/SMTP) for larger files. - Missing subject or content is rejected only by the delivery service, with the uninformative message
Invalid sendGenericEmail payload. - Technical errors of the delivery service throw
template-server sendGenericEmail failed: …. - Every thrown error continues via an error boundary event; without one the instance ends in error with a resume point and an error email to the process owner.
- Retries: Up to three attempts only for transient technical errors; a mail may then arrive twice. Time limit 900 seconds. The dry run does not send any mail.
Example
At Musterfirma GmbH a training request arrives via a form. A database step reads the responsible employee by topic; the message contains request (company, topic, participants, date, attachment) and assignee (first name, email).
- Input expression as above.
- Output expression
status = 200 ? $ : $error(message), result pathnotification. - Output
{ "status": 200 }. Ifassignee.emailis not a user of the account, the instance aborts withOne or more users do not exist. - Next step: A user task "Process request" for the same employee.
Frequently asked questions
Can this send a mail to a customer?
No. Recipients have to be users of this Pantarey account. For customers and other external parties: Send email to external recipients (own domain), SMTP or Microsoft Graph.
Can the sender or the reply address be changed?
No. The sender is always benachrichtigung@pantarey.io, no reply address is set.
One recipient was wrong, yet the process completed.
The step then returns status 400 instead of an error, and nothing is sent to anyone. With the output expression status = 200 ? $ : $error(message) this becomes an abort.
Next step
Send email to external recipients (own domain): the route for customers and partners, with a sender of your own domain.