AutomationFlowsEmail & Gmail › Alcovia Session Complete Notification

Alcovia Session Complete Notification

Alcovia Session Complete Notification. Uses httpRequest. Webhook trigger; 6 nodes.

Webhook trigger★★★★☆ complexity6 nodesHTTP Request
Email & Gmail Trigger: Webhook Nodes: 6 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
{
  "name": "Alcovia Session Complete Notification",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "session-complete",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Session Complete Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Deduplicate by eventId using workflow static data\nconst staticData = $getWorkflowStaticData('global');\nif (!staticData.seenEventIds) {\n  staticData.seenEventIds = {};\n}\n\nconst body = $input.first().json.body ?? $input.first().json;\nconst eventId = body.eventId;\n\nif (!eventId) {\n  return [{ json: { skip: true, reason: 'missing eventId' } }];\n}\n\nif (staticData.seenEventIds[eventId]) {\n  return [{ json: { skip: true, reason: 'duplicate', eventId } }];\n}\n\nstaticData.seenEventIds[eventId] = true;\n\nreturn [{\n  json: {\n    skip: false,\n    eventId,\n    message: body.message,\n    studentId: body.studentId,\n    streak: body.streak,\n    coins: body.coins,\n    sessionId: body.sessionId\n  }\n}];"
      },
      "id": "dedupe-code",
      "name": "Deduplicate by eventId",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        480,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "skip-check",
              "leftValue": "={{ $json.skip }}",
              "rightValue": false,
              "operator": {
                "type": "boolean",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "if-not-duplicate",
      "name": "If Not Duplicate",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        700,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://localhost:3001/api/notifications/mock",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ eventId: $json.eventId, message: $json.message, studentId: $json.studentId, streak: $json.streak, coins: $json.coins, sessionId: $json.sessionId, source: 'n8n' }) }}",
        "options": {}
      },
      "id": "mock-notification",
      "name": "Send to Mock Endpoint",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        940,
        220
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ received: true, eventId: $json.eventId }) }}"
      },
      "id": "respond-ok",
      "name": "Respond OK",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1160,
        220
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ received: true, skipped: true, eventId: $json.eventId }) }}"
      },
      "id": "respond-skip",
      "name": "Respond Skipped",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        940,
        400
      ]
    }
  ],
  "connections": {
    "Session Complete Webhook": {
      "main": [
        [
          {
            "node": "Deduplicate by eventId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deduplicate by eventId": {
      "main": [
        [
          {
            "node": "If Not Duplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Not Duplicate": {
      "main": [
        [
          {
            "node": "Send to Mock Endpoint",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond Skipped",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send to Mock Endpoint": {
      "main": [
        [
          {
            "node": "Respond OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "alcovia-v1",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "tags": []
}
Pro

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

About this workflow

Alcovia Session Complete Notification. Uses httpRequest. Webhook trigger; 6 nodes.

Source: https://github.com/itsishant/alcovia/blob/a1d5b7dad460d5aa3cf4094291737162bf0c3b58/n8n/n8n-workflow.json — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

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

Email & Gmail

Automate WhatsApp communication for recruitment agencies with an interactive, structured customer experience. This workflow handles pricing inquiries, request submissions, tracking, complaints, and hu

HTTP Request, Google Sheets, Gmail +1
Email & Gmail

This workflow automates HR onboarding by capturing new hires via a webhook, saving them to Google Sheets, emailing a Slack invite via Gmail, and notifying managers in Slack, then listening for Slack t

Google Sheets, Gmail, Slack +1
Email & Gmail

Fluxo Cadastro Original. Uses httpRequest, gmail. Webhook trigger; 67 nodes.

HTTP Request, Gmail
Email & Gmail

Hectelion | Evaluation d'entreprise. Uses googleDrive, httpRequest, microsoftOutlook, googleSheets. Webhook trigger; 64 nodes.

Google Drive, HTTP Request, Microsoft Outlook +1
Email & Gmail

Advanced AI Powered Document Parsing & Text Extraction with Llama Parse. Uses gmail, gmailTrigger, httpRequest, googleSheets. Webhook trigger; 54 nodes.

Gmail, Gmail Trigger, HTTP Request +3