{ "$schema": "./schema.txt", "description": "Example pipelines for Kverna Excel Add-in. Use these as templates for building your own pipelines.", "version": "1.0.0", "examples": [ { "id": "example-read-transform-write", "name": "Read, Transform, Write to Excel", "description": "Reads JSON from Azure Blob Storage, transforms with Python, writes to Excel sheet", "difficulty": "beginner", "tags": ["storage", "python", "excel"], "pipeline": { "id": "pipeline-read-transform-write", "name": "Read Transform Write", "version": "1.0.0", "nodes": [ { "id": "credentials", "type": "credentials", "position": { "x": 100, "y": 100 }, "config": { "authType": "interactive", "clientId": "YOUR_CLIENT_ID", "tenantId": "YOUR_TENANT_ID" } }, { "id": "storage-config", "type": "storage:config", "position": { "x": 100, "y": 250 }, "config": { "accountName": "yourstorageaccount" } }, { "id": "read-blob", "type": "storage:read", "position": { "x": 350, "y": 175 }, "config": { "containerName": "data", "blobName": "input.json" } }, { "id": "transform", "type": "transform:python", "position": { "x": 600, "y": 175 }, "config": { "code": "import json\n\n# Parse input JSON\ndata = json.loads(input_0)\n\n# Transform: extract names as 2D array for Excel\nresult = [[item['name'], item['value']] for item in data]\nresult" } }, { "id": "write-sheet", "type": "sheet:write", "position": { "x": 850, "y": 175 }, "config": { "sheetName": "Data", "startCell": "A1" } } ], "edges": [ { "id": "e1", "source": "credentials", "target": "read-blob", "sourceHandle": "credentials", "targetHandle": "credentials" }, { "id": "e2", "source": "storage-config", "target": "read-blob", "sourceHandle": "config-out", "targetHandle": "storage-config" }, { "id": "e3", "source": "read-blob", "target": "transform", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e4", "source": "read-blob", "target": "transform", "sourceHandle": "data-out", "targetHandle": "input-0" }, { "id": "e5", "source": "transform", "target": "write-sheet", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e6", "source": "transform", "target": "write-sheet", "sourceHandle": "data-out", "targetHandle": "data-in" } ], "triggers": [ { "type": "manual", "enabled": true } ] } }, { "id": "example-api-call", "name": "API Request to Excel", "description": "Calls an external API and writes the response to an Excel table", "difficulty": "beginner", "tags": ["api", "web", "excel"], "pipeline": { "id": "pipeline-api-to-excel", "name": "API to Excel", "version": "1.0.0", "nodes": [ { "id": "api-request", "type": "web:request", "position": { "x": 100, "y": 100 }, "config": { "url": "https://api.example.com/data", "method": "GET", "authentication": "none", "timeout": 30000 } }, { "id": "to-array", "type": "data:to-array", "position": { "x": 350, "y": 100 }, "config": { "inputFormat": "json" } }, { "id": "write-table", "type": "table:write", "position": { "x": 600, "y": 100 }, "config": { "tableName": "ApiData", "writeMode": "overwrite" } } ], "edges": [ { "id": "e1", "source": "api-request", "target": "to-array", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e2", "source": "api-request", "target": "to-array", "sourceHandle": "data-out", "targetHandle": "data-in" }, { "id": "e3", "source": "to-array", "target": "write-table", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e4", "source": "to-array", "target": "write-table", "sourceHandle": "data-out", "targetHandle": "data-in" } ], "triggers": [ { "type": "manual", "enabled": true } ] } }, { "id": "example-ai-analysis", "name": "AI Data Analysis", "description": "Reads Excel data, sends to AI for analysis, writes summary back", "difficulty": "intermediate", "tags": ["ai", "openai", "excel", "analysis"], "pipeline": { "id": "pipeline-ai-analysis", "name": "AI Analysis", "version": "1.0.0", "nodes": [ { "id": "credentials", "type": "credentials", "position": { "x": 100, "y": 100 }, "config": { "authType": "apiKey", "apiKey": "YOUR_OPENAI_API_KEY", "headerName": "Authorization", "headerPrefix": "Bearer " } }, { "id": "cors-proxy", "type": "web:cors-proxy", "position": { "x": 100, "y": 250 }, "config": { "provider": "cloudflare" } }, { "id": "read-table", "type": "table:read", "position": { "x": 350, "y": 100 }, "config": { "tableName": "SalesData", "includeHeaders": false } }, { "id": "ai-analyze", "type": "ai:evaluate", "position": { "x": 600, "y": 175 }, "config": { "provider": "openai", "model": "gpt-4o", "systemPrompt": "You are a data analyst. Analyze the provided data and give insights.", "prompt": "Analyze this sales data and provide key insights:\n\n", "temperature": 0.3, "maxTokens": 1000 } }, { "id": "write-result", "type": "sheet:write", "position": { "x": 850, "y": 175 }, "config": { "sheetName": "Analysis", "startCell": "A1" } } ], "edges": [ { "id": "e1", "source": "credentials", "target": "ai-analyze", "sourceHandle": "credentials", "targetHandle": "credentials" }, { "id": "e2", "source": "cors-proxy", "target": "ai-analyze", "sourceHandle": "proxy-out", "targetHandle": "proxy" }, { "id": "e3", "source": "read-table", "target": "ai-analyze", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e4", "source": "read-table", "target": "ai-analyze", "sourceHandle": "data-out", "targetHandle": "ordered-0" }, { "id": "e5", "source": "ai-analyze", "target": "write-result", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e6", "source": "ai-analyze", "target": "write-result", "sourceHandle": "data-out", "targetHandle": "data-in" } ], "triggers": [ { "type": "manual", "enabled": true } ] } }, { "id": "example-conditional-flow", "name": "Conditional Processing", "description": "Demonstrates branching logic based on data conditions", "difficulty": "intermediate", "tags": ["flow", "branch", "conditional"], "pipeline": { "id": "pipeline-conditional", "name": "Conditional Flow", "version": "1.0.0", "nodes": [ { "id": "read-data", "type": "sheet:read", "position": { "x": 100, "y": 200 }, "config": { "sheetName": "Input", "range": "A1:A1" } }, { "id": "check-value", "type": "transform:python", "position": { "x": 350, "y": 200 }, "config": { "code": "# Check if value is above threshold\nvalue = float(input_0[0][0]) if input_0 else 0\nresult = value > 100" } }, { "id": "branch", "type": "flow:branch", "position": { "x": 600, "y": 200 }, "config": { "trueLabel": "Above 100", "falseLabel": "Below 100" } }, { "id": "write-high", "type": "sheet:write", "position": { "x": 850, "y": 100 }, "config": { "sheetName": "Output", "startCell": "A1" } }, { "id": "write-low", "type": "sheet:write", "position": { "x": 850, "y": 300 }, "config": { "sheetName": "Output", "startCell": "B1" } } ], "edges": [ { "id": "e1", "source": "read-data", "target": "check-value", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e2", "source": "read-data", "target": "check-value", "sourceHandle": "data-out", "targetHandle": "input-0" }, { "id": "e3", "source": "check-value", "target": "branch", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e4", "source": "check-value", "target": "branch", "sourceHandle": "data-out", "targetHandle": "condition" }, { "id": "e5", "source": "branch", "target": "write-high", "sourceHandle": "execution-true", "targetHandle": "execution-in" }, { "id": "e6", "source": "branch", "target": "write-low", "sourceHandle": "execution-false", "targetHandle": "execution-in" } ], "triggers": [ { "type": "manual", "enabled": true } ] } }, { "id": "example-loop-processing", "name": "Loop Over Array Items", "description": "Demonstrates for-each loop to process array items individually", "difficulty": "intermediate", "tags": ["flow", "loop", "foreach"], "pipeline": { "id": "pipeline-loop", "name": "Loop Processing", "version": "1.0.0", "nodes": [ { "id": "read-data", "type": "table:read", "position": { "x": 100, "y": 200 }, "config": { "tableName": "Items", "includeHeaders": false } }, { "id": "foreach", "type": "flow:for-each", "position": { "x": 350, "y": 200 }, "config": {} }, { "id": "process-item", "type": "transform:python", "position": { "x": 600, "y": 150 }, "config": { "code": "# Process individual item\nitem = input_0\nprocessed = {'name': item['name'].upper(), 'processed': True}\nresult = processed" } }, { "id": "notify-complete", "type": "sheet:write", "position": { "x": 600, "y": 300 }, "config": { "sheetName": "Log", "startCell": "A1" } } ], "edges": [ { "id": "e1", "source": "read-data", "target": "foreach", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e2", "source": "read-data", "target": "foreach", "sourceHandle": "data-out", "targetHandle": "array-in" }, { "id": "e3", "source": "foreach", "target": "process-item", "sourceHandle": "loop-body", "targetHandle": "execution-in" }, { "id": "e4", "source": "foreach", "target": "process-item", "sourceHandle": "current-item", "targetHandle": "input-0" }, { "id": "e5", "source": "foreach", "target": "notify-complete", "sourceHandle": "loop-complete", "targetHandle": "execution-in" } ], "triggers": [ { "type": "manual", "enabled": true } ] } }, { "id": "example-keyvault-secret", "name": "Secure Secrets from Key Vault", "description": "Retrieves API keys securely from Azure Key Vault", "difficulty": "advanced", "tags": ["security", "keyvault", "azure"], "pipeline": { "id": "pipeline-keyvault", "name": "Key Vault Integration", "version": "1.0.0", "nodes": [ { "id": "credentials", "type": "credentials", "position": { "x": 100, "y": 100 }, "config": { "authType": "interactive", "clientId": "YOUR_CLIENT_ID", "tenantId": "YOUR_TENANT_ID" } }, { "id": "cors-proxy", "type": "web:cors-proxy", "position": { "x": 100, "y": 250 }, "config": { "provider": "local-python", "localPort": 9876 } }, { "id": "get-secret", "type": "keyvault:secret", "position": { "x": 350, "y": 175 }, "config": { "vaultName": "my-keyvault", "secretName": "api-key" } }, { "id": "use-secret", "type": "web:request", "position": { "x": 600, "y": 175 }, "config": { "url": "https://api.example.com/protected", "method": "GET", "authentication": "none", "headers": "{\"X-API-Key\": \"${secret}\"}" } } ], "edges": [ { "id": "e1", "source": "credentials", "target": "get-secret", "sourceHandle": "credentials", "targetHandle": "credentials" }, { "id": "e2", "source": "cors-proxy", "target": "get-secret", "sourceHandle": "proxy-out", "targetHandle": "proxy" }, { "id": "e3", "source": "get-secret", "target": "use-secret", "sourceHandle": "execution-out", "targetHandle": "execution-in" }, { "id": "e4", "source": "get-secret", "target": "use-secret", "sourceHandle": "data-out", "targetHandle": "url-input" } ], "triggers": [ { "type": "manual", "enabled": true } ] } } ] }