Skip to content

Generate technical Markdown documentation for your Azure Logic App and Power Automate Flows

License

Notifications You must be signed in to change notification settings

stefanstranger/logicappdocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This solution contains scripts to generate technical documentation for Azure Logic Apps and Power Automate Flows. It uses PowerShell to retrieve the Logic App or PowerAutomate Flow and creates a Markdown file with the flow in a Mermaid Diagram and tables of the actions and connections used in the flow.

Support

This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates.

  • For new issues, file your bug or feature request as a new issue.
    • If you can please add the Logic App Code (json content), cleared with any sensitive information to the issue if possible.
  • For help, discussion, and support questions about using this project, join or start a discussion.

Support for this project is limited to the resources listed above.

Getting Started

Clone the repository and run the script. The script will prompt you for the parameters. It will then create a Markdown file in the directory you provided when running the script.

# Clone the repository
git clone https://github.com/stefanstranger/logicappdocs.git

Run the New-LogicAppDoc.ps1 PowerShell script to create the Markdown file for an Azure Logic App

Navigate to the folder where you have cloned the repository and run the New-LogicAppDoc.ps1 script.

Folder structure of Logic App script

# Authenticate to Azure where the Azure Logic App is located
Login-AzAccount -SubscriptionId <SubscriptionId>

# Run the script
# Example:
#  .\src\New-LogicAppDoc.ps1 -SubscriptionId 'dfc1f10c-a847-4250-bde8-93c3d6c53ea0' -ResourceGroupName 'jiraintegration-demo-rg' -LogicAppName 'logic-jiraintegration-demo' -OutputPath 'c:\temp' 
.\src\New-LogicAppDoc.ps1 -SubscriptionId <SubscriptionId> -ResourceGroupName <ResourceGroupName> -LogicAppName <LogicAppName> -OutputPath <OutputDirectory>

Powershell script screenshot of New-LogicAppDoc.ps1 script running in console

Run the New-PowerAutomateDoc.ps1 PowerShell script to create the Markdown file for a Power Automate Flow

Navigate to the folder where you have cloned the repository and run the New-PowerAutomateDoc.ps1 script.

Folder structure of Power Automate script

To retrieve the Power Automate Environment Id, you can login to your Power Automate Portal in your browser via https://make.preview.powerautomate.com/ and copy the environment id from the URL.

Screenshot of Power Automate Portal to find environment id from url

# Run the script
# Example:
#  .\src\New-PowerAutomateDoc.ps1 -EnvironmentName '839abcd7-59ab-4243-97ec-a5b8fcc104e4' -PowerAutomateName 'Notify of Canceled Meetings'
.\src\New-PowerAutomateDoc.ps1 -EnvironmentName <Power Automate Environment Id> -PowerAutomateName <Power Automate Flow Name>

Powershell script screenshot of New-PowerAutomateDoc.ps1 script running in console

Open the Markdown file

You can open the Markdown file in Visual Studio Code or any other Markdown editor.

Go to the directory where you have saved the Markdown file (OutputPath) and open the Markdown file created.

Example - Logic App Flow

Example of the generated Markdown file

Example - Power Automate Flow

Example of the generated Markdown file for Power Automate Flow

Credits

Special thanks and shoutouts to Prateek Singh for his Azure Visualizer tool. I used some of his code and inspiration to develop the LogicAppDocs script.

Rick Strahl with some Markdown tips and tricks and for creating the awesome Markdown Monster Editor, Viewer and Weblog Publisher for Windows.

Bernie White for his PowerShell PSDocs module that helps with the creation of Markdown from PowerShell objects.

Rene Modery for his PowerDocu script that provided ideas for this solution. PowerDocu helps generate documentation for Power App canvas apps and Power Automate flows.

Andreas Cieslik for his feedback and help to resolve issues. Big kudos to him to help improve this solution 🙏

And finally some great PowerShell community members for their feedback and suggestions on Twitter!

Change Log

v1.1.5 - 2024-04-02

v1.1.4 - 2024-04-02

v1.1.3 - 2024-03-29

v1.1.2 - 2023-08-18

v1.1.1 - 2023-08-11

v1.1.0 - 2023-08-01

  • Added logic to create Markdown documentation for Power Automate Flows.
  • Changed ascii logo
  • Fixed issue when no connections are configured
  • Moved helper functions to separate Helper.ps1 script

v1.0.3 - 2023-08-01

  • Fixed issue with Mermaid not accepting the pipe character. See Github Issue4

v1.0.2 - 2023-07-27

  • Fixed issue with empty actions. See Github Issue1
  • Markdown file now has the same name as the Logic App Workflow name.

v1.0.1 - 2023-07-24

  • Fixed issue with missing outputpath parameter.

v1.0.0 - 2023-07-10

  • Initial release of the script

Contributing

This project welcomes contributions and suggestions. If you are ready to contribute, please visit the contribution guide.

Maintainers

License

This project is licensed under the MIT License.

About

Generate technical Markdown documentation for your Azure Logic App and Power Automate Flows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published