Secure P2P Workflow Transfer System via Magic Inbox - n8n Workflow

Learn how to use the Magic Inbox n8n node to securely share n8n workflows and complex automation templates between self-hosted n8n instances using a peer-to-peer system, triggered by a Telegram n8n trigger.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

• Users managing multiple self-hosted n8n instances.
• Development teams needing to share complex n8n workflows securely.
• Influencers or creators selling/rewarding community members with premium n8n templates.
• Anyone interested in advanced, peer-to-peer data synchronization mechanisms for n8n.

Overview

This comprehensive n8n workflow leverages the specialized Magic Inbox n8n node to establish robust peer-to-peer (P2P) communication channels between different automation servers. It solves the challenge of manually exporting and importing complex n8n workflows or large data packages. By utilizing the Magic Inbox n8n node, users can trigger the transfer of a complete workflow JSON directly to another instance's receiving webhook. The system also integrates a Telegram n8n trigger to initiate transfers based on external communication, making the entire process highly automated and efficient for distributing or synchronizing production-ready n8n templates.

How it Works

The system is structured into sending and receiving mechanisms:


  1. Initiating the Send (Via Telegram or Manual Trigger):

The flow can be started either by the Message server n8n trigger (listening for Telegram messages) or manually via the When clicking manual trigger.
Upon activation, the process moves to the Magic Inbox Send n8n node, which contains the serialized JSON data of the target n8n workflow (in this case, a complex 'Super Agent' structure).
The Magic Inbox Send node uses a defined destinationUrl (the receiver's webhook URL) and contentType set to workflowwithmessage to transmit the n8n template package.


  1. Receiving the Workflow:

The receiving side is activated by the Receiving message server n8n trigger, which is a specialized Magic Inbox node acting as a webhook listener for incoming P2P transfers.
Once a valid P2P payload is received, the data proceeds to the Receiving message server n8n node (a standard Telegram node).
This final n8n node formats and sends a Telegram message confirming the receipt, including details about the teleported workflow ($json.workflowImport.message), effectively documenting the successful transfer of the complex n8n workflow.

Installation Guide


  1. Install Custom Nodes: Ensure you have the n8n-nodes-magic-inbox and n8n-nodes-magic-dev custom n8n nodes installed on your instance, as they are central to this P2P functionality.

  2. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n canvas using the 'Import from JSON' function.

  3. Configure Credentials:

Set up your Telegram API credentials for the Message server n8n trigger and Receiving message server n8n node.
Configure the Magic Inbox credentials, including your n8n Instance URL and a corresponding n8n API Key (required by the specialized n8n node for teleporting workflows).

  1. Set Destinations: In the Magic Inbox Send node parameters, update the destinationUrl field to the webhook URL of the target receiving Magic Inbox n8n trigger on the destination n8n instance. This completes the P2P connection, allowing you to send ready-made n8n templates instantly.

Node Details

This n8n workflow utilizes core and custom nodes for cross-instance automation:

Message server n8n trigger (Telegram Trigger): The initial n8n trigger, configured to listen for new Telegram messages (updates: ["message"]).
Message server n8n send (Magic Inbox Send): The core P2P transmission node. Its function is to package a specified workflowJson (which contains a massive, nested AI agent setup) and send it as a complete n8n template to the defined destination webhook.
When clicking (Manual Trigger): Provides a way to manually execute the Magic Inbox Send P2P action for testing or direct triggering of the n8n workflow template distribution.
📤 Magic Inbox Send P2P (Magic Inbox Send): A secondary instance of the sender node, explicitly labeled for P2P sending.
Receiving message server n8n trigger (Magic Inbox Trigger): This critical n8n node acts as the entry point on the receiving instance, waiting for the Magic Inbox payload, including the transferred n8n workflow.
Receiving message server n8n (Telegram Node): Used to send a notification (via Telegram) to confirm that the P2P workflow transfer was successful and displays metadata about the received n8n workflow payload.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

A former mason based in Montpellier, I retrained in automation and data thanks to n8n. Today, I support businesses and communities in building robust workflows tailored to their needs. Specializing in integration, I maintain the practical and rigorous approach acquired on construction sites, serving robust, simple, and reliable solutions.

Featured*