Send Publiq emails from an n8n workflow

Use the n8n HTTP Request node to call the Publiq API from any automation workflow — no code.

Configure an HTTP Request node: method POST, URL https://api.publiq.digital/v1/emails, header Authorization: Bearer {{ $env.PUBLIQ_API_KEY }}, and JSON body:

{
  "from": "you@yourdomain.com",
  "to": "{{ $json.email }}",
  "templateKey": "welcome-email",
  "variables": { "first_name": "{{ $json.name }}" }
}

Combine with any n8n trigger node (webhook, cron, DB) to send emails from any event — great for no-code flows.

Best practices

  • Always call Publiq from the server — the API key goes in the Authorization header, never on the client.
  • On 429/5xx, retry with exponential backoff (respect Retry-After).
  • Prefer templateKey over inline HTML to keep content versioned.
  • Handle errors via the response error.code field — see Errors.
  • Send from a verified domain — see Domains.

See also

Send Publiq emails from an n8n workflow — Publiq Docs