automate-whatsapp
Builds and manages WhatsApp automation workflows, triggers, and state integrations using the Kapso platform.
Install
mkdir -p .claude/skills/automate-whatsapp-saminrules && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13876" && unzip -o skill.zip -d .claude/skills/automate-whatsapp-saminrules && rm skill.zipInstalls to .claude/skills/automate-whatsapp-saminrules
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Build WhatsApp automations with Kapso workflows: configure WhatsApp triggers, edit workflow graphs, manage executions, deploy functions, and use databases/integrations for state. Use when automatin...Key capabilities
- →Edit WhatsApp workflow graphs
- →Manage WhatsApp triggers
- →Debug WhatsApp workflow executions
- →Create and deploy custom functions
- →Set up agent nodes with app integrations
- →Perform database CRUD operations
How it works
The skill uses Node.js scripts to interact with the Kapso platform API, allowing for CRUD operations on workflows, triggers, functions, and database records for WhatsApp automations.
Inputs & outputs
When to use automate-whatsapp
- →Edit a WhatsApp automation workflow
- →Configure a new trigger
- →Inspect execution history
- →Manage workflow integrations
About this skill
Automate WhatsApp
When to use
Use this skill to build and run WhatsApp automations: workflow CRUD, graph edits, triggers, executions, function management, app integrations, and D1 database operations.
Setup
Env vars:
KAPSO_API_BASE_URL(host only, no/platform/v1)KAPSO_API_KEY
How to
Edit a workflow graph
- Fetch graph:
node scripts/get-graph.js <workflow_id>(note thelock_version) - Edit the JSON (see graph rules below)
- Validate:
node scripts/validate-graph.js --definition-file <path> - Update:
node scripts/update-graph.js <workflow_id> --expected-lock-version <n> --definition-file <path> - Re-fetch to confirm
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 <workflow_id> - Create:
node scripts/create-trigger.js <workflow_id> --trigger-type <type> --phone-number-id <id> - Toggle:
node scripts/update-trigger.js --trigger-id <id> --active true|false - Delete:
node scripts/delete-trigger.js --trigger-id <id>
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 <workflow_id> - Inspect:
node scripts/get-execution.js <execution-id> - Get value:
node scripts/get-context-value.js <execution-id> --variable-path vars.foo - Events:
node scripts/list-execution-events.js <execution-id>
Create and deploy a function
- Write code with handler signature (see function rules below)
- Create:
node scripts/create-function.js --name <name> --code-file <path> - Deploy:
node scripts/deploy-function.js --function-id <id> - Verify:
node scripts/get-function.js --function-id <id>
Set up agent node with app integrations
- Find model:
node scripts/list-provider-models.js - Find account:
node scripts/list-accounts.js --app-slug <slug>(usepipedream_account_id) - Find action:
node scripts/search-actions.js --query <word> --app-slug <slug>(action_id = key) - Create integration:
node scripts/create-integration.js --action-id <id> --app-slug <slug> --account-id <id> --configured-props <json> - Add tools to agent node via
flow_agent_app_integration_tools
Database CRUD
- List tables:
node scripts/list-tables.js - Query:
node scripts/query-rows.js --table <name> --filters <json> - Create/update/delete with row scripts
Graph rules
- Exactly one start node with
id=start - Never change existing node IDs
- Use
{node_type}_{timestamp_ms}for new node IDs - Non-decide nodes have 0 or 1 outgoing
nextedge - Decide edge labels must match
conditions[].label - Edge keys are
source/target/label(notfrom/to)
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
Responseobject
Execution context
Always use this structure:
vars- user-defined variablessystem- system variablescontext- channel datametadata- 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 |
OpenAPI
| Script | Purpose |
|---|---|
openapi-explore.mjs | Explore OpenAPI (search/op/schema/where) |
Install deps (once):
npm i
Examples:
node scripts/openapi-explore.mjs --spec workflows search "variables"
node scripts/openapi-explore.mjs --spec workflows op getWorkflowVariables
node scripts/openapi-explore.mjs --spec platform op queryDatabaseRows
Notes
- Prefer file paths over inline JSON (
--definition-file,--code-file) action_idis the same askeyfromsearch-actions--account-idusespipedream_account_idfromlist-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
integrate-whatsapp- Onboarding, webhooks, messaging, templates, flowsobserve-whatsapp- Debugging, logs, health checks
[automate-whatsapp file map]|root: .
|.:{package.json,SKILL.md}
|assets:{agent-app-integration-example.json,databases-example.json,function-decide-route-interactive-buttons.json,functions-example.json,workflow-agent-simple.json,workflow-api-template-wait-agent.json,workflow-customer-support-intake-agent.json,workflow-decision.json,workflow-interactive-buttons-decide-ai.json,workflow-interactive-buttons-decide-function.json,workflow-linear.json}
|references:{app-integrations.md,databases-reference.md,execution-context.md,function-contracts.md,functions-payloads.md,functions-reference.md,graph-contract.md,node-types.md,triggers.md,workflow-overview.md,workflow-reference.md}
|scripts:{configure-prop.js,create-connect-token.js,create-function.js,create-integration.js,create-row.js,create-trigger.js,create-workflow.js,delete-integration.js,delete-row.js,delete-trigger.js,deploy-function.js,edit-graph.js,get-action-schema.js,get-context-value.js,get-execution-event.js,get-execution.js,get-function.js,get-graph.js,get-table.js,get-workflow.js,invoke-function.js,list-accounts.js,list-apps.js,list-execution-events.js,list-executions.js,list-function-invocations.js,list-functions.js,list-integrations.js,list-provider-models.js,list-tables.js,list-triggers.js,list-whatsapp-phone-numbers.js,list-workflows.js,openapi-explore.mjs,query-rows.js,reload-props.js,resume-execution.js,search-actions.js,update-execution-status.js,update-function.js,update-graph.js,update-integration.js,update-row.js,update-trigger.js,update-workflow-settings.js,upsert-row.js,validate-graph.js,variables-delete.js,variables-
---
*Content truncated.*
When not to use it
- →When KAPSO_API_BASE_URL environment variable is not set
- →When KAPSO_API_KEY environment variable is not set
Prerequisites
Limitations
- →The skill requires `KAPSO_API_BASE_URL` and `KAPSO_API_KEY` environment variables.
- →Workflow graph edits require fetching the `lock_version` and handling conflicts.
- →Custom functions must follow a specific handler signature and return a `Response` object.
How it compares
This skill provides a programmatic interface for building and managing WhatsApp automations, offering detailed control over workflow graphs, triggers, and functions, unlike a purely UI-driven approach.
Compared to similar skills
automate-whatsapp side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| automate-whatsapp (this skill) | 0 | 5mo | Review | Advanced |
| telegram-bot-builder | 106 | 6mo | Review | Intermediate |
| mcp-integration | 21 | 9mo | Review | Intermediate |
| n8n-workflow-patterns | 16 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by SaminRules
View all by SaminRules →You might also like
telegram-bot-builder
davila7
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.
mcp-integration
anthropics
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.
n8n-workflow-patterns
czlonkowski
Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.
n8n-code-javascript
czlonkowski
Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.
n8n-expression-syntax
czlonkowski
Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
n8n-node-configuration
czlonkowski
Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node_essentials and get_node_info, or learning common configuration patterns by node type.