Community node for n8n to interact with JMAP email servers (RFC 8620/RFC 8621).
Compatible with:
- Apache James
- Twake Mail by LINAGORA
- Stalwart Mail Server
- Fastmail
- Any JMAP-compliant email server
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-jmap - Agree to the risks and click Install
cd ~/.n8n/nodes
npm install n8n-nodes-jmapThen restart n8n.
This node supports three authentication methods to connect to JMAP servers.
The simplest method using email and password directly.
Configuration:
- Create a new JMAP API credential
- Set Authentication Method to
Basic Auth - Fill in:
- JMAP Server URL:
https://jmap.example.com/jmap - Email:
user@example.com - Password: Your password
- JMAP Server URL:
Use case: Development, testing, or servers without OAuth2 support.
Use a pre-obtained access token (e.g., from an external OAuth2 flow).
Configuration:
- Create a new JMAP API credential
- Set Authentication Method to
Bearer Token - Fill in:
- JMAP Server URL:
https://jmap.example.com/jmap - Access Token: Your JWT or access token
- JMAP Server URL:
Use case: Integration with existing authentication systems, tokens obtained via scripts or other workflows.
Full OAuth2 Authorization Code flow with PKCE (Proof Key for Code Exchange). This is the recommended method for production as it provides:
- Automatic token refresh
- No password storage in n8n
- Secure SSO integration
Configuration:
- Create a new JMAP OAuth2 API credential
- Fill in:
- Client ID: Your OIDC client ID
- Client Secret: Leave empty for public clients (PKCE)
- Authorization URL:
https://sso.example.com/oauth2/authorize - Access Token URL:
https://sso.example.com/oauth2/token - JMAP Server URL:
https://jmap.example.com/jmap
- Click Connect to initiate the OAuth2 flow
- Log in with your SSO credentials
Compatible Identity Providers:
- LemonLDAP::NG
- Keycloak
- Auth0
- Any OAuth2/OIDC compliant provider
Authorization URL: https://sso.example.com/oauth2/authorize
Access Token URL: https://sso.example.com/oauth2/token
Client ID: my-n8n-client
Scope: openid email profile offline_access
Authorization URL: https://keycloak.example.com/realms/myrealm/protocol/openid-connect/auth
Access Token URL: https://keycloak.example.com/realms/myrealm/protocol/openid-connect/token
Client ID: n8n-jmap-client
Scope: openid email profile offline_access
Main node for email operations.
| Resource | Operation | Description |
|---|---|---|
| Send | Send a new email | |
| Reply | Reply to an existing email | |
| Get | Retrieve an email by ID | |
| Get Many | List emails with advanced search filters | |
| Get Attachments | Download attachments as binary data | |
| Create Draft | Create a draft without sending | |
| Delete | Delete an email | |
| Mark as Read | Mark email as read | |
| Mark as Unread | Mark email as unread | |
| Move | Move email to another mailbox | |
| Add Label | Add a mailbox label to an email | |
| Remove Label | Remove a mailbox label from an email | |
| Get Labels | Get all labels for an email | |
| Mailbox | Get | Get mailbox details by ID |
| Mailbox | Get Many | List all mailboxes |
| Thread | Get | Get thread details by ID |
| Thread | Get Many | Get all emails in a thread |
Polling-based trigger for new emails.
| Event | Description |
|---|---|
| New Email | Triggers on any new email |
| New Email in Mailbox | Triggers on new email in a specific mailbox |
Options:
- Simple Output: Return simplified email data
- Include Attachments Info: Include attachment metadata
- Mark as Read: Automatically mark fetched emails as read
The Get Many operation supports powerful search filters based on JMAP RFC 8621:
| Filter | Description |
|---|---|
| Received After | Emails received after a specific date |
| Received Before | Emails received before a specific date |
| From Contains | Filter by sender address |
| To Contains | Filter by recipient address |
| Subject Contains | Filter by subject line |
| Full Text Search | Search in subject, body, and addresses |
| Has Attachment | Only emails with attachments |
| Unread Only | Only unread emails |
| Flagged Only | Only starred/flagged emails |
Combine multiple filters for precise email retrieval.
The Get Attachments operation downloads email attachments as binary data, ready to use with other n8n nodes:
- Inline image filtering: Exclude embedded images (signatures, logos) by default
- MIME type filtering: Filter by file type (e.g.,
application/pdf,image/*) - Native compatibility: Works seamlessly with n8n's Compression, Google Drive, S3, and other nodes
Example workflow: JMAP Trigger > Get Attachments > Compression (extract ZIP) > Google Drive (upload)
This node can be used as a tool by n8n AI Agents, enabling autonomous email operations.
- Ensure you're using n8n version 1.x or later
- The node will automatically appear in the AI Agent's tool list
- Email assistant: Let the AI read, search, and respond to emails
- Automated triage: AI categorizes and labels incoming emails
- Smart notifications: AI analyzes email content and triggers actions
The AI Agent can use all JMAP operations:
- Search emails with natural language queries
- Read and analyze email content
- Send replies based on context
- Organize emails (labels, folders, flags)
- Download and process attachments
Contributions are welcome! This project is open source and we encourage the community to help improve it.
- Fork the repository
- Create a branch for your feature or fix:
git checkout -b feature/my-feature - Make your changes and test them locally
- Run linting:
npm run lint - Commit with a clear message
- Push to your fork and open a Pull Request
- Support for additional JMAP capabilities (Calendar, Contacts)
- Improved error handling and messages
- Additional search filters
- Documentation improvements
- Bug fixes and optimizations
# Clone your fork
git clone https://github.com/YOUR_USERNAME/n8n-nodes-jmap.git
cd n8n-nodes-jmap
# Install dependencies
npm install
# Build
npm run build
# Development mode (watch)
npm run dev
# Lint
npm run lint
# Format code
npm run format# Start n8n with the local node
N8N_CUSTOM_EXTENSIONS="/path/to/n8n-nodes-jmap" n8n startJMAP (JSON Meta Application Protocol) is a modern, efficient alternative to IMAP for email access:
- Stateless: No persistent connections required
- JSON-based: Easy to parse and debug
- Efficient: Batched requests, delta sync
- Standardized: RFC 8620 (Core) and RFC 8621 (Mail)
Learn more: jmap.io
MIT
This project is developed with the support of LINAGORA and Twake.