How to create a flowchart from CSV

How to create a flowchart from a CSV file: the header names the editor reads, what belongs in Line to, and the order to fill the columns in: Box text, then Shape, then the arrows, then lanes.

A worked example, stage by stage

  1. Box text on its own

    Six labels and nothing else: "Submit a ticket", "Record the ticket in the helpdesk queue", "Enough detail to work the ticket?", down to "Set the priority from impact and urgency". They stack up as boxes with nothing between them, which is also what a helpdesk export renders as, because a file of records has nowhere to put a relationship. Nothing here says that the detail check has two outcomes.

  2. Add the Shape column

    Row 1 becomes a Start, and the four questions ("Enough detail to work the ticket?", "Reply received before the chase window closes?", "Can first line resolve it?" and "Did the fix work?") become diamonds. Everything else stays a Process, which is the value you get by leaving the cell blank. An unrecognised value normalises to Process silently, so a row written as Diamond or Choice draws as a rectangle with its question still sitting inside it.

  3. Fill in Line to, then Line text

    Now the arrows. "Enough detail to work the ticket?" carries 6,4 in Line to and Yes,No in Line text, so Yes skips ahead to the priority step and No runs to "Ask the requester for the missing detail". "Can first line resolve it?" carries 8,11 with the labels Yes and "No, escalate". The numbers are row positions, not ticket ids: renumber the rows and you rewire the diagram.

  4. Add the two lane columns

    The last four rows arrive with them: "Tell the requester what changed", the confirmation decision, and the two endings: "Ticket closed" and "Closed, no reply from the requester". Horizontal lane holds the stage, Raise through Triage, First line, Escalation and Close; Vertical lane holds the role: Requester, Service desk, Specialist team. Both are ordinary text in the CSV, and a lane appears the moment a row names it, so a typo in one row produces a fourth lane with one box in it.

How it works

  1. Start a new file rather than converting the export

    The CSV you already have has one row per ticket, order line or record. The file you are about to write has one row per step, and there are usually fewer than twenty of them for a process that produced ten thousand records. Keep the export open beside you, because its queue names, status codes and assignment groups are the real vocabulary of the process, but write the chart into a fresh file.

  2. Put the header row on line one

    Type the names the editor uses, spelled the way it spells them: Shape, Box text, Line to, Line text, and later Horizontal lane and Vertical lane. Nothing may sit above that line (no title, no export timestamp, no blank row) because matching is done on the first line of the file. Columns you keep for your own reference, like the original record id, can stay where they are and will be carried through untouched.

  3. Write Box text, one action per row

    One row is one thing somebody does. Split any row whose text contains "and", and delete rows that name a phase rather than an action: "Triage" is a heading, "Set the priority from impact and urgency" is a step. Import at this point if you want to see it: you will get a column of boxes with no arrows, which is the honest picture of a file that has labels and no relationships in it.

  4. Fill in Shape

    Start on the first row, Decision on every row that asks a question, and Success, Reject or End on each ending. Process is the default, so those cells can be left blank. Use the spellings the editor uses: a value it does not recognise becomes a Process without complaint, and a decision drawn as a rectangle keeps its branch labels, which makes the mistake easy to miss.

  5. Fill in Line to, then Line text

    Line to takes the position of the target row, counting the first data row as 1, comma-separated where a row leads to more than one place. Line text takes the branch labels in the same order, so the first label belongs to the first number. Write every row out before you number anything: Line to is positional, so inserting a step later shifts every row beneath it and invalidates every reference past the insertion point. If a step has to be added afterwards, append it at the end and point at it from where it belongs.

  6. Add the lanes, save as UTF-8, and drop the file in

    Put the stage in Horizontal lane and the role in Vertical lane, then save the file as UTF-8 with comma delimiters and open it in a text editor to confirm that is what you got. Drop the .csv onto the editor's spreadsheet area, or paste the text into it. The chart renders as it lands and the edges route themselves, so there is no layout step: what you check afterwards is whether any box has no arrow leaving it.

Frequently asked questions

What is the smallest CSV that will draw a flowchart?

Two columns. A header line reading Box text,Line to, then one line per step with the label and the position of the row it leads to: a four-step process is four lines under a header, with 2, 3, 4 and an empty cell in the second column. That draws a chain of rectangles with arrows between them. Shape is the third column worth adding, because without it every box is a rectangle and a question renders the same as an instruction, and Line text is the fourth, because a decision with unlabelled exits tells the reader a judgement happens but not which way to go afterwards.

Does Line to take the row number or an id?

The position of the target row in the file, counting the first data row as 1, the same number the editor prints in its # column. It is not the record id from the system the CSV came out of, and it is not a step code you invented, even if you have kept that column in the file. Anything that does not resolve to an existing row position is dropped with no error at all, so a file that is consistently off by one because the header row was counted as row 1 renders as boxes with no arrows and nothing anywhere says why.

How do I write a decision with two branches?

Set Shape to Decision, put both target positions in Line to separated by a comma, and put both labels in Line text in the same order. "6,4" beside "Yes,No" sends Yes to row 6 and No to row 4; reversing one list and not the other produces a chart that is wrong in the most convincing possible way, because it still looks complete. If a label itself contains a comma, wrap that field in double quotes. A branching process built entirely out of this pattern is at /templates/csv-decision-tree.

What values can the Shape column take?

Start, Process, Decision, End, Success and Reject cover almost every process chart, and there are more for specific cases: File, Input, Output and Preparation among them. Process is what you get for an empty cell, and it is also what you get for a value the editor does not recognise, which is the part to watch: there is no import error, so a column of shapes written in another tool's vocabulary imports cleanly and draws every decision as a rectangle. Check the diamonds after the first import rather than assuming.

Do I keep the CSV once the chart exists?

Keep it as the record of what you imported, not as the thing you edit. After the import the chart is the master: editing the rows in the editor is editing the diagram, because they are the same object, and maintaining the file in parallel recreates exactly the drift the conversion was meant to remove. Where a CSV keeps earning its place is at the start of the next chart: /templates/csv holds a file per chart type, and copying one of those is faster than writing a header row from memory.

Create a flowchart from your CSV

The template behind this guide

CSV to flowchart template (support ticket triage) — Turn a helpdesk CSV export into a flowchart. Support ticket triage from submitted to closed, drawn from three columns (Shape, Box text and Line to) with a chase window, an escalation gate and a capped reopen.

More in Process mapping guides