BA Prince the B.A. Subscribe

Home / Mermaid for Business Analysts

Generate a Mermaid Diagram With AI (ChatGPT, Claude, Gemini)

Generate a Mermaid Diagram With AI (ChatGPT, Claude, Gemini)

Watch on YouTube Subscribe

Turn meeting notes into Mermaid code with any AI chat, paste it into the free Mermaid live editor, then check it against the notes. A support ticket flow where the AI dropped a whole path, and how to fix it.

Step by step

Notes to diagram

  1. AI writes, you check. An AI chat can turn meeting notes into Mermaid code in seconds, but it makes mistakes, so always check what it gives you. Here is a support ticket flow an AI chat wrote, and the one fix it needed.

The prompt

  1. Ask well. Paste your notes into the chat and ask: turn these into a Mermaid flowchart, top down, with short verb-and-noun shapes and a label on every decision path.

Paste it

  1. Paste the code. Copy the code the AI gives you, clear the Mermaid live editor and paste it in. It starts with flowchart TD, which means top down. The first line draws Ticket submitted as a rounded start shape and links it to Triage ticket. The rest of the code adds the decision Urgent? in a diamond shape. The Yes path goes to Call duty engineer, then Fix issue, and ends at Ticket resolved.
    flowchart TD
        A([Ticket submitted]) --> B[Triage ticket]
        B --> C{Urgent?}
        C -->|Yes| D[Call duty engineer]
        D --> F[Fix issue]
        F --> G([Ticket resolved])
  2. Render it. The diagram draws with no error. That only means the code is valid, not that it matches the meeting. Check it against the notes, one sentence at a time.

Check it

  1. Check every path. Look at the Urgent? decision: only one path, Yes, leaves it. The notes said tickets that are not urgent join the queue. The AI dropped that sentence.

Fix it

  1. Fix it yourself. Add the missing path yourself: C -->|No| E[Add to queue], then E --> F. Using the ID F again links to the existing Fix issue shape instead of making a new one, so the queued ticket gets fixed too. Render it again. Now two labelled paths, Yes and No, leave Urgent?, and they meet again at Fix issue.
        C -->|No| E[Add to queue]
        E --> F
  2. Check every path. Also check the words. AI chats tend to put long sentences in boxes. Keep each shape to a verb and a noun, like Call duty engineer, and each decision to a short question, like Urgent? Last, check that every path ends. Once the missing path is added, both routes finish at Ticket resolved.

Recap

  1. The rules. Give the AI your notes and ask for labelled paths. Paste the code, render it, then check every sentence of the notes against the drawing, and fix what's missing yourself.

Common mistakes

  • Trusting the diagram because it renders. No error only means the code is valid. Read the notes one sentence at a time and find each one in the drawing. Here the AI left out the path for tickets that are not urgent.
  • A decision with only one path. A decision like {Urgent?} needs a labelled line for each answer, such as -->|Yes| and -->|No|. Ask for labels in the prompt, then count the lines leaving each decision.
  • Typing a shape again instead of reusing its ID. To join two paths, point at the ID that already exists, like E --> F. A new ID with the same text, such as H[Fix issue], draws a second Fix issue box.
  • Brackets inside a shape's text. Text like D[Call engineer (P1)] breaks the code, because Mermaid reads the brackets as shape symbols. Put the text in double quotes: D["Call engineer (P1)"].

When a business analyst uses this

After a process workshop, paste your notes on the current refund process into an AI chat and get a Mermaid flowchart in minutes. Before you send it for sign-off, check that every decision has all its labelled paths, so a missing exception route doesn't get approved by accident.

Questions people ask

What is a Mermaid diagram?

It is a diagram drawn from plain text code. You write lines like A --> B, and Mermaid turns them into a flowchart, sequence diagram or another chart, so it is easy to edit and easy for AI to write.

Can AI generate a Mermaid diagram?

Yes. ChatGPT, Claude and Gemini can all write Mermaid code from your notes. Paste it into the Mermaid live editor to draw it, then check it, because the AI can leave out steps or paths.

Where can I draw Mermaid code for free?

The Mermaid live editor at mermaid.live is free. Paste your code in and it draws the diagram, so you can check it and fix it on the spot.