{
  "name": "CalcsLive Demo Workflow Template",
  "description": "Demonstrates @calcslive/n8n-nodes-calcslive custom node ({{ $env.WEBHOOK_URL }} that brings unit-aware physical quantities (PQ) and calculations to the n8n ecosystem in a composable manner. Example workflow with cylinder mass calculations.",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -128,
        -192
      ],
      "id": "c6331ca9-2a74-419e-a15f-a11e5f3c0583",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "articleId": "3M6UW7CQB-2AP",
        "inputPQs": {
          "pq": [
            {
              "symbol": "D",
              "value": 200,
              "unit": "mm"
            },
            {
              "symbol": "h",
              "value": 20,
              "unit": "cm"
            }
          ]
        },
        "outputPQs": {
          "pq": [
            {
              "symbol": "A",
              "unit": "m^2"
            },
            {
              "symbol": "V",
              "unit": "m^3"
            }
          ]
        }
      },
      "type": "@calcslive/n8n-nodes-calcslive.calcsLive",
      "typeVersion": 1,
      "position": [
        128,
        -80
      ],
      "id": "c22f212e-52ef-4d4f-b398-0bd4f2250705",
      "name": "Cylinder Calcs: (D, h) => (A, V)"
    },
    {
      "parameters": {
        "articleId": "3M6UW7CQB-2AP",
        "inputPQs": {
          "pq": [
            {
              "symbol": "d",
              "value": 360,
              "unit": "km"
            },
            {
              "symbol": "t",
              "value": 10,
              "unit": "h"
            }
          ]
        }
      },
      "type": "@calcslive/n8n-nodes-calcslive.calcsLive",
      "typeVersion": 1,
      "position": [
        336,
        -288
      ],
      "id": "9b8cc0ea-d130-48a3-8552-4346f20a5ad0",
      "name": "Speed Calc: (d, t) => v"
    },
    {
      "parameters": {
        "articleId": "3M6VLSBHB-3HT",
        "inputPQs": {
          "pq": [
            {
              "symbol": "ρ",
              "value": 1000,
              "unit": "kg/m^3"
            },
            {
              "symbol": "V",
              "value": "={{ $json.data.calculation.outputs.V.value }}",
              "unit": "={{ $json.data.calculation.outputs.V.unit }}"
            }
          ]
        },
        "outputPQs": {
          "pq": [
            {
              "symbol": "m",
              "unit": "kg"
            }
          ]
        }
      },
      "type": "@calcslive/n8n-nodes-calcslive.calcsLive",
      "typeVersion": 1,
      "position": [
        336,
        -80
      ],
      "id": "5bf3e5ab-d1f6-42e7-9e64-b4b78bcbfa99",
      "name": "Mass Calc: (ρ, V) => m"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a026dc84-665f-4898-8de9-ccdbaa530bfa",
              "name": "Distance",
              "value": 360,
              "type": "number"
            },
            {
              "id": "de7d6d3e-151c-4390-b2d9-bf78da0159eb",
              "name": "DistanceUnit",
              "value": "km",
              "type": "string"
            },
            {
              "id": "49c1e979-a0c2-403e-bed1-ef28eb8513ad",
              "name": "Time",
              "value": 2,
              "type": "number"
            },
            {
              "id": "54ae6f42-844f-4bf2-b6d3-a6e159d46e9e",
              "name": "TimeUnit",
              "value": "h",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        128,
        -288
      ],
      "id": "8b83b9e5-d7a4-4f74-b5bc-e6012a0f606a",
      "name": "Fields: (d, t)"
    },
    {
      "parameters": {
        "sendTo": "REPLACE_WITH_SENDTO",
        "subject": "CalcsLive Calculation Results",
        "message": "=Hello!\n\nThis is an automated email from your n8n workflow using @calcslive/n8n-nodes-calcslive.\n\nCalculation Results:\n- Total Physical Quantities: {{ $json.data.calculation.totalPQs }}\n- Mass Result: {{ $json.data.calculation.outputs.m.value }} {{ $json.data.calculation.outputs.m.unit }}\n\nBest regards,\nYour CalcsLive Workflow",
        "options": {
          "attachmentsUi": {
            "attachmentsBinary": []
          }
        }
      },
      "id": "2b48a81e-84f8-439d-aa58-6cc7b1c00480",
      "name": "Send Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        528,
        -80
      ]
    },
    {
      "id": "documentation-a2bd526f",
      "name": "Workflow Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        50,
        50
      ],
      "parameters": {
        "content": "# CalcsLive Demo Workflow Template\n\n## Overview\nDemonstrates @calcslive/n8n-nodes-calcslive custom node ({{ $env.WEBHOOK_URL }} that brings unit-aware physical quantities (PQ) and calculations to the n8n ecosystem in a composable manner. Example workflow with cylinder mass calculations.\n\n## Workflow Details\n- **Total Nodes**: 6\n- **Node Types**: 4\n- **Error Handling**: ✅ Implemented\n- **Security**: ✅ Hardened (no sensitive data)\n- **Documentation**: ✅ Complete\n\n## Node Breakdown\n- **When clicking 'Execute workflow'**: manualTrigger\n- **Cylinder Calcs: (D, h) => (A, V)**: calcsLive\n- **Speed Calc: (d, t) => v**: calcsLive\n- **Mass Calc: (ρ, V) => m**: calcsLive\n- **Fields: (d, t)**: set\n- **Send Email**: gmail\n\n## Usage Instructions\n1. **Configure Credentials**: Set up all required API keys and credentials\n2. **Update Variables**: Replace any placeholder values with actual data\n3. **Test Workflow**: Run in test mode to verify functionality\n4. **Deploy**: Activate the workflow for production use\n\n## Security Notes\n- All sensitive data has been removed or replaced with placeholders\n- Error handling is implemented for reliability\n- Follow security best practices when configuring credentials\n\n## Troubleshooting\n- Check error logs if workflow fails\n- Verify all credentials are properly configured\n- Ensure all required services are accessible\n"
      }
    },
    {
      "id": "fb421014-0f6a-507a-8238-d053d1e18416",
      "name": "Publication · Overview and setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -928,
        -288
      ],
      "parameters": {
        "content": "# CalcsLive Demo Workflow Template\n\n## Purpose and structure\nThis folder contains the **CalcsLive Demo Workflow Template** workflow. Its executable nodes use `calcsLive`, `gmail`, `manualTrigger`, `set`. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.\n\n## Setup\nImport inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.\n\n## Entry points\nWhen clicking 'Execute workflow'\n\n## Verification\nSanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.\n\n## Attribution\nhttps://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Calcslive/2058_Calcslive_Engineering_Calculations_Manual.json\nMIT; preserve source notices.",
        "width": 700,
        "height": 800,
        "color": 1
      }
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Fields: (d, t)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Cylinder Calcs: (D, h) => (A, V)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Speed Calc: (d, t) => v": {
      "main": [
        []
      ]
    },
    "Mass Calc: (ρ, V) => m": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fields: (d, t)": {
      "main": [
        [
          {
            "node": "Speed Calc: (d, t) => v",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cylinder Calcs: (D, h) => (A, V)": {
      "main": [
        [
          {
            "node": "Mass Calc: (ρ, V) => m",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC"
  }
}
