280+ free n8n automation templates — ready-to-use workflows for Gmail, Telegram, Slack, Discord, WhatsApp, Google Drive, Notion, OpenAI, and more. AI agents, RAG chatbots, email automation, social media, DevOps, and document processing. The largest open-source n8n template collection.
HTML ai-agentsai-automationautomationautomation-templatesawesomeawesome-listintegrationlow-coden8nn8n-automationn8n-templateno-code-aino-code-automationself-hostedtelegram-botworkflow-automation
Add signed webhook HMAC guard
Automation Note598c4e3170a0
diff --git a/Other_Integrations_and_Use_Cases/Signed Webhook HMAC Guard with Timestamp Window.json b/Other_Integrations_and_Use_Cases/Signed Webhook HMAC Guard with Timestamp Window.jsonnew file mode 100644index 0000000..035df5c--- /dev/null+++ b/Other_Integrations_and_Use_Cases/Signed Webhook HMAC Guard with Timestamp Window.json@@ -0,0 +1,226 @@+{+ "id": "SignedWebhookHmacGuard01",+ "name": "Signed Webhook HMAC Guard with Timestamp Window",+ "description": "Verifies an HMAC-SHA256 signature against the exact raw JSON webhook body, checks a signed timestamp window and event ID, and returns a generic 401 before any business logic runs.",+ "active": false,+ "isArchived": false,+ "nodes": [+ {+ "parameters": {+ "content": "## Verify a signed webhook before business logic\n\n### Who this is for\nAutomation teams receiving server-to-server webhooks from a provider that signs the exact request body with HMAC-SHA256.\n\n### Contract used by this template\n- Header: `X-Automation-Signature: sha256=<hex digest; comparison is case-insensitive>`\n- Signature input: the exact raw request body bytes\n- Body fields: `event_id`, signed Unix timestamp `sent_at`, and `payload`\n- Freshness: no more than 300 seconds old or 60 seconds in the future\n\n### Set up\n1. Keep the workflow inactive after import.\n2. Create an n8n Crypto credential with the shared HMAC secret.\n3. Assign it to **Compute Body HMAC**.\n4. Match the provider's exact header, canonical string, digest encoding, and timestamp rules.\n5. Add business nodes only after the true output of **Is Request Authentic and Fresh**.\n\n### Boundaries\nThe timestamp limits replay time but does not stop duplicate delivery inside the five-minute window. Add persistent event-ID deduplication for strict once-only handling. Apply rate and body-size limits before n8n. Generic `401` responses avoid exposing which check failed. The public workflow contains no credential or real data.",+ "height": 720,+ "width": 620,+ "color": 4+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -700,+ -300+ ],+ "id": "42c702f5-c54d-4d06-a1a3-9f550bc9c117",+ "name": "Template Guide"+ },+ {+ "parameters": {+ "httpMethod": "POST",+ "path": "signed-webhook-hmac-guard",+ "authentication": "none",+ "responseMode": "responseNode",+ "options": {+ "rawBody": true+ }+ },+ "type": "n8n-nodes-base.webhook",+ "typeVersion": 2.1,+ "position": [+ 0,+ 120+ ],+ "id": "a676a3b6-9f00-4b8f-8331-f355e509939f",+ "name": "Receive Signed Webhook",+ "webhookId": "29d885d2-12fb-4efc-8ac5-5c9ee37a4f7a"+ },+ {+ "parameters": {+ "action": "hmac",+ "binaryData": true,+ "binaryPropertyName": "data",+ "type": "SHA256",+ "dataPropertyName": "expected_signature",+ "encoding": "hex"+ },+ "type": "n8n-nodes-base.crypto",+ "typeVersion": 2,+ "position": [+ 260,+ 120+ ],+ "id": "08dc63de-1991-4d3f-a5ad-057096fd093a",+ "name": "Compute Body HMAC"+ },+ {+ "parameters": {+ "jsCode": "const input = $input.first().json;\nconst headers = input.headers ?? {};\nconst received = typeof headers['x-automation-signature'] === 'string'\n ? headers['x-automation-signature'].trim().toLowerCase()\n : '';\nconst digest = typeof input.expected_signature === 'string'\n ? input.expected_signature.toLowerCase()\n : '';\nconst expected = `sha256=${digest}`;\nconst signatureFormatValid = /^sha256=[a-f0-9]{64}$/.test(received) && /^sha256=[a-f0-9]{64}$/.test(expected);\nlet signatureMismatch = 1;\nif (signatureFormatValid) {\n signatureMismatch = 0;\n for (let index = 0; index < expected.length; index += 1) {\n signatureMismatch |= expected.charCodeAt(index) ^ received.charCodeAt(index);\n }\n}\nconst body = input.body ?? {};\nconst sentAt = body.sent_at;\nconst now = Math.floor(Date.now() / 1000);\nconst timestampValid = Number.isInteger(sentAt) && sentAt >= now - 300 && sentAt <= now + 60;\nconst eventId = typeof body.event_id === 'string' ? body.event_id : '';\nconst eventIdValid = /^evt_[A-Za-z0-9-]{8,64}$/.test(eventId);\nconst contentType = typeof headers['content-type'] === 'string' ? headers['content-type'].toLowerCase() : '';\nconst contentTypeValid = contentType.startsWith('application/json');\nconst signatureValid = signatureFormatValid && signatureMismatch === 0;\nreturn [{ json: {\n accepted: signatureValid && timestampValid && eventIdValid && contentTypeValid,\n event_id: eventIdValid ? eventId : null,\n authenticated: signatureValid,\n fresh: timestampValid,\n age_seconds: Number.isInteger(sentAt) ? now - sentAt : null,\n replay_window_seconds: 300\n} }];"+ },+ "type": "n8n-nodes-base.code",+ "typeVersion": 2,+ "position": [+ 520,+ 120+ ],+ "id": "2af5b1f2-4074-4c9b-9880-f81e64d9229c",+ "name": "Validate Signature and Timestamp"+ },+ {+ "parameters": {+ "conditions": {+ "boolean": [+ {+ "value1": "={{ $json.accepted }}",+ "operation": "equal",+ "value2": true+ }+ ]+ },+ "combineOperation": "all"+ },+ "type": "n8n-nodes-base.if",+ "typeVersion": 1,+ "position": [+ 780,+ 120+ ],+ "id": "e01cced2-e2e0-4bc9-9f24-ed02e33e3e70",+ "name": "Is Request Authentic and Fresh"+ },+ {+ "parameters": {+ "respondWith": "json",+ "responseBody": "={{ { ok: true, status: 'accepted', authenticated: true, event_id: $json.event_id, replay_window_seconds: $json.replay_window_seconds } }}",+ "options": {+ "responseCode": 200,+ "responseHeaders": {+ "entries": [+ {+ "name": "Cache-Control",+ "value": "no-store"+ },+ {+ "name": "X-Content-Type-Options",+ "value": "nosniff"+ }+ ]+ }+ }+ },+ "type": "n8n-nodes-base.respondToWebhook",+ "typeVersion": 1.4,+ "position": [+ 1040,+ 40+ ],+ "id": "59e351df-2536-4421-998b-28d327ee0380",+ "name": "Accept Authenticated Request"+ },+ {+ "parameters": {+ "respondWith": "json",+ "responseBody": "={{ { ok: false, status: 'rejected', reason: 'invalid_or_stale_signature' } }}",+ "options": {+ "responseCode": 401,+ "responseHeaders": {+ "entries": [+ {+ "name": "Cache-Control",+ "value": "no-store"+ },+ {+ "name": "X-Content-Type-Options",+ "value": "nosniff"+ }+ ]+ }+ }+ },+ "type": "n8n-nodes-base.respondToWebhook",+ "typeVersion": 1.4,+ "position": [+ 1040,+ 200+ ],+ "id": "6e298e1f-e13d-4c46-b147-44161e10f312",+ "name": "Reject Invalid or Stale Request"+ }+ ],+ "connections": {+ "Receive Signed Webhook": {+ "main": [+ [+ {+ "node": "Compute Body HMAC",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Compute Body HMAC": {+ "main": [+ [+ {+ "node": "Validate Signature and Timestamp",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Validate Signature and Timestamp": {+ "main": [+ [+ {+ "node": "Is Request Authentic and Fresh",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Is Request Authentic and Fresh": {+ "main": [+ [+ {+ "node": "Accept Authenticated Request",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "Reject Invalid or Stale Request",+ "type": "main",+ "index": 0+ }+ ]+ ]+ }+ },+ "settings": {+ "executionOrder": "v1"+ },+ "staticData": null,+ "meta": {+ "templateCredsSetupCompleted": false+ },+ "nodeGroups": [],+ "pinData": null,+ "versionId": "023c2355-740c-4b7c-823e-971e62ab3206",+ "activeVersionId": "023c2355-740c-4b7c-823e-971e62ab3206",+ "sourceWorkflowId": null,+ "tags": [],+ "versionMetadata": {+ "name": null,+ "description": null+ }+}diff --git a/README.md b/README.mdindex 9138294..bf7121a 100644--- a/README.md+++ b/README.md@@ -395,7 +395,7 @@ Explore 13 social media automation templates for n8n covering Instagram, Twitter### What other n8n integration templates are available?-This section includes 43 additional n8n integration templates covering a wide range of platforms and use cases. Highlights include API schema extraction, Pennylane invoice automation, Pinterest analysis with AI, SIEM alert enrichment with MITRE ATT&CK, Bitrix24 chatbots, GitLab code review with ChatGPT, LINE assistant integration, Spotify playlist archiving, Zoom meeting AI assistants, Siri AI agents via Apple Shortcuts, and Todoist inbox organization.+This section includes 44 additional n8n integration templates covering a wide range of platforms and use cases. Highlights include API schema extraction, Pennylane invoice automation, Pinterest analysis with AI, SIEM alert enrichment with MITRE ATT&CK, Bitrix24 chatbots, GitLab code review with ChatGPT, LINE assistant integration, Spotify playlist archiving, Zoom meeting AI assistants, Siri AI agents via Apple Shortcuts, and Todoist inbox organization.| Title | Description | Department | Link ||-------|-------------|------------|------|@@ -406,6 +406,7 @@ This section includes 43 additional n8n integration templates covering a wide ra| Synthetic Candidate Intake Reliability Harness | Runs six credential-free synthetic tests for candidate-intake deduplication, idempotency, partial-failure resume, invalid-input quarantine, and bounded 429 retry behavior. | HR/QA/Workflow Reliability | [Link to Template](Other_Integrations_and_Use_Cases/Synthetic%20Candidate%20Intake%20Reliability%20Harness.json) || Resilient REST API Sync with Retries, Validation, and Sanitized Errors | Demonstrates a credential-free REST API sync with bounded retries, record normalization, schema validation, and sanitized failure output. | Engineering/Workflow Reliability | [Link to Template](Other_Integrations_and_Use_Cases/Resilient%20REST%20API%20Sync%20with%20Retries,%20Validation,%20and%20Sanitized%20Errors.json) || Deterministic Exact-Match Quote Guard for AI and OCR Inputs | Validates untrusted extracted line items, accepts only exact synthetic catalog references, ignores claimed prices, and returns HTTP 422 with `NEEDS_REVIEW` and no total for caller-side handling. | Finance/QA/Workflow Reliability | [Link to Template](Other_Integrations_and_Use_Cases/Deterministic%20Exact-Match%20Quote%20Guard%20for%20AI%20and%20OCR%20Inputs.json) |+| Signed Webhook HMAC Guard with Timestamp Window | Verifies HMAC-SHA256 against the exact raw JSON body, checks a signed timestamp window and event ID, and returns a generic 401 before any business logic runs. | Engineering/Security/Workflow Reliability | [Link to Template](Other_Integrations_and_Use_Cases/Signed%20Webhook%20HMAC%20Guard%20with%20Timestamp%20Window.json) || Generate a Song via Webhook (Tunova / Suno API) | POST a prompt to a webhook and get back a finished Suno AI music track (audio URL) — a drop-in music-generation endpoint for your app. Core HTTP node; free API key at tunova.ai. | Engineering/Creative | [Link to Template](Other_Integrations_and_Use_Cases/Tunova%20-%20Generate%20a%20song%20via%20webhook.json) || Analyze feedback and send a message on Mattermost | Analyzes user feedback and sends notifications to Mattermost channels. | Support/Communication | [Link to Template](Other_Integrations_and_Use_Cases/Analyze%20feedback%20and%20send%20a%20message%20on%20Mattermost.json) || Analyze feedback using AWS Comprehend | Performs sentiment analysis on feedback using AWS Comprehend and sends results to Mattermost. | Support/AI | [Link to Template](Other_Integrations_and_Use_Cases/Analyze%20feedback%20using%20AWS%20Comprehend%20and%20send%20it%20to%20a%20Mattermost%20channel.json) |