This sophisticated n8n workflow automates two-way synchronization, backing up Typebot flows to GitHub and handling deletions. Use this powerful n8n template for reliable data versioning and cleanup.
Download this n8n workflow template and start using it instantly.
Technical users running self-hosted Typebot instances needing reliable backup strategies.
DevOps engineers looking for a seamless integration between application data and Git version control.
n8n users seeking advanced synchronization examples using recursion and complex comparison logic.
Anyone needing robust n8n templates for API data management and cleanup operations.
This powerful n8n workflow serves as a comprehensive synchronization mechanism for Typebot flows, ensuring that your chatbot definitions are constantly backed up and versioned in a dedicated GitHub repository. The primary challenge this n8n template solves is managing the life cycle of the flows—not only backing up new or modified Typebots but also cleaning up corresponding files in GitHub when a Typebot is deleted from the source workspace. This two-pronged approach, enabled by custom JavaScript logic within the n8n node structure, provides a reliable and memory-efficient solution, perfect for scaling Typebot usage while maintaining data integrity. The logic utilizes a recursive pattern via the Execute Workflow n8n node to handle numerous Typebot flows without straining the main n8n instance's memory. This ensures the n8n workflow is robust for high-volume environments.
The synchronization is initiated by the Schedule Trigger n8n node, typically running daily, or manually via the On clicking 'execute' n8n trigger.
Globals n8n node. It then uses two simultaneous HTTP requests: one to list all active Typebot flows and another using the GitHub n8n node to list all current backup files in the repository.Split Out n8n node separates the list of Typebots into individual items. The Loop Over Items n8n node manages the iterative processing, calling the workflow recursively via the Execute Workflow n8n node for each item to manage memory efficiently.Execute Workflow Trigger n8n node, which feeds into a Switch n8n node that checks the item's origin (Typebot or GitHub).isDiffOrNew) compares the JSON content. This custom n8n node ensures stability by ordering JSON keys before comparison. A subsequent Check Status Switch n8n node routes the flow to either Create new file, Edit existing file, or Return (if content is "same").isDeleted Code n8n node checks the filename (ID) against the list of active Typebots. If the Typebot has been deleted, an If n8n node directs the flow to the Delete a file GitHub n8n node, maintaining a clean backup repository. This robust dual-path approach makes this an effective n8n workflow for maintenance.List Typebots and Get Typebot HTTP Request n8n node.Globals Set n8n node (indicated by a sticky note). Update the following values:typebot.url: Your Typebot instance URL (e.g., https://typebot.io).typebot.workspace.id: The specific workspace ID you wish to back up.repo.owner: Your GitHub username.repo.name: The name of the GitHub repository designated for these backups.Schedule Trigger n8n trigger will handle automated runs, but you can also execute it manually via the On clicking 'execute' n8n node. Schedule Trigger / Manual Trigger: These n8n triggers initiate the synchronization process based on time or manual input.
Globals (Set n8n node): Holds essential configuration parameters (API keys, URLs, repository names) for the entire n8n workflow.
List Typebots (HTTP Request n8n node): Fetches the list of all currently active Typebot flows from the Typebot API.
List files (GitHub n8n node): Retrieves the list of files currently backed up in the GitHub repository.
Execute Workflow (n8n node): A crucial component enabling recursive execution of the n8n workflow on itself for processing items one by one, optimizing memory management.
Get Typebot (HTTP Request n8n node): Retrieves the full, detailed JSON content for a specific Typebot flow using its ID.
isDiffOrNew (Code n8n node): A custom n8n node that compares the Typebot JSON payload with the existing GitHub backup data (which is base64 encoded) to determine if the flow is "new," "different," or "same" based on content hash/string comparison.
Check Status (Switch n8n node): Routes the n8n workflow based on the synchronization status provided by the isDiffOrNew n8n node.
Create new file / Edit existing file / Delete a file (GitHub n8n node): Performs the necessary Git operations (create, update, delete) to maintain synchronization integrity in the GitHub repository.
isDeleted (Code n8n node): A custom n8n node responsible for comparing the list of GitHub files against the list of active Typebot IDs to identify and mark files that need deletion.
Use this powerful n8n workflow to automatically clean up your Trello boards. Delete old cards flagged with a specific label using Trello n8n nodes and filtering logic.

Use this powerful n8n workflow to automatically generate detailed travel itineraries. It triggers on emails, uses the Ollama n8n node with Llama 3.2, and sends personalized responses back via SMTP. Explore advanced n8n templates for AI.

Use this powerful n8n workflow to automatically analyze Jotform submissions using Google Gemini. Extract structured sentiment, key topics, and keywords, then log the results to Google Sheets. This advanced n8n workflow template simplifies data mining.

Automate weekly digital PR story identification using n8n. This n8n workflow analyzes Reddit trends, extracts content, performs sentiment analysis using Anthropic (Claude), and delivers zipped reports to Google Drive.

Build and deploy a lightning-fast AI customer service agent for WhatsApp using this advanced n8n workflow. Leverages Groq for LLM speed and conversational memory.

Secure your n8n instance with this automated n8n workflow. It uses scheduled triggers and hash-based change detection to back up all n8n templates, configuration, and credentials to GitHub, ensuring only real changes are committed.








































