StableGuide
Send a confirmation email
Goal: whenever an order, booking or request is saved, the person who submitted it receives a confirmation email with the details.
Send a confirmation email
Goal: whenever an order, booking or request is saved, the person who submitted it receives a confirmation email with the details.
Data needed
An entity with an email field (type Email) holding the recipient — for example Orders with Customer Email, Number and Total. Email delivery must be configured for the app (see Before you start).
Before you start: email delivery
- Emails are sent through Resend. Add a secret named
RESEND_API_KEYin Settings → Environment & secrets for Production (and Staging if you test there). If the platform has its own key configured, apps may use that instead. - In local development without a key, emails are not delivered; they are written to the dev outbox (
/dev/outbox) where you can read them. - The sender address is the platform's configured From address.
Step-by-step configuration
- Logic → Workflows → New workflow → When a record is created → send email, entity Orders. The preset picks the entity's first email field as the recipient.
- Open the Send email step and set: - To: Current record › Customer Email. - Subject:
Order {{record.number}} confirmed. - Body (blank lines start new paragraphs):
Example
Hi {{record.customer_name}},
Thanks for your order {{record.number}}. The total is {{record.total}}.
We'll email you again when it ships.- Name the workflow Order confirmation, keep it On.
- Click Test run, pick a test order and check your inbox (or the dev outbox). The step output shows
{ "to": "…", "status": "sent" }.
Resulting behaviour
- The email is sent on the server right after the record is saved, regardless of who created it: a public form, a signed-in customer, staff in the data editor or another workflow.
- Subject is limited to 200 characters; the body is plain text turned into paragraphs in a simple branded layout. HTML is not interpreted.
- Failures (invalid address, provider error) mark the run failed and show the reason in Run history. The record itself is still saved.
Variations
- From a button instead of a workflow: add the Send email action to a button's onClick or a form's onSuccess. Note the limits for actions: visitors who are not signed in may only email a fixed address (so a public contact form can email you, but not the visitor), and emails from actions are rate-limited per user (20 per hour signed in, 5 per hour anonymous). Workflows have no such restriction.
- Copy to your team: add a second Send email step with a fixed To address. One step sends to one address.
- Send only when confirmed: use A record is updated with Only when Status changes and Only if Status is "Confirmed", or create the automation from Logic → Pipelines.
- Different wording per service: use a Branch step with one case per service and a Send email step on each path.
Common mistakes
- The recipient field is empty on some records: the step fails with Invalid recipient "". Make the field required on your forms, or add an If / else (Customer Email is not empty) before the email step.
- Writing
{{record.Customer Email}}with the label. Templates use the field key (customer_email); the data picker inserts the right one. - Expecting attachments or HTML templates: not available yet. Include a link to a page of your app instead.