Variables Dashboard

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

Overview

The node provides a dashboard interface to view and 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 variable types, formatted JSON values, and sorted by name or type.
  • Bulk Set Variables: Allows setting multiple global variables at once from a tabular input, specifying each variable's name, value, and type.
  • Clear All Variables: Removes all global variables after user confirmation.

This node is useful for workflows that rely on shared global state or configuration, enabling easy inspection and manipulation of these variables without manual coding. For example, you can bulk update environment flags, clear cached data, or audit current global variables during debugging.

Properties

Name Meaning
Operation The action to perform: "View All Variables", "Bulk Set Variables", or "Clear All Variables".
Variables Table (Shown only for Bulk Set) A table to define multiple variables with columns: Name, Value, and Type.
Confirm Clear (Shown only for Clear All) Checkbox to confirm clearing all global variables.
Display Options Collection of options controlling output display:
- Show Variable Types Boolean to include variable types in the output when viewing variables.
- Format JSON Boolean to pretty-format JSON values for better readability.
- Sort Variables How to sort variables in the output when viewing: "Name (A-Z)", "Name (Z-A)", "Type", or "None".

Output

The node outputs a single JSON object depending on the operation:

  • View All Variables:

    {
      "dashboard": "Global Variables",
      "totalVariables": <number>,
      "variables": [
        {
          "name": "<variableName>",
          "value": <variableValue or pretty JSON string>,
          "type": "<variableType>", // optional, if enabled
          "rawValue": <originalValue>
        },
        ...
      ],
      "variablesSummary": {
        "totalCount": <number>,
        "byType": {
          "<type>": <count>,
          ...
        }
      },
      "lastUpdated": "<ISO timestamp>"
    }
    

    This structure provides a comprehensive snapshot of all global variables, including counts by type and last update time.

  • Bulk Set Variables:

    {
      "operation": "bulkSet",
      "variablesProcessed": <number>,
      "successCount": <number>,
      "errorCount": <number>,
      "results": [
        {
          "name": "<variableName>",
          "value": <parsedValue>,
          "status": "success" | "error",
          "error": "<errorMessage>" // present if status is error
        },
        ...
      ],
      "timestamp": "<ISO timestamp>"
    }
    

    This output reports the result of attempting to set each variable, indicating success or failure with error details.

  • Clear All Variables:

    {
      "operation": "clearAll",
      "clearedVariables": ["<var1>", "<var2>", ...],
      "clearedCount": <number>,
      "timestamp": "<ISO timestamp>",
      "message": "Successfully cleared <number> variables"
    }
    

    Confirms which variables were cleared and how many.

No binary data output is produced by this node.

Dependencies

  • No external services or APIs are required.
  • The node operates on the n8n workflow's global static data storage.
  • No special credentials or environment variables are needed.

Troubleshooting

  • Error: "Please confirm that you want to clear all variables by checking the confirmation checkbox"
    Occurs if the user tries to clear all variables without enabling the confirmation checkbox. To fix, check the confirmation box before executing.

  • Error: "Cannot convert "" to number" or "Cannot convert "" to boolean"
    Happens when the provided variable value cannot be parsed into the specified type during bulk set. Ensure values match their declared types or provide valid JSON for objects/arrays.

  • Error: "Invalid JSON: "
    When parsing a string as JSON fails. Verify that JSON strings are correctly formatted.

  • Empty or missing variable names in bulk set
    Variables without a name will be rejected with an error status. Always provide a non-empty name.

Links and References

Discussion