Skip to content

Powerful email automation for n8n using the Resend API πŸš€

License

Notifications You must be signed in to change notification settings

SilkePilon/n8n-nodes-resend

Repository files navigation


...

πŸ“§ Resend Node for n8n

npm version License: MIT

Powerful email automation for n8n using the Resend API πŸš€

Transform your email workflows with comprehensive Resend integration for n8n. Send emails, manage contacts, handle domains, and automate email campaigns with ease.


Note

ReadMe: This readme is subject to change with better docs in the upcomming week.

🎯 Features

  • πŸ“€ Email Operations - Send single emails, batch emails, schedule delivery
  • πŸ“Ž File Attachments - Support for binary data and remote URL attachments
  • πŸ‘₯ Contact Management - Create, update, delete contacts and audiences
  • 🌐 Domain Management - Verify domains, configure DNS settings
  • πŸ”‘ API Key Management - Create and manage API keys programmatically
  • πŸ“’ Broadcasts - Send newsletter campaigns to audiences
  • 🎣 Webhook Support - Receive real-time email events

πŸš€ Installation

Method 1: Via n8n Community Nodes (Recommended)

Detailed Instructions (with images)

  1. Open n8n Settings

    • Navigate to Settings β†’ Community Nodes
  2. Install the Package

    • Click Install a community node
    • Enter: n8n-nodes-resend
    • Click Install
  3. Restart n8n

    • Restart your n8n instance to load the new nodes
  4. Verify Installation

    • The Resend and Resend Trigger nodes should appear in your node palette

Method 2: Manual Installation

# Navigate to your n8n installation directory
cd ~/.n8n

# Install the package
npm install n8n-nodes-resend

# Restart n8n
# If using PM2: pm2 restart n8n
# If using Docker: docker restart n8n
# If running directly: restart your n8n process

Method 3: Docker Installation

Add this to your docker-compose.yml:

version: '3.8'
services:
  n8n:
    image: n8nio/n8n
    environment:
      - N8N_NODES_INCLUDE=n8n-nodes-resend
    # ... other configuration

Or use environment variable:

docker run -it --rm \
  -p 5678:5678 \
  -e N8N_NODES_INCLUDE=n8n-nodes-resend \
  n8nio/n8n

πŸ” Credentials Setup

Important

You need a Resend account and API key to use these nodes.

πŸ”‘ Configure Resend API Credentials
  1. Get Your API Key

    • Visit Resend Dashboard
    • Create a new API key with appropriate permissions
    • Copy the API key (starts with re_)
  2. Add Credentials in n8n

    • Go to Credentials β†’ Add credential
    • Search for "Resend API"
    • Paste your API key
    • Test the connection
    • Save the credential

[!TIP] Use different API keys for development and production environments


πŸ“š Available Nodes

🎬 Resend Action Node

The main node for performing Resend operations.

πŸ“§ Email Operations

Send Email

Send individual emails with rich content and attachments.

Key Features:

  • βœ… HTML and plain text content
  • βœ… File attachments (binary data or URLs)
  • βœ… CC/BCC recipients
  • βœ… Custom reply-to addresses
  • βœ… Email scheduling

Example Use Cases:

  • Welcome emails for new users
  • Invoice delivery with PDF attachments
  • Password reset notifications
  • Marketing campaigns

Send Batch Emails

Send up to 100 emails in a single API call for better performance.

Key Features:

  • βœ… Bulk email sending
  • βœ… Individual customization per email
  • βœ… Better rate limiting
  • ⚠️ No attachment support (API limitation)

Email Management

  • Retrieve Email - Get email details and status
  • Cancel Email - Cancel scheduled emails
  • Update Email - Modify scheduled emails
πŸ‘₯ Contact & Audience Management

Contacts

  • Create Contact - Add new contacts to audiences
  • Get Contact - Retrieve contact information
  • Update Contact - Modify contact details
  • Delete Contact - Remove contacts from audiences
  • List Contacts - Get all contacts in an audience

Audiences

  • Create Audience - Set up new email lists
  • Get Audience - Retrieve audience details
  • List Audiences - Get all your audiences
  • Delete Audience - Remove email lists
