Amid a flurry of holiday updates, Notion added support for flowcharts within Code blocks. They make aesthetic and informative additions to Notion pages; however, creating them requires an understanding of the Mermaid syntax. Experienced developers learn it quickly, but for everyday users, it's not so simple. That's why I created a tool that generates Mermaid from database items, which you can paste into your Code block.
Flowcharts in Notion: The Standard Way
At the top-left of a Code block, you can select Mermaid as the language. As you write Mermaid to construct your flowchart, the diagram takes shape at the bottom. This is the Code block's default Split view.
Once your diagram is complete, you can toggle from Split to Preview, which nicely displays only your flowchart.
Flowcharts from Databases
For the users unable to write Mermaid (you're in good company), I've created a simple tool for generating the code for your flowchart from a Notion database. You'll find the video walkthrough most helpful, but here's the gist:
Duplicate this page to your workspace. Within it, you'll find three sections, each representing a step of the process.
Initialize your flowchart.
In the Flowcharts database, create a new item to represent your flowchart. Give it a simple name that's easily identifiable, such as "Birthday."
In the Direction property, choose whether your want your flowchart oriented horizontally ("Left-to-Right") or vertically ("Top-to-Bottom").
Create the nodes.
The nodes of your flowchart are the text-filled, colored shapes connected by lines.
Configure the view.
Within the Nodes database, duplicate the Lamp Repair view.
Give the duplicate view a name that corresponds with your new flowchart.
Modify the filter to display the items related to the flowchart your added to the Flowcharts database.
Add the nodes.
Create an item of the database for each node.
The value of the Node Content property is the text that displays in the node.
Optionally select a shape or color.
Create the connections.
A node's parents are the nodes that precede it in the flowchart, connected by a line.For each node, you can choose up to three parents.
The Parent 1, 2 and 3 properties allow you to search for another node in the database.
For each parent, the Line Text property is the text that appears on the connecting line.
For each parent, you can optionally choose to extend the connecting line by selecting "Longer" or "Longest."
Copy and paste the Mermaid.
Having created your nodes, return to the Flowcharts database.
Within the Final Mermaid property for your flowchart, copy the contents.
Scroll down to the Code Block section.
At the top-right, ensure Mermaid is the selected language and Split is the selected view.
Paste your copied Mermaid into the top of the block.
Make any desired adjustment to your nodes, then re-copy and re-paste your code until your flowchart is tuned to your satisfaction.
Toggle the Code block's view to Preview.
Copy the code block and paste it to its final location in your workspace.