Typebot to GitHub, versioned backups without worry
You tweak a Typebot flow, hit save, and later realize you overwrote the “good” version. Or someone deletes a bot from the workspace and you only notice when support pings you. That’s exactly why Typebot GitHub backup automation matters.
Marketing ops teams feel it when live funnels break. A founder feels it when a migration turns messy. And an agency running multiple client bots? Honestly, it’s a constant low-grade fear of losing work.
This n8n workflow exports every Typebot, versions it in GitHub, and keeps the repo in sync. You’ll see how it works, what you need, and where teams usually trip up.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Typebot to GitHub, versioned backups without worry
flowchart LR
subgraph sg0["Execute Workflow Flow"]
direction LR
n1@{ icon: "mdi:play-circle", form: "rounded", label: "Execute Workflow Trigger", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get Typebot"]
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "Edit Fields", pos: "b", h: 48 }
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/github.dark.svg' width='40' height='40' /></div><br/>Get file data"]
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/github.dark.svg' width='40' height='40' /></div><br/>Create new file"]
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/github.dark.svg' width='40' height='40' /></div><br/>Edit existing file"]
n14@{ icon: "mdi:swap-vertical", form: "rounded", label: "Return", pos: "b", h: 48 }
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/github.dark.svg' width='40' height='40' /></div><br/>Delete a file"]
n16@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n17["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>isDeleted"]
n18["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>isDiffOrNew"]
n19@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check Status", pos: "b", h: 48 }
n20@{ icon: "mdi:cog", form: "rounded", label: "File is different", pos: "b", h: 48 }
n21@{ icon: "mdi:cog", form: "rounded", label: "File is new", pos: "b", h: 48 }
n22@{ icon: "mdi:cog", form: "rounded", label: "File is same", pos: "b", h: 48 }
n23["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge"]
n24@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Switch", pos: "b", h: 48 }
n16 --> n15
n16 --> n14
n23 --> n18
n24 --> n4
n24 --> n17
n17 --> n16
n6 --> n23
n21 --> n12
n4 --> n11
n4 --> n6
n18 --> n19
n19 --> n21
n19 --> n20
n19 --> n22
n22 --> n14
n15 --> n14
n11 --> n23
n12 --> n14
n20 --> n13
n13 --> n14
n1 --> n24
end
subgraph sg1["On clicking 'execute' Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "On clicking 'execute'", pos: "b", h: 48 }
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>List Typebots"]
n3@{ icon: "mdi:swap-vertical", form: "rounded", label: "typebot", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Out", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-vertical", form: "rounded", label: "Globals", pos: "b", h: 48 }
n8@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n9@{ icon: "mdi:swap-vertical", form: "rounded", label: "github", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/github.dark.svg' width='40' height='40' /></div><br/>List files"]
n25@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n26@{ icon: "mdi:cog", form: "rounded", label: "Execute Workflow", pos: "b", h: 48 }
n9 --> n25
n7 --> n2
n3 --> n25
n5 --> n3
n10 --> n9
n2 --> n10
n2 --> n5
n25 --> n26
n26 --> n25
n8 --> n7
n0 --> n7
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n1,n0,n8 trigger
class n16,n19,n24 decision
class n4,n2 api
class n17,n18 code
classDef customIcon fill:none,stroke:none
class n4,n11,n12,n13,n15,n17,n18,n23,n2,n10 customIcon
The Problem: Typebot Changes Aren’t “Undo-Friendly”
Typebot makes it easy to ship new flows fast. That’s the good part. The painful part is what happens after a few weeks of constant edits, quick experiments, and “tiny” fixes made during a launch day. Suddenly you don’t know which version is running, what changed last Tuesday, or how to restore a bot that got deleted. Even if you trust your team, you still have human mistakes, rushed updates, and the occasional credential or workspace mix-up. The cost isn’t just time. It’s downtime, lost leads, and awkward conversations.
The friction compounds. Here’s where it breaks down.
- You end up taking random manual exports “just in case,” and they’re never the latest when you need them.
- When a flow is edited, there’s no clean version history you can review like real source control.
- A deleted bot can quietly disappear until someone notices a broken link or missing embed.
- Migration projects get risky because you can’t confidently recreate the workspace state from a known snapshot.
The Solution: Export Typebots and Keep GitHub in Sync
This workflow backs up your Typebot flows to GitHub automatically. It starts by calling the Typebot API to export the full list of typebots in your workspace, then it pulls the detailed data for each bot. n8n loops through those bots one by one, checks your GitHub repo to see if a file already exists for that bot, and then decides what to do next. If the content is new, it creates a file. If the content changed, it updates the existing file. If nothing changed, it leaves the repo alone (so you don’t get noisy commits). It also detects flows that were deleted in Typebot and removes their corresponding files from GitHub, which keeps your backup tidy and current.
The workflow kicks off on a schedule (or manually when you want). It exports, compares, then routes each bot through a “new / changed / identical” decision. Finally, it writes the correct result to GitHub and logs what happened.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you manage 20 Typebot flows across a few funnels. A “safe” manual backup usually means exporting each flow, naming files, and uploading them somewhere, which is maybe 5 minutes per flow. That’s about 2 hours every time you want to feel confident before a launch. With this workflow, you let the schedule run, it loops through all bots automatically, and GitHub gets only the new or changed files. Realistically, your time spent drops to a quick check of the latest commit message.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Typebot workspace access to export flows
- GitHub repository to store versioned backups
- Typebot API token (get it from your Typebot account settings)
Skill level: Intermediate. You’ll connect credentials and tweak a couple of repo/workspace settings, but you won’t be writing an app.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A schedule (or manual run) starts the backup. The workflow can run on a timed trigger for hands-off backups, and it also supports manual runs for “do it now” moments.
Typebot exports are collected and normalized. n8n requests the Typebot list, expands that data into individual records, and fetches the detailed flow export for each bot so every backup file is consistent.
GitHub is checked before anything is written. The workflow retrieves repo files, pulls content when a matching file exists, and compares “existing vs. current” so only real changes create commits.
Files are created, updated, skipped, or removed. New bots become new files, edited bots update in place, identical bots are ignored, and deleted bots get their repo files removed to keep everything aligned.
You can easily modify the repo naming rules to match your folder structure and team conventions. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Set up how the workflow starts, including manual runs, scheduled runs, and runs from other workflows.
- Open Manual Start Trigger to enable on-demand testing from the editor.
- Open Timed Schedule Trigger and set the run time to
7under the hourly schedule rule. - Open Workflow Run Trigger and keep Input Source set to
passthroughfor sub-workflow inputs. - Ensure all three triggers connect into Global Settings or Route by Origin as shown in the canvas.
Step 2: Connect Typebot API
Define Typebot workspace configuration and pull the list of bots for processing.
- In Global Settings, set typebot.url to
https://typebot.io. - In Global Settings, replace typebot.workspace.id with your workspace ID value instead of
[YOUR_ID]. - Open Retrieve Typebot List and confirm URL is
={{ $json.typebot.url }}/api/v1/typebots. - In Retrieve Typebot List, set the query parameter workspaceId to
={{ $json.typebot.workspace.id }}. - Open Fetch Typebot Detail and confirm URL is
={{ $('Route by Origin').item.json.typebot.url }}/api/v1/typebots/{{ $json.id }}.
Credential Required: Connect your httpBearerAuth credentials in Retrieve Typebot List and Fetch Typebot Detail.
⚠️ Common Pitfall: Leaving [YOUR_ID] in Global Settings will cause the Typebot API calls to fail.
Step 3: Connect GitHub for Repository Backup
Configure the GitHub nodes used to list, read, create, edit, and delete files in the backup repository.
- In Global Settings, replace repo.owner and repo.name with your GitHub owner and repository values instead of
[YOUR_ID]. - Open Retrieve Repo Files and confirm Resource is
file, Operation islist, and Authentication isoAuth2. - Open Fetch File Content and set File Path to
={{ $('Route by Origin').item.json.id }}.json. - Open Generate New File and set File Path to
={{$('Route by Origin').first().json.id}}.jsonand File Content to={{$('Evaluate Diff Or New').item.json["typebot_data_stringy"]}}. - Open Modify Existing File and set Operation to
editwith the same File Content expression as Generate New File. - Open Remove Repo File and set File Path to
={{$('Route by Origin').first().json.name}}.
Credential Required: Connect your githubOAuth2Api credentials in Retrieve Repo Files, Fetch File Content, Generate New File, Modify Existing File, and Remove Repo File.
Step 4: Set Up Data Mapping and Parallel Fetching
Normalize Typebot and GitHub data and handle parallel fetches of bot records and file contents.
- In Map Typebot Settings, keep Include Other Fields enabled and confirm origin is set to
typebot. - In Map Repo Settings, keep Include Other Fields enabled and confirm origin is set to
github. - Open Expand Bot Records and set Field To Split Out to
typebots. - Open Map Bot Payload and set JSON Output to
={{ $json.typebot }}.
Retrieve Typebot List outputs to both Retrieve Repo Files and Expand Bot Records in parallel.
Fetch Typebot Detail outputs to both Fetch File Content and Map Bot Payload in parallel.
Step 5: Configure Diff Logic, Routing, and Deletions
Compare Typebot data with existing GitHub files, route by status, and handle deletions.
- Review Evaluate Diff Or New to ensure it compares decoded GitHub content to the Typebot payload and sets
github_statustonew,different, orsame. - Open Route by Status and keep the three rules that check
={{$json.github_status}}fornew,different, andsame. - Confirm Flag New File, Flag Different File, and Flag Identical File are connected to Generate New File, Modify Existing File, and Finalize Result respectively.
- In Detect Deleted Bot, keep the code that sets
isDeletedwhen a repo file has no matching Typebot ID. - In Conditional Deletion Check, ensure the boolean condition reads
={{ $json.isDeleted }}to trigger Remove Repo File when needed.
Tip: If you want to retain orphaned backup files, disable the connection from Conditional Deletion Check to Remove Repo File.
Step 6: Configure Iteration and Sub-Workflow Execution
Loop through Typebot records and optionally pass each record into a sub-workflow.
- Open Iterate Records and keep Reset set to
={{ $node["Iterate Records"].context["done"] }}for correct batching. - Open Run Sub-Workflow (Configure Required) and select a target workflow in Workflow ID if you want to extend processing.
- Leave Mode set to
eachso each record is processed individually.
⚠️ Common Pitfall: If Run Sub-Workflow (Configure Required) has no Workflow ID, the loop will still run but no sub-workflow will execute.
Step 7: Configure Output Finalization
Ensure all paths resolve to a completed output so execution ends cleanly.
- Open Finalize Result and keep Done set to
trueto mark completion. - Confirm that Generate New File, Modify Existing File, Remove Repo File, and Flag Identical File all connect to Finalize Result.
Step 8: Test and Activate Your Workflow
Validate the workflow end-to-end and enable scheduled backups.
- Click Execute Workflow on Manual Start Trigger to run a test.
- Verify that Typebot data is pulled and that GitHub file actions match the
github_statusvalues produced by Evaluate Diff Or New. - Confirm expected outcomes: new bots create files via Generate New File, changed bots update via Modify Existing File, and deleted bots remove files via Remove Repo File.
- Once validated, activate the workflow so Timed Schedule Trigger runs backups automatically.
Common Gotchas
- GitHub credentials can expire or need specific permissions. If things break, check the token scopes and the n8n credential test output first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Frequently Asked Questions
About 30 minutes if your Typebot token and GitHub repo are ready.
No. You’ll mostly add credentials, choose a repo, and confirm how files should be named.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Typebot hosting costs (if you’re on a paid plan) and normal GitHub usage (usually free for this use case).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but you’ll want to decide how the workflow names and places files first. Most teams adjust the repo settings mapping so each bot writes into a specific directory, then keep the “compare and update” behavior exactly the same. You can also change the identifier used for matching (for example, bot ID vs. credential/workspace ID) so backups don’t collide across environments.
Usually it’s an expired token or missing scopes. Regenerate a GitHub token with repo access, update the credential in n8n, and re-run the workflow. If it still fails, check that the repo owner/name in your repo settings matches exactly, including capitalization. Rate limits can also show up when you’re backing up lots of bots at once, so spacing runs out (or reducing frequency) helps.
Hundreds, in practice. On n8n Cloud, your limit is mostly executions per month on your plan. If you self-host, there’s no execution cap, so it comes down to your server and the time it takes to loop through exports.
For this workflow, n8n is usually the better fit because you’re doing a lot more than “send A to B.” You need looping, file comparisons, branching decisions (new vs. changed vs. identical), and a cleanup path for deleted flows. Zapier and Make can do pieces of that, but it gets fiddly and expensive once you add the logic. n8n also gives you the option to self-host, which is great when backups should run as often as you like. If you only need a simple “export once a week and upload,” then sure, those tools can work. Talk to an automation expert if you want the cleanest approach for your setup.
A backup you have to remember to run isn’t really a backup. Set this up once, and your Typebot flows will stay versioned, searchable, and recoverable in GitHub.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.