AutomationFlowsGeneral › Log Impact via Webhook to MySQL

Log Impact via Webhook to MySQL

Original n8n title: Log Impact

Log Impact. Uses mySql, respondToWebhook. Webhook trigger; 5 nodes.

Webhook trigger★★★★☆ complexity5 nodesMySQL
General Trigger: Webhook Nodes: 5 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "R15XLElfkeozkhvH",
  "name": "Log Impact",
  "description": null,
  "active": true,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "path": "log-impact",
        "httpMethod": "POST",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-1",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const body = $input.item.json.body || $input.item.json;\nconst { \n  plan_id = 0, \n  file_path, \n  change_type, \n  description, \n  phase = 'adhoc',\n  status = 'completed',\n  created_by = 'claude'\n} = body;\n\nif (!file_path) {\n  throw new Error('file_path is required');\n}\n\nif (!change_type) {\n  throw new Error('change_type is required');\n}\n\nif (!description) {\n  throw new Error('description is required');\n}\n\nconst validChangeTypes = ['CREATE', 'MODIFY', 'DELETE', 'ANALYZE', 'DISCOVER', 'COMMUNICATE', 'PLAN'];\nif (!validChangeTypes.includes(change_type)) {\n  throw new Error(`Invalid change_type. Must be one of: ${validChangeTypes.join(', ')}`);\n}\n\nreturn {\n  json: {\n    plan_id,\n    file_path,\n    change_type,\n    description,\n    phase,\n    status,\n    created_by\n  }\n};"
      },
      "id": "validate-impact",
      "name": "Validate Impact",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "operation": "insert",
        "table": "plan_impacts",
        "columns": "plan_id, file_path, change_type, description, phase, status, created_by",
        "options": {}
      },
      "id": "insert-impact",
      "name": "Insert Impact",
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.5,
      "position": [
        680,
        300
      ],
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const impact = $('Validate Impact').item.json;\nconst insertResult = $input.item.json;\n\nreturn [{\n  json: {\n    success: true,\n    impact_id: insertResult.insertId || insertResult.id,\n    impact: {\n      plan_id: impact.plan_id,\n      file_path: impact.file_path,\n      change_type: impact.change_type,\n      description: impact.description\n    },\n    timestamp: impact.timestamp\n  }\n}];"
      },
      "id": "format-response",
      "name": "Format Response",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "allIncomingItems",
        "options": {}
      },
      "id": "webhook-response",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        1120,
        300
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Validate Impact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Impact": {
      "main": [
        [
          {
            "node": "Insert Impact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert Impact": {
      "main": [
        [
          {
            "node": "Format Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Response": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": true
  },
  "staticData": null,
  "versionId": "6329b5b4-ac25-467f-861a-5fd6c57c1409",
  "createdAt": "2025-12-21 02:17:45.436",
  "updatedAt": "2025-12-25 19:16:16.812"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Log Impact. Uses mySql, respondToWebhook. Webhook trigger; 5 nodes.

Source: https://github.com/pchambless/wf-monorepo/blob/47cd16469735c59a12b7c76e2552861f899e335d/.n8n/workflows/log-impact.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Module Dependency Analysis. Uses scheduleTrigger, mySql, respondToWebhook, httpRequest. Webhook trigger; 12 nodes.

MySQL, HTTP Request
General

Module Dependency Analysis. Uses scheduleTrigger, httpRequest, splitInBatches, mySql. Webhook trigger; 11 nodes.

HTTP Request, MySQL
General

Ai Automation Portfolio. Uses sendGrid, mySql. Webhook trigger; 10 nodes.

SendGrid, MySQL
General

Resolve Discussion. Uses mySql, respondToWebhook. Webhook trigger; 6 nodes.

MySQL
General

Adhoc Query. Uses executeWorkflowTrigger, mySql, respondToWebhook. Webhook trigger; 6 nodes.

Execute Workflow Trigger, MySQL