Smart diagram generation for more template diagrams
When you create a new diagram with the draw.io web editor, you can now choose to use our new smart diagram generator instead of one of our existing templates. Describe your diagram in a text phrase, and the tool will generate a diagram based on what it parses. For example, this entity relationship model was generated from the phrase “a customer purchases a product from a web store”.
As these smart generated diagrams have not been vetted by a human, there are no guarantees it will useful as a template or a starting point. But the generated diagram can serve as inspiration, or a starting point from which you can draw the diagram you actually need.
Tip: You can generate endless variations of a diagram from the same phrase.
Generate a diagram in draw.io
- Create a new diagram - go to our online diagram editor - or click on
+in the toolbar and select Template to insert a generated diagram.
- Select Smart template on the left.
- Enter a basic description of your diagram in the text field.
- Select the diagram type that you want to generate from the drop down list, then click Generate and wait for the preview to appear.
- Click Generate again to generate a different diagram with the same phrase - you can do this as many times as you like. Here’s the same prompt as a sequence diagram.
- Click Create if it’s a new diagram, or Insert if you are inserting a template.
Tip: Click on the magnifying glass in the top right of the preview to see a larger version of the generated diagram before adding it to the drawing canvas.
You can now edit, add to, delete, and style the shapes and connectors in the generated diagram.
Different types of generated diagrams
Here are some different types of diagrams generated from the phrase “a customer purchases a product from a web store”.
Of course, that phrase won’t generate something useful for certain types of diagrams, like this Gantt chart.
And because the previous phrase makes no sense when describing a mindmap, here’s “types of technical diagrams for IT workers”.
Open all of these generated examples in a multi-page diagram in our diagram viewer
More ways to generate diagrams from text
In draw.io, there are many different ways to generate diagrams automatically from text.
PlantUML - class diagrams, state diagrams, activity diagrams, user diagrams, component diagrams and more.
Mermaid - all UML diagram types, as well as pie charts, flowcharts, organisation charts, Gantt charts and more.
Entity diagrams - from SQL code.
CSV data into diagrams - with formatting information to create flowcharts, mindmaps, org charts, directed graphs and more.
Troubleshooting generated diagrams
Some diagram types lend themselves more naturally to text descriptions. Flow charts, sequence diagrams and mind maps are easier to generate than git graphs from a text description.
As this tool is not a human and can not know what is logical to include in a diagram, there are no guarantees you will generate a diagram that is fit for purpose.
This feature uses a third party service to parse your phrase, and it can get somewhat overloaded at times.
Click Try Again if the generation tool times out.
If the keywords in your phrase cannot be adequately parsed to generate a diagram, you may receive an “Diagram not found” error. Try another descriptive phrase and regenerate your diagram.