Variables Dashboard

View and manage all workflow global variables in a dashboard table format

Overview

The node provides a dashboard interface to manage global workflow variables in n8n. It supports three main operations:

  • View All Variables: Displays all current global variables in a table format, optionally showing their types and formatted JSON values.
  • Bulk Set Variables: Allows setting multiple global variables at once by specifying their names, values, and types.
  • Clear All Variables: Deletes all global variables after explicit user confirmation.

This node is useful for workflows that require centralized management of global state or configuration data shared across executions. For example, you can bulk update API tokens, view all stored settings, or reset all variables before starting a new process.

Properties

Name Meaning
Confirm Clear All Boolean flag to confirm deletion of all global variables (required for the "Clear All Variables" operation).
Display Options Collection of options affecting output display when viewing variables:
- Show Variable Types Include variable types (string, number, boolean, object, array) in the output.
- Format JSON Pretty-format JSON values for better readability when displaying objects or arrays.
- Sort Variables How to sort variables in the output list: Name (A-Z), Name (Z-A), Type, or None.

Output

The node outputs a single item with a json field whose structure depends on the selected operation:

  • View All Variables:

    {
      "dashboard": "Global Variables",
      "totalVariables": 5,
      "variables": [
        {
          "name": "apiKey",
          "value": "12345",
          "type": "string",          // Present if Show Variable Types enabled
          "rawValue": "12345"
        },
        ...
      ],
      "variablesSummary": {
        "totalCount": 5,
        "byType": {
          "string": 3,
          "number": 1,
          "object": 1
        }
      },
      "lastUpdated": "2024-06-01T12:00:00.000Z"
    }
    
    • variables is an array of all global variables with optional type info and pretty-formatted JSON values.
    • variablesSummary provides counts grouped by variable type.
    • lastUpdated is the ISO timestamp of the output generation.
  • Bulk Set Variables:

    {
      "operation": "bulkSet",
      "variablesProcessed": 3,
      "successCount": 2,
      "errorCount": 1,
      "results": [
        {
          "name": "var1",
          "value": 42,
          "status": "success"
        },
        {
          "name": "var2",
          "value": "abc",
          "status": "error",
          "error": "Cannot convert \"abc\" to number"
        }
      ],
      "timestamp": "2024-06-01T12:00:00.000Z"
    }
    
    • Reports success or error status per variable set attempt, including error messages for invalid conversions.
  • Clear All Variables:

    {
      "operation": "clearAll",
      "clearedVariables": ["var1", "var2", "var3"],
      "clearedCount": 3,
      "timestamp": "2024-06-01T12:00:00.000Z",
      "message": "Successfully cleared 3 variables"
    }
    
    • Lists all cleared variable names and count, confirming successful deletion.

The node does not output binary data.

Dependencies

  • Requires access to the workflow's global static data storage to read, write, and delete global variables.
  • No external services or API keys are needed.
  • No special environment variables or credentials required.

Troubleshooting

  • Error: "Please confirm that you want to clear all variables by checking the confirmation checkbox"
    Occurs if attempting to clear all variables without enabling the confirmation property. To fix, check the "Confirm Clear All" box.

  • Error: "Cannot convert "" to "
    Happens during bulk set if a variable value cannot be converted to the specified type (e.g., string "abc" to number). Ensure values match the declared types or provide valid JSON for objects/arrays.

  • Invalid JSON errors
    When setting variables of type object or array, the input must be valid JSON strings or native objects/arrays. Malformed JSON will cause parsing errors.

  • Empty variable name in bulk set
    Variables must have non-empty names; otherwise, they are skipped with an error status.

Links and References

Discussion