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": "Domain Status API",
"nodes": [
{
"parameters": {
"path": "domain-status",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
240,
400
]
},
{
"parameters": {
"jsCode": "const authHeader = $input.first().json.headers?.authorization || '';\nconst expectedKey = 'demo-key-change-me';\n\nif (authHeader !== `Bearer ${expectedKey}`) {\n return [{ json: { authorized: false, error: 'Unauthorized' } }];\n}\nreturn [{ json: { authorized: true } }];"
},
"id": "auth-check",
"name": "Auth Check",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
464,
400
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "c1",
"leftValue": "={{ $json.authorized }}",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "is-auth",
"name": "Is Authorized?",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
688,
400
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify({ error: 'Unauthorized' }) }}",
"options": {
"responseCode": 401
}
},
"id": "respond-unauth",
"name": "Respond Unauthorized",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
912,
560
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT DISTINCT ON (d.id) d.domain, dc.checked_at, dc.spf_valid, dc.dkim_valid, dc.dmarc_valid, dc.overall_status as status, jsonb_array_length(COALESCE(dc.blacklist_hits, '[]'::jsonb)) as blacklist_hits, jsonb_array_length(COALESCE(dc.mx_records, '[]'::jsonb)) as mx_count FROM monitored_domains d LEFT JOIN domain_checks dc ON dc.domain_id = d.id WHERE d.is_active = true ORDER BY d.id, dc.checked_at DESC",
"options": {}
},
"id": "query-status",
"name": "Query Latest Status",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.5,
"position": [
912,
304
],
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "const rows = $input.all().map(item => item.json);\nreturn [{ json: { domains: rows, checked_count: rows.length, last_updated: new Date().toISOString() } }];"
},
"id": "format-response",
"name": "Format Response",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1120,
304
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify($json) }}",
"options": {
"responseCode": 200
}
},
"id": "respond-ok",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1344,
304
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Auth Check",
"type": "main",
"index": 0
}
]
]
},
"Auth Check": {
"main": [
[
{
"node": "Is Authorized?",
"type": "main",
"index": 0
}
]
]
},
"Is Authorized?": {
"main": [
[
{
"node": "Query Latest Status",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond Unauthorized",
"type": "main",
"index": 0
}
]
]
},
"Query Latest Status": {
"main": [
[
{
"node": "Format Response",
"type": "main",
"index": 0
}
]
]
},
"Format Response": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"saveDataErrorExecution": "all",
"saveDataSuccessExecution": "all",
"saveManualExecutions": true,
"saveExecutionProgress": true
}
}
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.
postgres
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Domain Status API. Uses postgres. Webhook trigger; 7 nodes.
Source: https://github.com/NoaTubic/n8n-outbound-infra/blob/e9b8155fe322b1d677e45844ebb893a5c86cc3da/workflows/status-api.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.
Scraping. Uses httpRequest, postgres, @apify/n8n-nodes-apify, respondToWebhook. Webhook trigger; 61 nodes.
Workflow B — AI Listing Engine. Uses httpRequest, postgres, errorTrigger. Webhook trigger; 47 nodes.
This workflow automates data maturity evaluation to measure how well an organization uses data to create value by capturing assessment data through forms or APIs, processing and scoring responses usin