Flowchart basics

What a flowchart shows, the shapes and arrows it uses, and how to start one.

A flowchart shows the steps of a task, the decisions between them and where each path leads. This page covers what goes in one, when to draw one and how to start.

Use a flowchart for a troubleshooting guide, an approval, a sign-up flow, an algorithm or a support playbook. It suits any task where the question is "what happens next, and what if not".

Its code is Mermaid, the flowchart syntax most tools and wikis read. A chart pastes in from them and out to them as it is. Each element below comes with the code that draws it.

Steps, decisions, start and end

A process is a box for a step that someone or something does.

A decision is a diamond with a question. It has an arrow out for each answer.

Start and end shapes are rounded at both ends.

Mermaid
flowchart TD
  placed([Order placed]) --> stock{In stock?}
  stock -->|yes| ship[Ship the order]
  stock -->|no| backorder[Back-order it]
  ship --> done([Shipped])
  backorder --> done

More shapes

The classic flowchart symbols are there too, for when they say something:

  • Input or output, a slanted box
  • Subroutine, a box with bars, for a step drawn in full elsewhere
  • Database, a cylinder
  • Document
  • Delay
  • Preparation, a hexagon

Mermaid has more than forty shapes in all. Change shape in the selection bar lists the seven you'll use most first. Below them, Basic, Data, UML activity and Other each open a whole family.

To find a shape faster, type its name. The menu opens with a search field, and it knows Mermaid's names too, so diamond finds Decision and cyl finds Database.

Arrows

An arrow joins two shapes. It can carry a label, such as a decision's answer.

Its line can be solid, dotted for an optional or later step, or thick for the main path. A hidden line is an invisible spacer that only pulls two shapes together.

Each end can be an arrowhead, a circle, a cross or nothing.

Mermaid
flowchart LR
  send[Send the invoice] ==> paid{Paid in 30 days?}
  paid -->|yes| close([Closed])
  paid -.->|no| remind[Send a reminder]
  remind --- note@{ shape: brace, label: "At most twice" }

Frames

A frame draws a titled box round shapes that belong together, such as one team's steps or one phase. Frames can nest, and an arrow can end on a frame's edge.

Mermaid
flowchart TD
  order([Order placed]) --> pick
  subgraph warehouse [Warehouse]
    pick[Pick the items] --> pack[Pack the box]
  end
  pack --> ship([Shipped])

UML activity diagrams

A flowchart can also be a UML activity diagram. It has a filled dot for the start and a ringed dot for the end. Fork bars mark where work splits to run at the same time, and where it joins again.

PlantUML activity diagrams import as flowcharts drawn this way.

Mermaid
flowchart TD
  begin@{ shape: sm-circ } --> receive[Receive the order]
  receive --> split@{ shape: fork }
  split --> pick[Pick the items]
  split --> invoice[Send the invoice]
  pick --> join@{ shape: fork }
  invoice --> join
  join --> ship[Ship it]
  ship --> finish@{ shape: fr-circ }

When to use a flowchart

Draw a flowchart when the question is the logic: the steps and the decisions, in an order any reader can follow.

  • Draw a BPMN process instead when the question is who does what. A flowchart has no lanes and no message flows.
  • Draw a sequence diagram instead when the question is what systems say to each other.

Anyone can read a flowchart without learning a notation. Its Mermaid code is at home in a README, a wiki page or an issue.

Keep each chart to one flow at one level of detail, about 5 to 25 shapes. Draw a big part as a subroutine and give it a chart of its own.

Make a flowchart

Start a flowchart in any of these ways:

  • In the Diagrams panel, select New diagram (the + button) and choose Flowchart.
  • Press ⌘ K (Ctrl K on Windows and Linux) and run New flowchart.
  • Select Templates in the rail. Under Flowchart are Expense approval and Troubleshooting tree. View all adds Sign-up flow and Order fulfilment, a UML activity diagram.
  • In the Diagrams panel, open New diagram and choose Import flowchart file…. See Import a file.

A new chart is called "Untitled flowchart". Its empty canvas offers Add start and Use a template. When AI is on for your org, it also offers Describe it, which opens the assistant.

You can also type the chart in the Mermaid pane beside the canvas.

Next

On this page