n8n Integration
n8n is a popular open-source workflow automation platform. The n8n-nodes-nornweave community node lets you integrate NornWeave into your n8n workflows for email automation.
Installation
From n8n Community Nodes
- Go to Settings > Community Nodes
- Click Install
- Search for
@nornweave/n8n-nodes-nornweave - Accept the risks and click Install
Manual Installation (Self-hosted n8n)
npm install @nornweave/n8n-nodes-nornweaveThen restart your n8n instance.
Setting Up Credentials
- In n8n, go to Credentials > Add credential
- Search for “NornWeave API”
- Enter your configuration:
| Field | Description | Example |
|---|---|---|
| Base URL | Your NornWeave instance URL | http://localhost:8000 |
| API Key | Optional authentication key | nw_key_... |
- Click Save - n8n will test the connection
Available Nodes
NornWeave (Action Node)
Perform operations on your NornWeave instance:
Inbox Operations
- Create: Create a new inbox with a custom email username
- Delete: Remove an inbox and all its data
- Get: Retrieve inbox details
- Get Many: List all inboxes with pagination
Message Operations
- Get: Retrieve a specific message
- Get Many: List messages in an inbox
- Send: Send an outbound email (Markdown supported)
Thread Operations
- Get: Retrieve a conversation thread with all messages
- Get Many: List threads in an inbox
Search Operations
- Query: Search messages by content
NornWeave Trigger
Trigger workflows when email events occur:
| Event | Description |
|---|---|
email.received | New inbound email arrived |
email.sent | Outbound email accepted |
email.delivered | Email delivered successfully |
email.bounced | Email bounced (hard fail) |
email.opened | Recipient opened email |
email.clicked | Recipient clicked a link |
Webhook Configuration
The NornWeave Trigger node receives events via webhooks. You need to configure your email provider to forward events to the n8n webhook URL.
Step 1: Get the Webhook URL
- Add a NornWeave Trigger node to your workflow
- Select the events you want to listen for
- Click Listen for Test Event to see the test URL
- For production, use the Production URL (visible when workflow is saved)
Step 2: Configure Your Email Provider
Mailgun
- Go to your Mailgun dashboard → Sending → Webhooks
- Add a new webhook pointing to your n8n webhook URL
- Select the events to forward
SendGrid
- Go to SendGrid → Settings → Mail Settings → Event Webhook
- Enable the webhook and enter your n8n URL
- Select the events to track
AWS SES
- Create an SNS topic for SES notifications
- Subscribe your n8n webhook URL to the SNS topic
- Configure SES to publish events to the SNS topic
Resend
- Go to Resend dashboard → Webhooks
- Add a new endpoint with your n8n URL
- Select the events to receive
Example Workflows
AI-Powered Auto-Reply
Automatically respond to support emails using AI:
[NornWeave Trigger]
↓ (email.received)
[IF] Subject contains "support"
↓ (true)
[NornWeave] Get Thread
↓
[OpenAI] Generate reply based on thread context
↓
[NornWeave] Send Message (reply_to_thread_id)Lead Capture to CRM
Capture inbound emails and create CRM records:
[NornWeave Trigger]
↓ (email.received)
[NornWeave] Get Message
↓
[OpenAI] Extract contact info from email
↓
[HubSpot/Salesforce] Create ContactBounce Notification
Alert your team when emails bounce:
[NornWeave Trigger]
↓ (email.bounced)
[Slack] Post message to #email-alerts
↓
[NornWeave] Get Thread
↓
[Notion] Add to bounced emails databaseScheduled Inbox Digest
Send a daily summary of inbox activity:
[Schedule Trigger] (daily at 9am)
↓
[NornWeave] Get Many Threads (limit: 50)
↓
[OpenAI] Summarize thread subjects and status
↓
[Email] Send digest to teamTips
Use Thread Context for AI
When building AI-powered workflows, use Thread > Get to retrieve the full conversation history. This gives AI models the context they need to generate appropriate responses.
Filter Events
Configure the trigger to only listen for events you need. This reduces noise and improves workflow efficiency.
Handle Errors
Add error handling nodes to manage cases where:
- The NornWeave instance is unreachable
- A resource (inbox, message) is not found
- Rate limits are hit
Troubleshooting
Connection Failed
- Verify your Base URL is correct and accessible from n8n
- Check that NornWeave is running (
/healthendpoint should return OK) - If using Docker, ensure network connectivity between containers
Webhook Not Triggering
- Confirm the webhook URL is correctly configured in your email provider
- Check that the workflow is activated (not just saved)
- Verify the event type is selected in the trigger node
- Test with the “Listen for Test Event” feature
Connection Errors
- Verify the Base URL in your credential settings points to the running NornWeave instance
- API key authentication is not yet enforced; leave the API Key field empty or set any value