{
  "meta": {
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:51.332309",
    "updatedAt": "2025-09-29T07:07:51.333109",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "nodes": [
    {
      "id": "d496660c-88be-4130-ad6c-32e55f820af0",
      "name": "Set Default Error Workflow",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1700,
        500
      ],
      "parameters": {
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "workflow_entity",
          "cachedResultName": "workflow_entity"
        },
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        },
        "columns": {
          "value": {
            "id": "={{ $json.id }}",
            "settings": "={{ JSON.stringify({ ...$json.settings, errorWorkflow: $('Set Vars').item.json.default_error_workflow_id }, null, null) }}"
          },
          "schema": [
            {
              "id": "name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": true,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "active",
              "type": "boolean",
              "display": true,
              "removed": true,
              "required": true,
              "displayName": "active",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "nodes",
              "type": "object",
              "display": true,
              "removed": true,
              "required": true,
              "displayName": "nodes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "connections",
              "type": "object",
              "display": true,
              "removed": true,
              "required": true,
              "displayName": "connections",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "createdAt",
              "type": "dateTime",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "createdAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "updatedAt",
              "type": "dateTime",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "updatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "settings",
              "type": "object",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "settings",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "staticData",
              "type": "object",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "staticData",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "pinData",
              "type": "object",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "pinData",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "versionId",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "versionId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "triggerCount",
              "type": "number",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "triggerCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": true,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "meta",
              "type": "object",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "meta",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ]
        },
        "options": {},
        "operation": "update"
      },
      "retryOnFail": true,
      "typeVersion": 2.3,
      "notes": "This postgres node performs automated tasks as part of the workflow."
    },
    {
      "id": "334c557c-bc6c-44f8-85ac-3cacc145cf2f",
      "name": "Set Vars",
      "type": "n8n-nodes-base.set",
      "position": [
        1040,
        500
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b2302801-f93e-4134-a785-47454dfe31d4",
              "name": "default_error_workflow_id",
              "type": "string",
              "value": "2fgSBCqYJyEZWtTO"
            },
            {
              "id": "efe2c80d-2b98-4a6b-8f76-7e2d5866c4ea",
              "name": "default_error_exclusion_tag",
              "type": "string",
              "value": "default_error:false"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 3.3,
      "notes": "This set node performs automated tasks as part of the workflow."
    },
    {
      "id": "858d36f2-1024-43dd-89e9-00402fb1bae2",
      "name": "Exclude default_error:false Tagged Workflows",
      "type": "n8n-nodes-base.filter",
      "position": [
        1480,
        500
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "911501c7-18cc-4292-a4e8-fe8f8c3cb8aa",
              "operator": {
                "type": "boolean",
                "operation": "false",
                "singleValue": true
              },
              "leftValue": "={{ $json.tags.some(item => item.name === $('Set Vars').item.json.default_error_exclusion_tag) }}",
              "rightValue": ""
            },
            {
              "id": "e22db4f5-ec03-4000-a996-d3150db17a73",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.settings.errorWorkflow ? $json.settings.errorWorkflow : \"\" }}",
              "rightValue": "={{ $('Set Vars').item.json.default_error_workflow_id }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 2,
      "notes": "This filter node performs automated tasks as part of the workflow."
    },
    {
      "id": "f0ac7515-8175-458c-9357-b5246019a22c",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        780,
        580
      ],
      "parameters": {},
      "typeVersion": 1,
      "notes": "This manualTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "2545b766-a0a0-4e31-9941-d51d5594aff6",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        780,
        400
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 4
            }
          ]
        }
      },
      "notesInFlow": false,
      "typeVersion": 1.1,
      "notes": "This scheduleTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "901e4df3-4dd3-4b92-ac09-555d51d2d7e9",
      "name": "Get All Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1260,
        500
      ],
      "parameters": {
        "filters": {}
      },
      "retryOnFail": true,
      "typeVersion": 1,
      "notes": "This n8n node performs automated tasks as part of the workflow."
    },
    {
      "id": "error-065757c3",
      "name": "Error Handler",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        1000,
        400
      ],
      "parameters": {
        "message": "Workflow execution error",
        "options": {}
      }
    }
  ],
  "pinData": {},
  "connections": {},
  "name": "Postgres Workflow",
  "description": "Automated workflow: Postgres Workflow. This workflow processes data and performs automated tasks.",
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
    "optimized"
  ],
  "notes": "Excellent quality workflow: Postgres Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."
}