Skip to content
← All documentation

Dashier docs

Send email when a new record is created

Configure a source-level record-created hook, reusable plain-text email template, fixed recipient, optional reply-to field, and server-side Resend delivery.

Dashier can create an email delivery when a row is added to a data source. The hook listens for record.created events from the dashboard or REST API. CSV/JSON imports also enqueue one event per inserted row; an import request attempts up to 25 deliveries, and remaining items can be processed from the source’s Email hooks tab.

1. Define the contact source

Create a data source for the submissions, for example Contact submissions. Add typed fields such as name (text), email (email), subject (text), and message (textarea). Use the field keys in your form payload and email template. Avoid collecting information that your workflow does not need.

2. Create a plain-text email template

Open the source’s Email hooks tab and add a template. Use a subject such as New website enquiry from {{name}} and a body that includes the fields your team needs to read, for example the sender’s name, email, subject, and message. Insert source field keys as {{field_key}}. Supported metadata variables are {{record.id}}, {{record.created_at}}, {{source.name}}, and {{source.slug}}. Dashier validates tokens against the source schema; the provider receives plain text, not HTML.

3. Configure the hook

Create a hook, choose the template, and enter a fixed recipient address controlled by your team. Optionally select an email-typed source field as reply-to. Row data cannot choose the recipient address, which prevents a public form from turning this hook into an arbitrary-recipient email relay. You can pause the hook before a bulk import.

4. Configure the email provider on the server

Dashier sends through the Resend Email API only after the deployment operator configures RESEND_API_KEY and RESEND_FROM_EMAIL as server-only environment variables. Verify the sender/domain in Resend first. Do not put the API key in a NEXT_PUBLIC_ variable, browser bundle, client form, source code, or version control. These values are not accepted or displayed by the Email hooks screen. If they are absent, deliveries are marked blocked and can be retried after configuration.

5. Submit the form through a server route

For an authenticated integration, configure the data source’s POST endpoint policy for Authenticated access and use a write-scoped API key. Keep the key in the website’s server environment. A server route on your website should validate the incoming contact fields and POST a JSON object to the source endpoint, for example /api/v1/contact-submissions, with the key in x-api-key. Do not send a Dashier API key from browser JavaScript. Configure an anonymous POST policy only if you intentionally want anyone to call it; rate-limit and validate that path separately.

After Dashier commits a valid row, it queues a delivery for each enabled hook and attempts the email without rolling back the row if the provider fails. The delivery screen shows status and a provider message identifier is retained for sent items; email body and recipient are not copied into the delivery log. Each hook allows at most 50 successful sends in a rolling hour. Delivery retries are manual, and Resend idempotency keys protect duplicate requests during the provider’s documented 24-hour window.

6. Test the whole workflow

Create one test record with a controlled email address, then review the delivery history. Check the provider’s dashboard for acceptance and confirm the sender’s domain is verified. Test missing or malformed field values and a paused hook. For imports, inspect the pending count and process additional batches of up to 25 from the Email hooks tab. Provider acceptance is not a guarantee that a recipient’s mailbox delivered or displayed the message.

See the contact-form walkthrough for a full server-route example. Dashier currently supports the record.created event and plain-text message templates; it does not provide arbitrary workflow code, HTML templates, attachments, or a configurable per-hook sender. Consult Resend’s email API documentation for provider requirements.