N8n workflow to mermaid diagram converter

hi all, hope I posted this in the right place. I have build a small tool that converts n8n workflow jsons into mermaid diagram. which could be usefull when documenting your workflows. It has several display modes and configurations. its usable as an api, as a web interface and as a cli.

Github repo can be found here: https://github.com/jwa91/n8nmermaid
WebUI: https://n8nmermaid.janwillemaltink.com/

Feel free to leave feedback. it worked nicely for my own workflows, but i dont use all node types etc.

Hope i posted this in the right place, kind regards,
Jan Willem

5 Likes

That’s pretty slick!

here is one i just tested with

Do you have any plans on having the sticky notes be passed through as extra docs?

Also, I am curious of your motivation here. n8n being a node based no code tool, the workflows kinda are their own diagrams. What’s your primary use case for this?

1 Like

you are right, its indeed allready a node based diagram, but i just wanted a way to visualize my workflows in my markdown notes without having to fallback on screenshots or things like that.

Sticky notes indeed would be a good addition, but havent thought of a super clear way on the visualization of them yet, as they are not connected to any other nodes, and i kept away from the coordinates information in this first version.

Thanks @jwa91, this is great!

Aside from embedding into markdown, I believe using Mermaid as input for AI is much better than raw JSON when it comes to asking about workflow logic, making changes, or fully understanding the workflow.

1 Like