{
  "format": "chatigram-workflow",
  "version": 1,
  "metadata": {
    "sourceName": "Send database changes to a webhook",
    "importHelp": {
      "note": "Setup required. Choose the source database/table and operations, then configure the notification URL and its authorization. Add only the permitted record fields to your payload. Placeholder endpoints use example.invalid and cannot call a real business service. Keep the workflow disabled until you finish the setup and review its effects."
    }
  },
  "workflow": {
    "instruction": null,
    "multiLanguageSupport": null,
    "properties": [],
    "trigger": {
      "$tag": "Trigger",
      "type": "DATABASE_OPERATION",
      "data": {
        "databaseId": null,
        "tableId": null,
        "columns": [],
        "operations": [
          "CREATED"
        ]
      }
    },
    "nodes": [
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000001",
        "name": "notify",
        "parentId": null,
        "branchIndex": 0,
        "type": "HTTP_REQUEST_NODE_TYPE",
        "data": {
          "request": {
            "method": "POST",
            "path": [
              {
                "$tag": "Constant",
                "value": "https://business-api.example.invalid/events/database"
              }
            ],
            "headers": [
              {
                "key": "Content-Type",
                "value": [
                  {
                    "$tag": "Constant",
                    "value": "application/json"
                  }
                ]
              }
            ],
            "queryStrings": [],
            "body": [
              {
                "$tag": "Constant",
                "value": "{\"operation\":\""
              },
              {
                "$tag": "Variable",
                "name": "trigger.operation"
              },
              {
                "$tag": "Constant",
                "value": "\"}"
              }
            ]
          },
          "responseHandlers": [
            {
              "$tag": "GetWholeAsString",
              "variableName": "response"
            }
          ]
        }
      },
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000002",
        "name": "delivered",
        "parentId": "d0c00000-0000-4000-8000-000000000001",
        "branchIndex": 0,
        "type": "SET_VARIABLE",
        "data": {
          "variableValue": [
            {
              "$tag": "Constant",
              "value": "The notification request completed."
            }
          ]
        }
      },
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000003",
        "name": "deliveryFailure",
        "parentId": "d0c00000-0000-4000-8000-000000000001",
        "branchIndex": 1,
        "type": "SET_VARIABLE",
        "data": {
          "variableValue": [
            {
              "$tag": "Constant",
              "value": "Notification failed; check the destination before retrying."
            }
          ]
        }
      }
    ],
    "gotos": []
  }
}
