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": "CWF-610 Performance Metrics Collector Canonical",
"description": "Collects performance metrics: engagement rates, view duration, audience retention curves.",
"nodes": [
{
"parameters": {},
"id": "cwf610_trigger_node",
"name": "Trigger Node",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1,
"position": [
200,
300
]
},
{
"parameters": {
"jsCode": "const metrics = { views: Math.floor(Math.random() * 10000) + 1000, likes: Math.floor(Math.random() * 500) + 50, shares: Math.floor(Math.random() * 200) + 10, comments: Math.floor(Math.random() * 300) + 20, avg_watch_duration_sec: Math.floor(Math.random() * 300) + 60, engagement_rate: (Math.random() * 0.15 + 0.02).toFixed(3), retention_curve: [1.0, 0.95, 0.87, 0.76, 0.65, 0.52, 0.41] }; return [{ json: { ...$json, performance_metrics: metrics, metrics_collected_at: new Date().toISOString() } }];"
},
"id": "cwf610_metrics_collector_node",
"name": "Metrics Collector Node",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
420,
300
]
},
{
"parameters": {
"jsCode": "const packet = { instance_id: 'PERF-' + Date.now(), artifact_family: 'performance_metrics_packet', schema_version: '1.0.0', producer_workflow: 'CWF-610', dossier_ref: $json.dossier_id || 'DOSSIER-UNSPECIFIED', created_at: new Date().toISOString(), status: 'CREATED', payload: { metrics_complete: true, views: $json.performance_metrics.views, likes: $json.performance_metrics.likes, shares: $json.performance_metrics.shares, comments: $json.performance_metrics.comments, avg_watch_duration_sec: $json.performance_metrics.avg_watch_duration_sec, engagement_rate: parseFloat($json.performance_metrics.engagement_rate), retention_curve: $json.performance_metrics.retention_curve } }; return [{ json: { ...$json, performance_metrics_packet: packet, packet_emitted: true } }];"
},
"id": "cwf610_packet_emission_node",
"name": "Packet Emission Node",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
640,
300
]
},
{
"parameters": {
"jsCode": "return [{ json: { ...$json, cwf610_result: { status: 'COMPLETED', performance_metrics_packet: $json.performance_metrics_packet, payload: { metrics_complete: true } } } }];"
},
"id": "cwf610_completion_node",
"name": "Completion Node",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
860,
300
]
},
{
"parameters": {
"jsCode": "try {\n const SkillLoader = require('../../../engine/skill_loader/skill_loader.js');\n const loader = new SkillLoader();\n\n if (!loader.skills_registry || Object.keys(loader.skills_registry).length === 0) {\n const initResult = await loader.initialize();\n if (initResult.status !== 'initialized') {\n throw new Error('Failed to initialize SkillLoader');\n }\n }\n\n const workflowId = 'CWF-610';\n const defaultSkillMap = {\"CWF-610\":\"M-185\",\"CWF-620\":\"M-200\",\"CWF-630\":\"M-215\"};\n const skillId = $json.skill_id || defaultSkillMap[workflowId] || 'M-185';\n const dossierId = $json.dossier_context?.dossier_id || $json.dossier_id || 'DOSSIER-UNSPECIFIED';\n\n const contextPacket = {\n dossier_id: dossierId,\n workflow_id: workflowId,\n ...(typeof $json.user_context === 'object' ? $json.user_context : {}),\n ...(typeof $json.route_context === 'object' ? $json.route_context : {})\n };\n\n const dossierState = typeof $json.dossier === 'object' ? $json.dossier : {};\n const result = await loader.executeSkill(skillId, contextPacket, dossierState);\n\n return [{\n json: {\n ...$json,\n phase8_runtime_probe: {\n workflow_id: workflowId,\n skill_id: skillId,\n status: result.status,\n had_error: result.status !== 'SUCCESS',\n error_message: result.status === 'SUCCESS' ? '' : String(result.error || ''),\n timestamp: new Date().toISOString()\n },\n runtime_packet: result.status === 'SUCCESS' ? (result.output || null) : null,\n skill_execution_result: result.status === 'SUCCESS' ? result : null,\n runtime: {\n had_error: result.status !== 'SUCCESS',\n error_message: result.status === 'SUCCESS' ? '' : String(result.error || '')\n }\n }\n }];\n} catch (error) {\n const message = String(error && error.message ? error.message : error);\n return [{\n json: {\n ...$json,\n phase8_runtime_probe: {\n workflow_id: 'CWF-610',\n skill_id: null,\n status: 'ERROR',\n had_error: true,\n error_message: message,\n timestamp: new Date().toISOString()\n },\n runtime_packet: null,\n skill_execution_result: null,\n runtime: { had_error: true, error_message: message }\n }\n }];\n}"
},
"id": "cwf610_skill_runtime_probe_node",
"name": "Skill Runtime Probe Node",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
420,
300
]
}
],
"connections": {
"Trigger Node": {
"main": [
[
{
"node": "Skill Runtime Probe Node",
"type": "main",
"index": 0
}
]
]
},
"Metrics Collector Node": {
"main": [
[
{
"node": "Packet Emission Node",
"type": "main",
"index": 0
}
]
]
},
"Packet Emission Node": {
"main": [
[
{
"node": "Completion Node",
"type": "main",
"index": 0
}
]
]
},
"Completion Node": {
"main": [
[]
]
},
"Skill Runtime Probe Node": {
"main": [
[
{
"node": "Metrics Collector Node",
"type": "main",
"index": 0
}
]
]
}
},
"meta": {
"workflow_id": "CWF-610",
"phase": "phase1",
"vein": "analytics_vein",
"purpose": "Performance metrics collection from published content.",
"implementation_depth": "production_grade",
"owner_director": "chandra",
"next_workflow": "CWF-620",
"canonical_file": "n8n/workflows/CWF-610.json",
"wf900_error_route": "WF-900"
},
"active": true
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
CWF-610 Performance Metrics Collector Canonical. Uses executeWorkflowTrigger. Event-driven trigger; 5 nodes.
Source: https://github.com/justkalpane/Shadow-Creator-OS-Phase_01/blob/0447c2f91c0b7669a61f768fac60fa911acf2cc5/n8n/workflows/CWF-610.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.
Reagendamiento. Uses executeWorkflowTrigger, redis, n8n-nodes-evolution-api, dataTable. Event-driven trigger; 73 nodes.
Agendamiento. Uses n8n-nodes-evolution-api, redis, dataTable, executeWorkflowTrigger. Event-driven trigger; 60 nodes.
Prevent concurrent workflow runs using Redis. Uses executeWorkflowTrigger, manualTrigger, stickyNote, executeWorkflow. Event-driven trigger; 43 nodes.
This workflow sets a small "lock" value in Redis so that only one copy of a long job can run at the same time. If another trigger fires while the job is still busy, the workflow sees the lock, stops e
Cancelacion. Uses executeWorkflowTrigger, redis, n8n-nodes-evolution-api, dataTable. Event-driven trigger; 36 nodes.