{
  "name": "Ej1: WebHook",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "xgn-contact",
        "options": {
          "allowedOrigins": "*"
        }
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -480,
        0
      ],
      "id": "b347c97b-0816-4ff4-b336-4b74b26941cf",
      "name": "Webhook",
      "webhookId": "d046462f-6566-4791-a68e-1dd0c851f14a"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1scKI4fPudIptEazQLNdUFMMJq3fEYGhJv73KgUMWvVs",
          "mode": "list",
          "cachedResultName": "InnoIT contacts",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1scKI4fPudIptEazQLNdUFMMJq3fEYGhJv73KgUMWvVs/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1scKI4fPudIptEazQLNdUFMMJq3fEYGhJv73KgUMWvVs/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{ $json.body.email }}",
            "Message": "={{ $json.body.message }}",
            "Date": "={{ $json.body.timestamp }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Message",
              "displayName": "Message",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -112,
        112
      ],
      "id": "a9dc4dac-9ee5-4e5f-be4b-302cabb03f99",
      "name": "Append row in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "frSqKV3eztk8uUPR",
          "name": "Google Sheets marc@marcbenito.com"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "marc@marcbenito.com",
        "subject": "Nuevo contacto InnoIT",
        "emailType": "text",
        "message": "=email:  {{ $json.body.email }}\n\n{{ $json.body.message }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        -112,
        -128
      ],
      "id": "fe69c702-c379-40c3-8030-0cb227a24cb9",
      "name": "Send a message",
      "webhookId": "7738f1ee-d0e7-4288-9fd4-e774e4bdaf49",
      "credentials": {
        "gmailOAuth2": {
          "id": "zlwLZYlEoOax8x9n",
          "name": "Gmail account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        []
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a8d29560-0096-424f-8969-35246fb17b5f",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "edf65107f4e74e1fc40836f00996d676566a5287b4feb81d57380eb9da83ec7e"
  },
  "id": "irfvocoJPro8ThO3",
  "tags": [
    {
      "createdAt": "2025-10-17T20:29:05.379Z",
      "updatedAt": "2025-10-17T20:29:05.379Z",
      "id": "R02q32gn6O27XAZN",
      "name": "InnoIT"
    }
  ]
}