Skip to content

Import and export flows

Back up a RetroChat chatbot flow as a JSON file, move it between workspaces, or import our sample flow. Includes the full file format and a working example.

A flow can be saved as a JSON file and imported again. This is useful for:

  • Backups before a big change.
  • Moving a flow between websites (workspaces).
  • Starting from a ready-made flow, like the sample below.

Export a flow

Open Chatbot, open the flow's menu and choose Export. You'll get a file named like welcome-triage.retrochat-flow.json.

Import a flow

  1. Open Chatbot and click Import.
  2. Choose a .json file and give the flow a name.
  3. RetroChat checks the file before importing. Anything it can't use is left out, and any problems are listed so you can fix them in the builder.
  4. Review the flow, press Test, then Activate it when you're ready.

Importing never replaces your existing flows: it always creates a new one.

Sample flow

This is a complete, working flow for a fictional software company, Northwind Hours:

  1. It greets the visitor and offers four choices.
  2. Pricing & plans: it asks how many people will use it. Big teams go to sales (after taking an email); everyone else gets a tip that repeats their team size back.
  3. Booking a demo: it takes an email and ends with a confirmation.
  4. A quick question: an AI answer step replies from your knowledge base, and hands off if it isn't sure.
  5. Talk to a person: it checks agents_online, so it only promises a quick reply when someone is actually online.

Download the sample flow, or copy it from here:

{
  "format": "retrochat-flow",
  "version": 1,
  "name": "Northwind Hours: sales and support",
  "exported_at": "2026-11-17T09:00:00.000Z",
  "graph": {
    "start": "welcome",
    "steps": [
      {
        "id": "welcome",
        "type": "message",
        "text": "Hi! 👋 Welcome to Northwind Hours.",
        "next": "topic"
      },
      {
        "id": "topic",
        "type": "question",
        "text": "What can we help you with today?",
        "input": "choice",
        "variable": "topic",
        "options": [
          { "id": "o_pricing", "label": "Pricing & plans", "next": "team_size" },
          { "id": "o_demo", "label": "Booking a demo", "next": "demo_email" },
          { "id": "o_question", "label": "A quick question", "next": "ask_ai" },
          { "id": "o_person", "label": "Talk to a person", "next": "who_is_online" }
        ],
        "next": null
      },
      {
        "id": "team_size",
        "type": "question",
        "text": "Great! Roughly how many people will track time?",
        "input": "number",
        "variable": "team_size",
        "options": [],
        "next": "size_check"
      },
      {
        "id": "size_check",
        "type": "condition",
        "rules": [
          { "id": "r_large", "variable": "team_size", "op": "gt", "value": "25", "next": "sales_email" }
        ],
        "else_next": "small_tip"
      },
      {
        "id": "sales_email",
        "type": "question",
        "text": "Teams your size get volume pricing. What's the best email to reach you?",
        "input": "email",
        "variable": "email",
        "options": [],
        "next": "who_is_online"
      },
      {
        "id": "small_tip",
        "type": "message",
        "text": "Good news: the Team plan covers {{team_size}} people, and you can try it free for 14 days.",
        "next": "anything_else"
      },
      {
        "id": "demo_email",
        "type": "question",
        "text": "Happy to show you around. What's your email so we can send you some times?",
        "input": "email",
        "variable": "email",
        "options": [],
        "next": "demo_done"
      },
      {
        "id": "demo_done",
        "type": "end",
        "text": "Thanks! We'll email {{email}} with a few times for a 20-minute demo."
      },
      {
        "id": "ask_ai",
        "type": "ai",
        "text": "Ask me anything about Northwind Hours: features, importing your data or billing.",
        "instructions": "Keep answers short and friendly. Suggest the free trial when it fits.",
        "max_turns": 3,
        "on_unsure": "handoff",
        "next": "anything_else"
      },
      {
        "id": "anything_else",
        "type": "question",
        "text": "Is there anything else I can help with?",
        "input": "choice",
        "variable": "more",
        "options": [
          { "id": "o_yes", "label": "Yes, talk to a person", "next": "who_is_online" },
          { "id": "o_no", "label": "No, that's all", "next": "bye" }
        ],
        "next": null
      },
      {
        "id": "who_is_online",
        "type": "condition",
        "rules": [
          { "id": "r_online", "variable": "agents_online", "op": "equals", "value": "true", "next": "to_team" }
        ],
        "else_next": "offline"
      },
      {
        "id": "to_team",
        "type": "handoff",
        "text": "Connecting you with our team now. It usually takes a minute or two."
      },
      {
        "id": "offline",
        "type": "handoff",
        "text": "Our team is offline right now. Leave your question here and we'll reply by email first thing tomorrow."
      },
      {
        "id": "bye",
        "type": "end",
        "text": "Thanks for stopping by. Happy tracking! ⏱️"
      }
    ]
  }
}

The AI answer step needs the Business or Autopilot plan, or AI replies left in your trial. Without them, the step hands the visitor to your team instead.

File format

A flow file is a JSON object:

Field Meaning
format Always "retrochat-flow"
version File format version, currently 1
name The flow's name
exported_at When it was exported (ISO date)
graph.start The id of the first step
graph.steps The list of steps

Every step has a unique id and a type. Steps link to each other by id, and null means "nowhere": the flow stops there.

type Fields
message text, next
question text, input (choice, text, email, phone or number), variable, options (for choice: id, label, next), next
condition rules (each: id, variable, op, value, next), else_next
ai text, instructions, max_turns (1–20), on_unsure (handoff or next), next
handoff text
end text

The op values are listed in Variables and conditions. In any text, {{variable}} is replaced with the visitor's answer.

RetroChat also accepts a bare { "start": …, "steps": [ … ] } object without the outer wrapper.