Back to Blog

Ask ChatGPT or Claude for a Diagram, and Get One That Draws

November 10, 2026by TypeFire
chatgpt diagramclaude mermaidai diagramchatgpt flowchartmermaid aiai flowchart generatorgemini diagramtext to diagram

Ask an AI assistant to "draw a diagram" and you'll often get a description of a diagram, a blurry generated picture, or ASCII boxes. None of them can be edited.

Ask it for Mermaid instead and you get a few lines of text that draw as a real diagram, and that you can fix by changing a word. Every major assistant knows the syntax.

The short version

  • Say "Mermaid", the kind you want, and "in a code block".
  • Paste the answer into a Mermaid editor to see it drawn.
  • Fix errors one line at a time: quotes around odd labels, --> for arrows.
  • Keep the text, not a screenshot, so the diagram stays editable.

Prompts that work

The more specific the prompt, the cleaner the diagram. Name the kind, the parts and the layout.

Write a Mermaid flowchart, left to right, in a code block.
A support ticket comes in. Billing questions go to billing.
Urgent ones page the on-call. The rest join the queue.
Every path ends with a reply. Keep labels under four words.
Write a Mermaid sequence diagram in a code block showing an
app asking an API for order 5520, the API reading it from the
database, and the API returning it as JSON.
Turn this plan into a Mermaid Gantt chart in a code block,
dateFormat YYYY-MM-DD, starting 2026-03-02, with sections
Design, Build and Launch: [paste your plan]

The second prompt gives you this:

A Mermaid sequence diagram an assistant writes from one sentence: app, API and database, in order

How to draw the answer

  1. Copy the code block. Only the part from ```mermaid to the closing backticks.
  2. Paste it into a Mermaid editor. The free live editor draws it at once, in your browser.
  3. Fix and tidy. Rename boxes, add a branch, change LR to TD. It redraws as you type.
  4. Keep it. Download the document as Markdown, or as a PDF with the diagram in it.
A Markdown document in the editor with Mermaid text and the drawn flowchart side by side
Paste the assistant’s answer and the diagram draws in the document.

The mistakes AI makes, and the fix

What you see Why Fix
An error on one line A label has brackets, quotes or a colon Wrap it in double quotes: A["Price (USD)"]
An arrow error It wrote -> instead of --> Use --> in flowcharts
A box called "end" breaks things end is a reserved word Rename it: Done or E[End]
A huge, cramped chart Long labels, everything left to right Ask for short labels, or switch to TD
A pie chart drawn as a flowchart The prompt didn't name the kind Start the prompt with "Write a Mermaid pie chart"

Skip the chat entirely

Copying between a chat and a diagram tool works, but there's a shorter path. In TypeFire for Mac, turn on AI, open the note's AI menu and choose Draw a diagram, or pick Describe it in the diagram dialog. Say what you want in plain words and the diagram is written and drawn right in your note. Change it reworks a diagram you already have. It uses the AI provider you set up in TypeFire.

A plain-words description of a process becomes a drawn flowchart in TypeFire
Describe it: plain words in, a drawn diagram in your note.

Either way you end up with text, not a picture, so the diagram can grow with the work. For the syntax behind each kind, start with the guide to diagrams in Markdown.

In their words

Loved by people who type all day.

Unprompted reactions from users, in their own words.

Exactly what macOS has been needing: blazing fast, beautifully designed, and it respects your privacy without forcing a subscription.
Physician
I use TypeFire every single day, all day long. I love it.
Works at Apple
The way you've handled the AI integrations is very elegant. A great implementation.
Mac user
TypeFire is the absolute replacement for TextExpander.
Works at Apple
I love your app. Love it. The only one that does what I want it to do.
Mac user
I'm loving the date math. Amazing, love it.
ICU doctor
It instantly imported my 502 snippets. Flawless import.
Moved over from TextExpander
Incredibly lightweight. It has quickly become a go-to tool in my daily workflow.
Physician
Love the app, and your development pace rocks.
Longtime user
This app is AWESOME! And I definitely want to buy the Pro version.
Free user
Fantastic. Thank you for the very fast fix.
EU keyboard user
This app has so much potential. I'm really grateful that I found it.
Mac user

Used by people at

AppleRed HatPalo Alto NetworksHubSpotIndeedSentryFreshworksTrustpilotBumbleFarfetchSaint-GobainfoodpandaMcKinseyAccentureIntuitInstacartRakutenDow JonesHearstRokuxAINuroGitGuardianMeltwaterDevRevWoltAirwallex

Company names are places where our users work. They do not imply endorsement or affiliation.