Hi everyone!
I’m building an interactive workflow tool in Glide, where users complete a form about how they perform document authoring. Their choices are saved in multiple columns (e.g., Step 1 – how they receive content, Step 2 – how they extract it, etc.).
I’m trying to automatically generate a Mermaid.js flowchart TD string in a template column using these answers, so each row produces a visual-ready workflow string like this:
flowchart TD
A1[Step 1: Download from publisher’s website]
A2[Step 2: Use Adobe Acrobat Pro]
A3[Step 3: Remove ads and reorder pages]
A4[Step 4: Enter metadata manually]
A5[Step 5: Adapt from publisher text]
A6[Step 6: Upload to SharePoint]
A1 → A2 → A3 → A4 → A5 → A6
I tried using a Template Column and inserted the following template:
flowchart TD
A1[Step 1: {{Step 1 - How do you access the document issue for authoring?}}]
A2[Step 2: {{Step 2 - How do you extract content for authoring?}}]
A3[Step 3: {{Step 3 - Which formatting tasks do you typically apply?}}]
A4[Step 4: {{Step 4 - How do you capture or review metadata (e.g. titles, dates, sources)?}}]
A5[Step 5: {{Step 5 - Do you write your own abstract or reuse existing summaries?}}]
A6[Step 6: {{Step 6 - Where do you upload or save completed documents?}}]
A1 → A2 → A3 → A4 → A5 → A6
But it doesn’t render the values from those columns — I only see “flowchart TD” or partial results.
I’ve checked that the column names exactly match what’s inside {{ }}.
Question:
Is this the correct way to use a template column for building a string with multiple column values? Am I missing a formatting or setup step?
Hi, thanks for your feedback. I’ve updated my column names to simpler ones—specifically, I renamed my columns to A1, A2, A3, A4, A5, and A6 and then updated my Template column (“Workflow Diagram”) accordingly. My updated template now uses the following code:
I’m indeed using carriage returns to separate the lines in my template (each node is on a new line). When I click on the cell in the Data Editor, I can see that the entire multi-line code is present, but the default view only shows the first line (“flowchart TD”). I’ve attached a screenshot of my Template Column settings so you can see exactly how it’s set up.
Any ideas on how to force the full output to display or be exported properly? Thanks in advance!
It was not necessary to rename your columns. Just rename the replacement values in the template, and as @Darren_Murphy pointed out, you need to actually set up your replacements in the template to take in values from the each column and replace those curly bracket strings.
Not sure what you are expecting. The cell contains the full text. As you mentioned, clicking on a cell shows the entire contents. The cell is not going to expand in height if you have multiple lines of text. I guess I don’t see a problem regarding this. Displaying it with a text component or passing it to whatever API or javascript you intent to use would still include the entire contents of the cell.
My template column now looks like the attached. I also used the AI component to render the mermaid code generated into a diagram. However this isn’t done automatically and I have to prompt it to complete the render.
What do you mean by “prompt it”? Do you mean the fact that they have to press a button? Reading through your AI chat dialog, I’m assuming that the chart was generating prior to you adding the button? Were you trying to prevent it from generating prior to completing the form?
If I’m assuming correctly, you could undo the addition of the button and instead put a visibility condition in the AI component to only display if all form values are not empty.
For your information, I’d like to mention that it’s possible to create diagrams of this kind (flowcharts, directed graphs, etc.) using Quickchart.io too.
It generates an image (.png or .svg) from a graph description written in DOT language, which is very similar to what’s used in Mermaid.js.
Concretely, your example converted to DOT looks like this: