Generate a Mermaid Diagram With AI (ChatGPT, Claude, Gemini)
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
- 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
- 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
- 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]) - 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
- 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
- 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 - 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
- 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.
When the AI's code won't draw
Sometimes the Mermaid editor shows an error instead of a diagram. Copy the error message back into the chat and ask the AI to fix only that line. The usual causes are brackets or other symbols inside a label (put the label in double quotes), a box called end in small letters, which Mermaid reads as a keyword, and a missing first line such as flowchart TD. Fixing one line is quicker than asking for the whole diagram again.
A prompt you can reuse
Keep one prompt and change only the notes. For example: "Draw a Mermaid flowchart, top to bottom. One short verb and noun per box. Use a diamond for each decision and label every path out of it. Reply with the Mermaid code only. Here are my notes:" Then paste your notes after that last line. Before you paste, follow your company's rules about which AI tools may see meeting notes, and remove names and client details you don't need.
Other diagrams from the same notes
The same notes can give you more than a flowchart. Ask for a sequence diagram to show the hand-offs between the customer, the web shop and the support system, or a state diagram to show how a ticket's status changes. Check each one against the notes in the same way, and see the sequence and state diagram lessons for the syntax.
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.