📬 Magic Inbox
AI-generatedOverview
The Magic Inbox node enables decentralized peer-to-peer (P2P) reception of workflows and messages from other n8n instances. It is designed to facilitate the sharing and automatic import of workflows or messages between different n8n setups without relying on a central server.
This node is particularly useful in scenarios where teams or organizations want to distribute automation workflows securely and efficiently across multiple n8n instances. For example, a team lead can send updated workflow automations directly to teammates’ n8n instances, which can then automatically import and activate them.
There are two modes:
- Simple Mode: An all-in-one configuration that automatically imports received workflows into the local n8n instance.
- Advanced Mode: Provides raw data output for custom multi-node workflows to handle processing flexibly.
Properties
| Name | Meaning |
|---|---|
| 📬 Magic Inbox P2P - Decentralized Reception | Informational notice describing the node’s purpose: receiving workflows/messages P2P, auto-import options, and modes available. |
| 🎯 Magic Inbox Mode | Choose between Simple Mode (all-in-one with auto-import) or Advanced Mode (raw data output for modular workflows). |
| 🌐 N8N Instance URL | URL of your local n8n instance used for auto-importing received workflows (required in Simple Mode). |
| 🔑 N8N API Key | API key credential for authenticating requests to your n8n instance when auto-importing workflows (required in Simple Mode). |
| ⚡ Auto Import | Boolean toggle to enable or disable automatic import of received workflows into your n8n instance (Simple Mode only). |
| 📒 P2P Address Book | Free-text multiline field to store URLs of known Magic Inbox contacts (other n8n webhook endpoints). |
| 🔐 Enable Whitelist | Boolean toggle to restrict acceptance of incoming messages only to authorized senders. |
| 👥 Allowed Senders | Comma-separated list of authorized sender identifiers (e.g., email addresses) allowed to send messages when whitelist is enabled. |
Output
The node outputs JSON data through its main output:
In Simple Mode, the output JSON contains metadata about the received message/workflow, including:
action: fixed string indicating the type of event.success: boolean indicating if processing was successful.mode: "simple".from: sender identifier.message: any accompanying message text.hasWorkflow: boolean indicating if a workflow was included.receivedAt: timestamp of reception.- If auto-import is enabled and a workflow is present, additional fields under
workflowImportindicate success or failure of the import, including the imported workflow ID and URL or error message.
In Advanced Mode, the node outputs the raw received data plus metadata such as:
magicInboxMode: set to "advanced".receivedAt: timestamp.processingNote: guidance to use multi-node workflows for further processing.
If whitelist is enabled and the sender is not authorized, the output JSON will contain an error message indicating rejection.
The node does not output binary data.
Dependencies
- Requires access to the target n8n instance’s REST API for workflow import (Simple Mode).
- Needs a valid API key credential for authentication to the n8n instance.
- The node exposes a webhook endpoint (
/webhook/magic-inbox) to receive incoming P2P transmissions. - Proper network accessibility between sending and receiving n8n instances is necessary.
- No external third-party services are required beyond n8n itself.
Troubleshooting
- Sender not in whitelist error: Occurs if whitelist is enabled and the sender’s identifier is not listed. To fix, add the sender to the allowed senders list or disable the whitelist.
- Workflow import failures: Can happen due to invalid workflow JSON, incorrect API key, or unreachable n8n instance URL. Check API key validity, network connectivity, and workflow JSON structure.
- Webhook not reachable: Ensure the receiving n8n instance is publicly accessible or reachable by peers, and the webhook path
/webhook/magic-inboxis correctly configured. - Auto-import disabled but expecting import: Verify the "Auto Import" property is enabled in Simple Mode.
- Incorrect mode selection: Using Advanced Mode disables auto-import; ensure mode matches intended usage.
Links and References
- n8n Webhook Documentation
- n8n REST API Reference
- General info on P2P communication concepts (external resource)