{
  "format": "chatigram-workflow",
  "version": 1,
  "metadata": {
    "sourceName": "Store webhook requests in a database",
    "importHelp": {
      "note": "Setup required. Set a fresh webhook secret, select the database/table, map request fields to columns, and configure the sending service. An empty values list must be mapped before use. 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": "WEBHOOK",
      "data": {
        "secretKey": "",
        "extractors": [
          {
            "$tag": "GetWholeAsString",
            "variableName": "payload"
          }
        ]
      }
    },
    "nodes": [
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000001",
        "name": "saveRequest",
        "parentId": null,
        "branchIndex": 0,
        "type": "DATABASE_INSERT_ROW",
        "data": {
          "databaseId": null,
          "tableId": null,
          "columns": [],
          "values": []
        }
      },
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000004",
        "name": "operationSucceeded",
        "parentId": "d0c00000-0000-4000-8000-000000000001",
        "branchIndex": 0,
        "type": "IF_STATEMENT",
        "data": {
          "condition": {
            "$tag": "StringComparison",
            "operator": "IS_EMPTY",
            "variable": "saveRequest.error",
            "rightOperand": {
              "$tag": "Constant",
              "value": ""
            },
            "ignoreCase": false,
            "valueType": "TEXT"
          }
        }
      },
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000002",
        "name": "storedRow",
        "parentId": "d0c00000-0000-4000-8000-000000000004",
        "branchIndex": 0,
        "type": "SET_VARIABLE",
        "data": {
          "variableValue": [
            {
              "$tag": "Variable",
              "name": "saveRequest.rowId"
            }
          ]
        }
      },
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000003",
        "name": "storageFailure",
        "parentId": "d0c00000-0000-4000-8000-000000000004",
        "branchIndex": 1,
        "type": "SET_VARIABLE",
        "data": {
          "variableValue": [
            {
              "$tag": "Constant",
              "value": "The request was not stored; inspect the run."
            }
          ]
        }
      }
    ],
    "gotos": []
  }
}
