[TIPS] "We cannot delete team account because it's used in 2 incomplete executions" > How to lookup through 100+ scenarios for retrieving "incomplete execution scenario"

While deleting an old connection, I get those error :

But how to retrieve the last “incomplete execution” information from a list of 100+ scenarios ?

Thanks to Make API module.


Here is the scenario :

The scenario is designed to identify Make scenarios with incomplete executions and log them into a Google Sheet for monitoring. The flow includes retrieving scenario folders, listing scenarios in a folder, checking for incomplete executions, and logging data.


Steps in Detail

  1. Retrieve Scenario Folders:

    • Module: make:listScenarioFolders
    • Purpose: Fetch a list of scenario folders available for a specific team.
    • Parameters:
      • Team ID (your teamID account)
      • Limit (100)
    • Output: Provides a list of folders, which serves as an input for subsequent steps.
  2. List All Scenarios:

    • Module: make:listScenarios
    • Purpose: List all scenarios in the selected folder.
    • Parameters:
      • Team ID (your teamID account)
      • Folder ID ({{3.id}}), dynamically mapped from the previous step.
      • Organization ID (your orgID account)
      • Limit (100)
    • Output: Retrieves scenario details (e.g., IDs, names) for scenarios in the specified folder.
  3. Delay (Sleep):

    • Module: util:FunctionSleep
    • Purpose: Introduce a delay of 10 seconds.
    • Parameters:
      • Duration (10 seconds)
    • Use Case: Ensures that we don’t reach the MAKE API rate limit before processing.
  4. Check for Incomplete Executions:

    • Module: make:listScenarioIncompleteExecutions
    • Purpose: Check if any of the listed scenarios have incomplete executions.
    • Parameters:
      • Limit (100)
      • Scenario ID dynamically mapped from the previous step.
    • Output: Generates a list of incomplete executions (if any) for the scenario.
  5. Filter: Log Only if Incomplete Executions Exist:

    • Condition: The total number of bundles from the “Check for Incomplete Executions” step is greater than 0
    • Purpose: Ensures that only scenarios with incomplete executions are logged into Google Sheets.
  6. Log to Google Sheets:

    • Module: google-sheets:addRow
    • Purpose: Log the details of scenarios with incomplete executions into a Google Sheet.
    • Parameters:
      • Sheet ID (Feuille 2)
      • Columns:
        • Scenario ID ({{1.id}})
        • Scenario Name ({{2.name}})
        • Dead Letter Queue (DLQ) URL (https://eu2.make.com/{orgID}/scenarios/{{2.id}}/dlq)

Let me know if that helps ! Hope it is :wink:

By the way I’ve found the culprit :
2025-01-28-13_14-48-575-Arc

2 Likes

Dammit I only have 98 scenarios, need two more scenarios to try this method out. :slightly_smiling_face: /s

1 Like

… and you’ll be good @kudracha :laughing: