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 →
{
"name": "Delete Credential (Mongo Remove)",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "delete-credential",
"options": {}
},
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
0,
0
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json.headers[\"x-acl-auth-key\"]}}",
"operation": "equal",
"value2": "={{$env.ACL_AUTH_KEY}}"
}
]
}
},
"name": "Security Guard",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
200,
0
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "{\"error\": \"Unauthorized\", \"message\": \"Invalid security token\"}",
"options": {
"responseCode": 401
}
},
"name": "Reject",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
200,
200
]
},
{
"parameters": {
"jsCode": "const b = $json.body || {}; return { json: { tokenId: String(b.tokenId || ''), serialNumber: String(b.serialNumber || '') } };"
},
"name": "Normalize Input",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [
400,
0
]
},
{
"parameters": {
"operation": "insert",
"collection": "audit_events",
"fields": {
"fields": [
{
"name": "event",
"value": "delete"
},
{
"name": "tokenId",
"value": "={{$json.tokenId}}"
},
{
"name": "serialNumber",
"value": "={{$json.serialNumber}}"
},
{
"name": "timestamp",
"value": "={{new Date().toISOString()}}"
}
]
}
},
"name": "Insert Audit",
"type": "n8n-nodes-base.mongoDb",
"typeVersion": 1,
"position": [
600,
-120
],
"credentials": {
"mongoDb": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "delete",
"collection": "issued_credentials",
"query": "={ \"tokenId\": \"{{$json.tokenId}}\", \"serialNumber\": \"{{$json.serialNumber}}\" }"
},
"name": "Delete From Mongo",
"type": "n8n-nodes-base.mongoDb",
"typeVersion": 1,
"position": [
600,
40
],
"credentials": {
"mongoDb": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"respondWith": "json",
"responseBody": "{ \"success\": true, \"deleted\": true, \"tokenId\": \"={{$json.tokenId}}\", \"serialNumber\": \"={{$json.serialNumber}}\" }"
},
"name": "Respond",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
800,
0
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Security Guard",
"type": "main",
"index": 0
}
]
]
},
"Security Guard": {
"main": [
[
{
"node": "Normalize Input",
"type": "main",
"index": 0
}
],
[
{
"node": "Reject",
"type": "main",
"index": 0
}
]
]
},
"Normalize Input": {
"main": [
[
{
"node": "Insert Audit",
"type": "main",
"index": 0
}
],
[
{
"node": "Delete From Mongo",
"type": "main",
"index": 0
}
]
]
},
"Insert Audit": {
"main": [
[
{
"node": "Delete From Mongo",
"type": "main",
"index": 0
}
]
]
},
"Delete From Mongo": {
"main": [
[
{
"node": "Respond",
"type": "main",
"index": 0
}
]
]
}
}
}
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.
mongoDb
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Delete Credential (Mongo Remove). Uses mongoDb. Webhook trigger; 7 nodes.
Source: https://github.com/Aether-Connect-Labs/AcademicChain-Ledger/blob/main/n8n/workflows/delete-credential.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Orquestador Multichain AcademicChain. Uses httpRequest, moveBinaryData, mongoDb. Webhook trigger; 23 nodes.
⚠️ COMMUNITY TEMPLATE DISCLAIMER: This is a community-contributed template that uses ScrapeGraphAI (a community node). Please ensure you have the ScrapeGraphAI community node installed in your n8n ins
Auth Service (MongoDB Production). Uses mongoDb. Webhook trigger; 14 nodes.