The prompt
Draw a company org chart with Mermaid flowchart TD syntax. Under the CEO there are four departments: Engineering, Marketing, Finance and HR. Engineering has Frontend, Backend and QA teams; Marketing has Brand and Sales teams. Connect manager to report with -->, and put several reports of one manager on one line with &. Use short letter ids with the display name in square brackets. Give the complete mermaid code block.
A typical result
flowchart TD
CEO[CEO] --> ENG[Engineering] & MKT[Marketing] & FIN[Finance] & HR[HR]
ENG --> FE[Frontend] & BE[Backend] & QA[QA]
MKT --> BRAND[Brand] & SALES[Sales]Edit the text, switch themes and download PNG, Word or PowerPoint from there.
Syntax notes
- One link per reporting line:
A --> Bmeans B reports to A. - Several reports on one line:
A --> B & C & Dis shorter than three lines and harder to get wrong. - Dotted-line reporting:
PM -.-> FE, for a project manager guiding several teams. - Name plus title:
CTO["Ana Ruiz<br/>CTO"];<br/>breaks the line, and text with a tag needs double quotes. - Box a division:
subgraph East region … end.
Too many departments, chart too wide
Change the first line to flowchart LR so levels run left to right, or switch the direction and spacing under Layout in the editor. If it is still large, split it: top-level departments in the overview and one chart per department.
Edit and export
In the editor preview, double-click a node to rename it and click a node, then Add a branch, to add a report without hunting through the code. Export to Word for a handbook or to PowerPoint for a company deck. The org chart templates have three ready-made hierarchies.