Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions samples/m365-generate-mermaid-diagram/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# 🚀 Mermaid Diagram/Chart Generator

![Prompt sample](./assets/Copilot_Output_Sampley.png)

## Summary

A universal Copilot prompt that turns any scenario, process, or concept into a clear, ready-to-use Mermaid.js diagram or chart.

## Prompt 💡

You are a visualisation assistant.
For [SCENARIO, PROCESS, OR CONCEPT], create a clear and user-friendly Mermaid.js diagram of type [DIAGRAM_TYPE].
Always keep labels short and readable, structure logically, and return only one mermaid fenced code block with no extra text.

## Description ℹ️

This Copilot prompt helps you quickly transform any scenario, process, or concept into a Mermaid.js diagram.
By specifying the content in [SCENARIO, PROCESS, OR CONCEPT] and choosing the format in [DIAGRAM_TYPE], you’ll instantly get a ready-to-use visualisation.

Supported diagram types ([DIAGRAM_TYPE]):
- Flowchart (`flowchart TD`, `flowchart LR`)
- Sequence Diagram (`sequenceDiagram`)
- Class Diagram (`classDiagram`)
- State Diagram (`stateDiagram-v2`)
- Entity-Relationship Diagram (`erDiagram`)
- User Journey (`journey`)
- Gantt Chart (`gantt`)
- Pie Chart (`pie`)
- Quadrant Chart (`quadrantChart`)
- Requirement Diagram (`requirementDiagram`)
- GitGraph (`gitGraph`)
- C4 Diagram (`C4Diagram`)
- Mindmap (`mindmap`)
- Timeline (`timeline`)
- ZenUML (`zenUML`)
- Sankey (`sankey`)
- XY Chart (`xyChart`)
- Block Diagram (`blockDiagram`)
- Packet (`packet`)
- Kanban (`kanban`)
- Architecture (`architecture`)
- Radar (`radar`)
- Treemap (`treemap`)

Tip:
For more specific, accurate, and visually refined results, explore the official Mermaid.js documentation.
It provides syntax details, advanced options, and styling techniques to make your diagrams fit for purpose.

## Contributors 👨‍💻

[Tanel Vahk](https://github.com/tvahk)

## Version history

Version|Date|Comments
-------|----|--------
1.0|Aug 26, 2025|Initial release

## Instructions 📝

1. Ensure that Copilot for Microsoft 365 is available in your tenant.
2. Open Microsoft 365 Copilot via m365.cloud.microsoft or start a Copilot chat in Teams.
3. Copy and paste the prompt provided above.
4. Replace the placeholders with your own scenario, process, or concept, and adjust details as needed (for example, add specific steps or tasks).
5. Copilot will generate a structured response in the form of a Mermaid.js diagram.

### Improvise Usage 🚀
You can add more information to the prompt if needed to create more accurate response.

## Prerequisites

* [Copilot for Microsoft 365](https://developer.microsoft.com/microsoft-365/dev-program)

## Help

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

You can try looking at [issues related to this sample](https://github.com/pnp/copilot-prompts/issues?q=label%3A%22sample%3A%20YOUR-SAMPLE-NAME%22) to see if anybody else is having the same issues.

If you encounter any issues using this sample, [create a new issue](https://github.com/pnp/copilot-prompts/issues/new).

Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/copilot-prompts/issues/new).

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**