This workflow follows the Executecommand → HTTP Request recipe pattern — see all workflows that pair these two integrations.
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": "Closed-lost monitor",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "closed-lost-trigger",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook",
"name": "Trigger webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
240,
320
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"trigger_type\"]}}",
"operation": "equal",
"value2": "champion_job_change"
}
]
}
},
"id": "is-champion-change",
"name": "Champion job change?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
460,
320
]
},
{
"parameters": {
"url": "https://api.apollo.io/v1/people/match",
"method": "POST",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Cache-Control",
"value": "no-cache"
},
{
"name": "X-Api-Key",
"value": "={{$env.APOLLO_API_KEY}}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "email",
"value": "={{$json[\"new_champion_email\"]}}"
}
]
}
},
"id": "apollo-enrich",
"name": "Apollo enrich new champion",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
680,
240
]
},
{
"parameters": {
"fileSelector": "/tmp/trigger_{{$json[\"deal_id\"]}}.json",
"dataType": "json",
"data": "={{ JSON.stringify([$json]) }}"
},
"id": "write-trigger",
"name": "Write trigger file",
"type": "n8n-nodes-base.writeBinaryFile",
"typeVersion": 1,
"position": [
900,
240
]
},
{
"parameters": {
"command": "=cd /opt/gtm-engineering && python automations/09-closed-lost-revival/monitor.py --triggers /tmp/trigger_{{$json[\"deal_id\"]}}.json --hubspot-update --slack --out /tmp/draft_{{$json[\"deal_id\"]}}.json"
},
"id": "run-monitor",
"name": "Draft re-engagement",
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
1120,
240
]
},
{
"parameters": {
"channel": "#deal-alerts",
"text": "=:rotating_light: Closed-lost trigger fired \u2014 *{{$json[\"account_name\"]}}* ({{$json[\"trigger_type\"]}}). Draft attached in HubSpot deal notes."
},
"id": "slack-notify",
"name": "Alert AE",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"position": [
1340,
240
],
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={\"status\":\"received\"}"
},
"id": "respond",
"name": "Respond to webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1560,
320
]
},
{
"parameters": {
"command": "=cd /opt/gtm-engineering && echo '[{{$json | json}}]' > /tmp/trigger_misc.json && python automations/09-closed-lost-revival/monitor.py --triggers /tmp/trigger_misc.json --hubspot-update --out /tmp/draft_misc.json"
},
"id": "run-monitor-generic",
"name": "Draft (other triggers)",
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
680,
400
]
}
],
"connections": {
"Trigger webhook": {
"main": [
[
{
"node": "Champion job change?",
"type": "main",
"index": 0
}
]
]
},
"Champion job change?": {
"main": [
[
{
"node": "Apollo enrich new champion",
"type": "main",
"index": 0
}
],
[
{
"node": "Draft (other triggers)",
"type": "main",
"index": 0
}
]
]
},
"Apollo enrich new champion": {
"main": [
[
{
"node": "Write trigger file",
"type": "main",
"index": 0
}
]
]
},
"Write trigger file": {
"main": [
[
{
"node": "Draft re-engagement",
"type": "main",
"index": 0
}
]
]
},
"Draft re-engagement": {
"main": [
[
{
"node": "Alert AE",
"type": "main",
"index": 0
}
]
]
},
"Alert AE": {
"main": [
[
{
"node": "Respond to webhook",
"type": "main",
"index": 0
}
]
]
},
"Draft (other triggers)": {
"main": [
[
{
"node": "Respond to webhook",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "closed-lost-v1",
"tags": [
"closed-lost",
"reengagement"
]
}
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.
slackApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Closed-lost monitor. Uses httpRequest, writeBinaryFile, executeCommand, slack. Webhook trigger; 8 nodes.
Source: https://github.com/elikem2021/gtm-engineering/blob/main/n8n/closed-lost-monitor.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.
HR teams, IT Operations, and System Administrators managing employee onboarding at scale. It’s perfect if you use Odoo 18 to trigger account requests and need Redmine + GitLab accounts created instant
This workflow is a complete, production-ready solution for recovering abandoned carts in Shopify stores using a multi-channel, multi-touch approach. It automates personalized follow-ups via Email, SMS
This workflow automates end-to-end research analysis by coordinating multiple AI models—including NVIDIA NIM (Llama), OpenAI GPT-4, and Claude to analyze uploaded documents, extract insights, and gene
PsyCardv2. Uses executeCommand, telegram, readBinaryFile, googleDrive. Webhook trigger; 41 nodes.
Are you tired of the repetitive dance between git push, creating a pull request in GitHub, updating the corresponding task in JIRA, and then manually notifying your team in Slack, or Notion?