🌐 Domain & Infrastructure

Domain Management

  • Add Domain - Register new sending domains
  • Verify Domain - Check domain verification status
  • Get Domain - Retrieve domain configuration
  • Update Domain - Modify domain settings
  • Delete Domain - Remove domains

API Keys

  • Create API Key - Generate new API keys
  • List API Keys - View existing keys
  • Delete API Key - Revoke access keys
πŸ“’ Broadcast Campaigns
  • Create Broadcast - Set up email campaigns
  • Get Broadcast - Retrieve campaign details
  • Send Broadcast - Launch email campaigns
  • Update Broadcast - Modify campaign settings

🎯 Resend Trigger Node

Real-time webhook processing for email events.

πŸ“‘ Supported Events
  • email.sent - Email successfully sent
  • email.delivered - Email delivered to recipient
  • email.opened - Recipient opened the email
  • email.clicked - Link clicked in email
  • email.bounced - Email bounced
  • email.complained - Spam complaint received
  • contact.created - New contact added
  • contact.updated - Contact information changed
  • contact.deleted - Contact removed

πŸ’‘ Usage Examples

πŸ“§ Email with Attachments Example
# Example workflow: Send invoice email with PDF attachment
Workflow:
  1. HTTP Request Node (trigger)
  2. Code Node (generate invoice data)
  3. HTML/CSS to PDF Node (create PDF)
  4. Resend Node (send email with attachment)

Resend Node Configuration:
  - Resource: Email
  - Operation: Send
  - From: billing@yourcompany.com
  - To: {{ $json.customerEmail }}
  - Subject: Your Invoice #{{ $json.invoiceNumber }}
  - Attachments:
    - Type: Binary Data
    - Binary Property: data
    - Filename: invoice-{{ $json.invoiceNumber }}.pdf
πŸ”„ Automated Email Campaigns
# Example: Weekly newsletter automation
Workflow:
  1. Cron Trigger (weekly)
  2. Database Node (fetch newsletter content)
  3. Resend Node (create broadcast)
  4. Resend Node (send to audience)

Benefits:
  - Automated scheduling
  - Audience segmentation
  - Performance tracking
πŸ“Š Email Event Processing
# Example: Handle bounced emails
Trigger: Resend Trigger Node
  - Event: email.bounced
  
Actions:
  1. Database Node (log bounce)
  2. Resend Node (remove from audience)
  3. Slack Node (notify team)

⚠️ Important Notes

Warning

Attachment Limitations:

  • Maximum email size: 40MB (including attachments)
  • Attachments not supported with scheduled emails or batch operations
  • Some file types may be blocked by email providers

Note

Rate Limits: Respect Resend's API rate limits. Use batch emails for better efficiency.

πŸ“‹ API Limitations & Best Practices

Best Practices

  • βœ… Always verify your sending domains
  • βœ… Use appropriate API key permissions
  • βœ… Handle webhook events for better deliverability
  • βœ… Implement proper error handling
  • βœ… Monitor email metrics and bounce rates

Rate Limits

  • Single emails: Standard Resend rate limits apply
  • Batch emails: More efficient for bulk sending
  • API calls: Respect Resend's rate limiting

πŸ”§ Development

πŸ› οΈ Contributing & Development Setup
# Clone the repository
git clone https://github.com/your-repo/n8n-nodes-resend.git

# Install dependencies
npm install

# Build the project
npm run build

# Run linting
npm run lint

# Run tests
npm test

Project Structure

β”œβ”€β”€ credentials/
β”‚   └── ResendApi.credentials.ts
β”œβ”€β”€ nodes/
β”‚   └── Resend/
β”‚       β”œβ”€β”€ Resend.node.ts
β”‚       β”œβ”€β”€ ResendTrigger.node.ts
β”‚       └── icons/
└── package.json

🀝 Support

❓ Getting Help

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Built for the amazing n8n workflow automation platform
  • Powered by Resend email infrastructure
  • Inspired by the n8n community

Made with ❀️ for the n8n community

⭐ Star this repo | πŸ› Report Issues | πŸ’‘ Request Features

About

Powerful email automation for n8n using the Resend API πŸš€

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Contributors 18