web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Use Chat GPT to document Power Automate Flows - combine JSON rows

(1) ShareShare
ReportReport
Posted on by 109
Hi, 
I have the requirement to document a list of Flows and Workflows from an environment.  In lieu of doing this in a manual and painstaking way, opening each Flow and documenting one by one in an excel template, I want to use Chat GPT prompts to document these in a table for me - listing each with a Process Name, Table name, Trigger, Condition(s), Action(s), etc.   

At this point I have a list of 163 Flows in a folder from solution that I exported.  They are each JSON files.  I tested out using Chat GPT to document the Flow by opening the first JOSN file, copying the code into a prompt, and telling Chat GPT to document it for me, calling out the columns in a table that I desired.  This worked.  

However, I don't want to open up each JSON file and do this over and over 162 more times.  So, I am looking for an efficient way to combine all 163 rows (or at least batches at a time) into a prompt so that this can be an easier process.   I don't know of a way to include the file itself into the prompt...is there a better way to get this done?  Looking for any ideas or suggestions.  Below is an example prompt I used for one line of JSON. 
Thanks in advance!  

I have a Dynamics 365 process, create a table that tells me the trigger, the table, the actions and what is updated based on the following definitions: <insert JSON code snippet here>
 
I have the same question (0)
  • Leah Ju Profile Picture
    Microsoft Employee on at
    Use Chat GPT to document Power Automate Flows - combine JSON rows
    Hi Partner,
    Based on your description:
    Essentially, you want to know how to log multiple Json files using Chat GPT.
    Maybe you need to find forums where chat GPT is discussed for help!
    Because the current forum is for discussing Dynamics 365 related products themselves.
  • haseem Profile Picture
    23 on at
    Use Chat GPT to document Power Automate Flows - combine JSON rows
    Using Python you can combine them into a single JSON array 
    Ex..
     
    import os
    import json
    # Path to the folder containing JSON files
    folder_path = 'path/to/json/files'
    # List to hold combined JSON data
    combined_data = []
    # Iterate through all JSON files in the folder
    for filename in os.listdir(folder_path):
        if filename.endswith('.json'):
            with open(os.path.join(folder_path, filename), 'r') as file:
                data = json.load(file)
                combined_data.append(data)
    # Save combined data to a new JSON file
    with open('combined_flows.json', 'w') as outfile:
        json.dump(combined_data, outfile)
     
     
    create a prompt for ChatGPT includes multiple JSON rows.
     
     
    [
        {
            "Process Name": "Process 1",
            "Table Name": "Table 1",
            "Trigger": "When a record is created",
            "Conditions": "Status is Active",
            "Actions": ["Send an email", "Update record"]
        },
        {
            "Process Name": "Process 2",
            "Table Name": "Table 2",
            "Trigger": "When a record is updated",
            "Conditions": "Priority is High",
            "Actions": ["Create a task", "Notify manager"]
        }
        // Add more JSON rows as needed
    ]

     
     
    Use this prompt to instruct ChatGPT to generate a table from the combined JSON data.
     
    I have a Dynamics 365 process. Create a table that tells me the process name, table name, trigger, conditions, actions, and what is updated based on the following JSON data:
    [
        {"Process Name": "Process 1", "Table Name": "Table 1", "Trigger": "When a record is created", "Conditions": "Status is Active", "Actions": ["Send an email", "Update record"]},
        {"Process Name": "Process 2", "Table Name": "Table 2", "Trigger": "When a record is updated", "Conditions": "Priority is High", "Actions": ["Create a task", "Notify manager"]}
        // Add more JSON rows as needed
    ]
    Generate a table with columns: Process Name, Table Name, Trigger, Conditions, Actions, and Updates.
     
     
    I hope it helps 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 284

#2
Sohaib Cheema Profile Picture

Sohaib Cheema 104 User Group Leader

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 77

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans