How to Connect n8n to SendGrid: Automate Transactional & Marketing Email (2025)
Email is still the highest-ROI channel most businesses have — but only if the right message goes out at the right moment. SendGrid is built to deliver email reliably at scale; n8n is built to decide when and why that email should fire. Put them together and you get event-driven email: messages triggered by real business events instead of a marketer clicking "send."
This guide walks through connecting n8n to SendGrid and building the kind of automated sequences that quietly recover revenue and onboard customers while you sleep.
What you'll need
- An n8n instance
- A SendGrid account with a verified sender or authenticated domain
- A SendGrid API key with Mail Send permission
Step 1 — Create and store the API key
In SendGrid, go to Settings → API Keys and create a key with, at minimum, Mail Send access (grant more only if you'll manage contacts or templates via API). In n8n, add it as an HTTP Header Auth credential (Authorization: Bearer YOUR_KEY) or use the dedicated SendGrid node credential where available.
Step 2 — Send your first email
Add a SendGrid node (or an HTTP Request to https://api.sendgrid.com/v3/mail/send). Set the from address to your verified sender, map the recipient, subject, and body. Test it against your own inbox before wiring it to anything real.
Step 3 — Use dynamic templates
Hard-coding HTML in n8n gets ugly fast. Instead, build a Dynamic Template in SendGrid, then pass template_id and a dynamic_template_data object from n8n. Now your designers own the look and your workflow just supplies the variables — first name, order total, reset link, and so on.
Step 4 — Trigger from real events
The magic is the trigger. Instead of a manual send, start your workflow from a webhook, a CRM update, a form submission, or a payment event. When the event fires, n8n assembles the data and SendGrid delivers the message.
⚡ Skip the build — get the ready-made template
Turn a failed Stripe charge into an escalating, perfectly-timed recovery email sequence that wins the payment back on autopilot.
Get the "Stripe Payment Failed → Escalating Recovery Email + Slack Alert" template on Gumroad →
Step 5 — Build an escalating sequence
A single email is fine; a sequence wins. Take failed-payment recovery as the canonical example: the moment Stripe reports a failed charge, n8n sends a friendly "your card didn't go through" email immediately, waits two days and sends a firmer reminder if it's still unpaid, then waits again before a final notice — each step conditional on whether the invoice is still open. Every message goes out through SendGrid; every decision is made in n8n. Add a Slack alert on the final step so your team knows which accounts to call.
Step 6 — Handle events and bounces
Point SendGrid's Event Webhook back at an n8n webhook to capture opens, clicks, bounces, and spam reports. Feed that data into your CRM or a Google Sheet so you can suppress hard bounces automatically and keep your sender reputation clean.
Deliverability checklist
- Authenticate your domain (SPF, DKIM, DMARC) — SendGrid walks you through it and it dramatically improves inbox placement.
- Separate transactional and marketing traffic onto different subusers or IPs so a promo blast can't hurt your receipts.
- Always include an unsubscribe link on marketing mail; use SendGrid's suppression groups to stay compliant.
What you can build next
Once SendGrid is wired into n8n, every event in your stack becomes a potential email: welcome series on signup, review requests after delivery, win-back campaigns on inactivity, and internal digests for your team.
Ready to automate?
You can wire this together node by node — or install a battle-tested version in minutes. The Stripe Payment Failed → Escalating Recovery Email + Slack Alert template comes fully built, documented, and ready to import into your n8n instance.
Get this template on Gumroad →
One-time purchase. Lifetime updates. Works on n8n Cloud and self-hosted.