SendGrid
Send transactional and marketing emails through SendGrid from your Spala flows.
SendGrid
The SendGrid addon integrates SendGrid's email delivery service into your Spala flows. Send transactional emails, use dynamic templates, and handle email notifications for user signups, order confirmations, password resets, and more.
Installation
1. Enable the SendGrid addon from the Addons panel 2. Enter your SendGrid API key in the addon configuration
Configuration
API Keys in the SendGrid dashboard.' },
Available Steps
Send Email
Sends an email to one or more recipients.
Send Template Email
Sends an email using a SendGrid dynamic template.
Example: Welcome Email
// Event trigger: "user.registered"
// Step 1: Send Email (SendGrid addon) // to: event.payload.email // subject: 'Welcome to Our Platform!' // html: '<h1>Welcome, ' + event.payload.name + '!</h1><p>We are glad you joined us.</p>'
Example: Order Confirmation with Template
// Database trigger on insert for the "orders" table
// Step 1: Database Query - Get order details with items // SELECT o.*, json_agg(oi.*) as items FROM orders o // JOIN order_items oi ON oi.order_id = o.id WHERE o.id = trigger.newRow.id
// Step 2: Send Template Email (SendGrid addon)
// to: vars.order.customer_email
// templateId: 'd-abc123def456'
// dynamicData: {
// customerName: vars.order.customer_name,
// orderId: vars.order.id,
// total: vars.order.total,
// items: vars.order.items
// }
Dynamic templates are created in the SendGrid dashboard. They support Handlebars syntax for variable substitution, conditionals, and iteration, giving you full control over email layout.
The sender email address must be verified in SendGrid. Unverified sender addresses will cause emails to fail. Verify your domain or individual sender in the SendGrid dashboard under Settings > Sender Authentication.
Your SendGrid API key from Settings > API Keys in the SendGrid dashboard. The verified sender email address (e.g., [email protected]). The sender display name (e.g., "My App"). Recipient email address or array of addresses. Email subject line. HTML email input. Plain text email body (fallback for clients that do not render HTML). Recipient email address or array of addresses. The SendGrid dynamic template ID (starts with d-). Object of key-value pairs to populate template variables. Addons Overview /addons Browse available addons Installing Addons /addons/installing Enable and configure addons in your project