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": "WF-DEMO-BUILD-TRIGGER",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "lead-positive-reply",
"options": {}
},
"id": "webhook-trigger",
"name": "Webhook: Positive Reply",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
240,
300
]
},
{
"parameters": {
"method": "GET",
"url": "=https://api.close.com/api/v1/lead/{{ $json.body.leadId }}/",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpBasicAuth",
"options": {}
},
"id": "get-lead",
"name": "Close CRM: Get Lead",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
460,
300
]
},
{
"parameters": {
"jsCode": "// Build the payload our /api/build-demo expects.\n// Pulls EVERY available enrichment field so the demo feels custom-built:\n// - basic info from Close CRM contacts/addresses\n// - real Google data (photos, reviews, hours, year founded) from Outscraper\n// cached in Close custom fields cf_real_photos / cf_real_reviews / etc.\n\nconst lead = $('Close CRM: Get Lead').first().json;\nconst webhookBody = $('Webhook: Positive Reply').first().json.body || {};\nconst cf = lead.custom || {};\n\nconst phone = lead.contacts?.[0]?.phones?.[0]?.phone || '';\nconst email = lead.contacts?.[0]?.emails?.[0]?.email || '';\nconst addr = lead.addresses?.[0] || {};\n\n// Parse JSON-string custom fields if present (Outscraper cache).\nfunction parseJSONField(val) {\n if (!val) return undefined;\n if (Array.isArray(val) || typeof val === 'object') return val;\n try { return JSON.parse(val); } catch { return undefined; }\n}\n\nreturn [{\n json: {\n leadId: lead.id,\n niche: cf.cf_niche || webhookBody.niche || 'plumbing',\n businessInfo: {\n // \u2500\u2500 basics \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n name: lead.display_name || lead.name,\n phone: phone,\n email: email,\n address: addr.address_1 || '',\n city: addr.city || cf.cf_city || '',\n state: addr.state || cf.cf_state || '',\n zip: addr.zipcode || '',\n services: cf.cf_services ? String(cf.cf_services).split(',').map(s => s.trim()) : [],\n\n // \u2500\u2500 google rating \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n rating: cf.cf_google_rating ? parseFloat(cf.cf_google_rating) : undefined,\n reviewCount: cf.cf_review_count ? parseInt(cf.cf_review_count) : undefined,\n\n // \u2500\u2500 \"feels custom\" enrichment from Outscraper \u2500\u2500\n realReviews: parseJSONField(cf.cf_real_reviews), // [{author, text, rating}, ...]\n realPhotos: parseJSONField(cf.cf_real_photos), // [\"url1\", \"url2\", ...]\n realHours: parseJSONField(cf.cf_real_hours), // {monday, tuesday, ...}\n yearEstablished: cf.cf_year_established ? parseInt(cf.cf_year_established) : undefined,\n logoUrl: cf.cf_logo_url || undefined,\n }\n }\n}];"
},
"id": "build-payload",
"name": "Code: Build Payload",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
680,
300
]
},
{
"parameters": {
"method": "POST",
"url": "=https://your-domain.com/api/build-demo",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify($json) }}",
"options": {
"timeout": 30000
}
},
"id": "call-build-api",
"name": "HTTP: Build Demo API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
900,
300
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "cond-success",
"leftValue": "={{ $json.success }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "if-success",
"name": "IF: Build Success?",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1120,
300
]
},
{
"parameters": {
"method": "POST",
"url": "https://api.close.com/api/v1/activity/sms/",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpBasicAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"lead_id\": \"{{ $('Webhook: Positive Reply').first().json.body.leadId }}\",\n \"local_phone\": \"{{ $env.CLOSE_FROM_PHONE }}\",\n \"text\": \"Hey \u2014 your preview is ready \ud83d\udee0\ufe0f\\n\\n\ud83d\udc49 {{ $('HTTP: Build Demo API').first().json.demoUrl }}\\n\\nBuilt in {{ Math.round($('HTTP: Build Demo API').first().json.buildTimeMs / 1000) }} seconds. Like it? Reply YES to lock it in.\",\n \"status\": \"outbox\"\n}"
},
"id": "send-demo-sms",
"name": "Close: Send Demo SMS",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1340,
200
]
},
{
"parameters": {
"method": "POST",
"url": "https://hooks.slack.com/services/YOUR/WEBHOOK/HERE",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"text\": \"\u26a0\ufe0f Demo build FAILED for lead {{ $('Webhook: Positive Reply').first().json.body.leadId }}\\nError: {{ $('HTTP: Build Demo API').first().json.error }}\"\n}"
},
"id": "slack-error",
"name": "Slack: Alert on Failure",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1340,
400
]
}
],
"connections": {
"Webhook: Positive Reply": {
"main": [
[
{
"node": "Close CRM: Get Lead",
"type": "main",
"index": 0
}
]
]
},
"Close CRM: Get Lead": {
"main": [
[
{
"node": "Code: Build Payload",
"type": "main",
"index": 0
}
]
]
},
"Code: Build Payload": {
"main": [
[
{
"node": "HTTP: Build Demo API",
"type": "main",
"index": 0
}
]
]
},
"HTTP: Build Demo API": {
"main": [
[
{
"node": "IF: Build Success?",
"type": "main",
"index": 0
}
]
]
},
"IF: Build Success?": {
"main": [
[
{
"node": "Close: Send Demo SMS",
"type": "main",
"index": 0
}
],
[
{
"node": "Slack: Alert on Failure",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"_notes": [
"BEFORE IMPORTING: replace YOUR/WEBHOOK/HERE in Slack node with real Slack webhook URL.",
"BEFORE IMPORTING: configure 'httpHeaderAuth' credential with Name='Authorization' Value='Bearer YOUR_N8N_API_KEY'.",
"BEFORE IMPORTING: configure 'closecrm' Close CRM credential (httpBasicAuth, user=API_KEY, password=blank).",
"Connect this workflow's Webhook URL as the destination for your existing reply-detection workflow when sentiment = positive."
]
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
WF-DEMO-BUILD-TRIGGER. Uses httpRequest. Webhook trigger; 7 nodes.
Source: https://github.com/rafiulislam4246/auto-website-sell-workflows/blob/main/n8n-workflows/WF-DEMO-BUILD-TRIGGER.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.
This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di
This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .
eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.
This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia
This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c