Kapso Automation When to use
Use this skill to build and run Kapso automation: workflow CRUD, graph edits, triggers, executions, function management, and D1 database operations.
Setup
Env vars:
KAPSO_API_BASE_URL (host only, no /platform/v1)
KAPSO_API_KEY
PROJECT_ID
How to
Edit a workflow graph
Fetch graph: node scripts/get-graph.js
For small edits, use edit-graph.js with --old-file and --new-file instead.
If you get a lock_version conflict: re-fetch, re-apply changes, retry with new lock_version.
Manage triggers
List: node scripts/list-triggers.js
For inbound_message triggers, first run node scripts/list-whatsapp-phone-numbers.js to get phone_number_id.
Debug executions
List: node scripts/list-executions.js
For full schema details, see references/graph-contract.md.
Function rules async function handler(request, env) { // Parse input const body = await request.json(); // Use env.KV and env.DB as needed return new Response(JSON.stringify({ result: "ok" })); }
Do NOT use export, export default, or arrow functions Return a Response object Execution context
Always use this structure:
vars - user-defined variables system - system variables context - channel data metadata - request metadata Scripts Workflows Script Purpose list-workflows.js List workflows (metadata only) get-workflow.js Get workflow metadata create-workflow.js Create a workflow update-workflow-settings.js Update workflow settings Graph Script Purpose get-graph.js Get workflow graph + lock_version edit-graph.js Patch graph via string replacement update-graph.js Replace entire graph validate-graph.js Validate graph structure locally Triggers Script Purpose list-triggers.js List triggers for a workflow create-trigger.js Create a trigger update-trigger.js Enable/disable a trigger delete-trigger.js Delete a trigger list-whatsapp-phone-numbers.js List phone numbers for trigger setup Executions Script Purpose list-executions.js List executions get-execution.js Get execution details get-context-value.js Read value from execution context update-execution-status.js Force execution state resume-execution.js Resume waiting execution list-execution-events.js List execution events Functions Script Purpose list-functions.js List project functions get-function.js Get function details + code create-function.js Create a function update-function.js Update function code deploy-function.js Deploy function to runtime invoke-function.js Invoke function with payload list-function-invocations.js List function invocations App integrations Script Purpose list-apps.js Search integration apps search-actions.js Search actions (action_id = key) get-action-schema.js Get action JSON schema list-accounts.js List connected accounts create-connect-token.js Create OAuth connect link configure-prop.js Resolve remote_options for a prop reload-props.js Reload dynamic props list-integrations.js List saved integrations create-integration.js Create an integration update-integration.js Update an integration delete-integration.js Delete an integration Databases Script Purpose list-tables.js List D1 tables get-table.js Get table schema + sample rows query-rows.js Query rows with filters create-row.js Create a row update-row.js Update rows upsert-row.js Upsert a row delete-row.js Delete rows Notes Prefer file paths over inline JSON (--definition-file, --code-file) action_id is the same as key from search-actions --account-id uses pipedream_account_id from list-accounts Variable CRUD (variables-set.js, variables-delete.js) is blocked - Platform API doesn't support it Raw SQL execution is not supported via Platform API References
Read before editing:
references/graph-contract.md - Graph schema, computed vs editable fields, lock_version references/node-types.md - Node types and config shapes references/workflow-overview.md - Execution flow and states
Other references:
references/execution-context.md - Context structure and variable substitution references/triggers.md - Trigger types and setup references/app-integrations.md - App integration and variable_definitions references/functions-reference.md - Function management references/functions-payloads.md - Payload shapes for functions references/databases-reference.md - Database operations Assets File Description workflow-linear.json Minimal linear workflow workflow-decision.json Minimal branching workflow workflow-agent-simple.json Minimal agent workflow workflow-customer-support-intake-agent.json Customer support intake workflow-interactive-buttons-decide-function.json Interactive buttons + decide (function) workflow-interactive-buttons-decide-ai.json Interactive buttons + decide (AI) workflow-api-template-wait-agent.json API trigger + template + agent function-decide-route-interactive-buttons.json Function for button routing agent-app-integration-example.json Agent node with app integrations Related skills whatsapp-messaging - WhatsApp messaging and templates whatsapp-flows - WhatsApp Flows kapso-api - Platform API and customers