Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
gokapso avatar

Automate Whatsapp

  • 2.6k installs
  • 144 repo stars
  • Updated August 2, 2026
  • gokapso/agent-skills

automate-whatsapp is a Kapso skill for WhatsApp workflow automation, triggers, graph edits, and function deployment.

About

The automate-whatsapp skill builds WhatsApp automations with Kapso workflows covering CRUD, graph edits, triggers, executions, functions, and MCP tools. Preferred setup uses kapso login, kapso link, kapso pull, kapso build, and kapso push on source-controlled projects exporting a Workflow from @kapso/workflows in workflow.js or workflow.ts. Workflows add inbound_message triggers with phoneNumberId, nodes such as send_text, and edges from START to reply steps before dry-run push. Phone numbers resolve via kapso whatsapp numbers list and resolve commands before trigger creation. API script fallbacks fetch graphs with lock_version, validate JSON, and update with expected-lock-version to avoid conflicts. Graph rules require one start node id start, stable existing node IDs, timestamped new IDs, and decide edge labels matching conditions. Functions use async handler(request, env) returning Response without export defaults. Execution debugging lists runs, inspects context vars and system metadata, and reads execution events. Agent remote sandbox nodes mount GitHub repos under /workspace/repos for beta file-aware agents.

  • Preferred path uses kapso link, pull, build, and push on @kapso/workflows sources.
  • Resolve WhatsApp phone_number_id via CLI before inbound_message triggers.
  • Graph updates require lock_version; retry after re-fetch on conflict errors.
  • Functions use async handler returning Response without export or arrow wrappers.
  • Execution context splits vars, system, context channel data, and metadata fields.

Automate Whatsapp by the numbers

  • 2,557 all-time installs (skills.sh)
  • +66 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #165 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

automate-whatsapp capabilities & compatibility

Capabilities
local @kapso/workflows source sync with build an · graph fetch, validate, and lock_version safe upd · trigger crud for inbound_message phone number bi · execution listing, context inspection, and event · function create, deploy, and public endpoint con
Works with
slack
Use cases
orchestration · email
Pricing
Freemium
From the docs

What automate-whatsapp says it does

Use this skill to build and run WhatsApp automations: workflow CRUD, graph edits, triggers, executions
SKILL.md
npx skills add https://github.com/gokapso/agent-skills --skill automate-whatsapp

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.6k
repo stars144
Security audit2 / 3 scanners passed
Last updatedAugust 2, 2026
Repositorygokapso/agent-skills

How do I automate WhatsApp conversations with Kapso workflows and debug failing executions?

Build and debug Kapso WhatsApp workflow automations with local source sync, triggers, graph edits, executions, and function deploys.

Who is it for?

Teams building Kapso WhatsApp inbound support, notifications, or agent-driven message flows.

Skip if: Skip for non-WhatsApp channels or manual one-off SMS without Kapso workflow infrastructure.

When should I use this skill?

User mentions Kapso workflows, WhatsApp automation, inbound_message triggers, or workflow graph edits.

What you get

A deployed workflow with triggers, validated graph, and inspectable execution context for inbound messages.

  • WhatsApp flow configuration
  • Agent node setup
  • Button reply routing logic

Files

SKILL.mdMarkdownGitHub ↗

Automate WhatsApp

When to use

Use this skill to build and run WhatsApp automations: workflow CRUD, graph edits, triggers, executions, function management, webhook tools, and MCP tools.

Setup

Preferred path:

  • Kapso CLI installed and authenticated (kapso login)
  • For workflow and function edits, use source-controlled projects with kapso link, kapso pull, kapso build, and kapso push
  • For workflow code, use @kapso/workflows and export a Workflow instance from workflow.js or workflow.ts

Fallback path: Env vars:

  • KAPSO_API_BASE_URL (host only, no /platform/v1)
  • KAPSO_API_KEY

How to

Edit workflows locally

Use this path first when the user is working in, or can create, a local repo.

npm install -g @kapso/cli
npm install --save-dev @kapso/workflows
kapso login
kapso link --project <project-id>
kapso pull

Edit workflows/<workflow-slug>/workflow.js or workflow.ts with @kapso/workflows:

import { START, Workflow } from "@kapso/workflows";

const workflow = new Workflow("inbound-support", {
  name: "Inbound Support",
  status: "draft",
});

workflow.addTrigger({
  type: "inbound_message",
  phoneNumberId: "<phone-number-id>",
});

workflow.addNode(START, {
  position: { x: 100, y: 100 },
});

workflow.addNode("reply", {
  type: "send_text",
  message: "Thanks for reaching out.",
});

workflow.addEdge(START, "reply");

export default workflow;

Build and push:

kapso build
kapso push --dry-run
kapso push workflow <workflow-slug>

Use kapso push to push every local function and workflow. See references/local-workflow-source.md for repo layout, source-file behavior, and JSON-only editing.

Discover phone numbers first

Preferred path: 1. Check project state: kapso status 2. List connected numbers: kapso whatsapp numbers list --output json 3. Resolve a display number when needed: kapso whatsapp numbers resolve --phone-number "<display-number>" --output json

Fallback path: 1. List number configs for triggers: node scripts/list-whatsapp-phone-numbers.js

Edit a workflow graph through API scripts

Prefer local source sync for workflow edits. Use these scripts as a fallback for debugging, direct graph inspection, or API-only environments.

1. Fetch graph: node scripts/get-graph.js <workflow_id> (note the lock_version) 2. Edit the JSON (see graph rules below) 3. Validate: node scripts/validate-graph.js --definition-file <path> 4. Update: node scripts/update-graph.js <workflow_id> --expected-lock-version <n> --definition-file <path> 5. 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

1. List: node scripts/list-triggers.js <workflow_id> 2. Create: node scripts/create-trigger.js <workflow_id> --trigger-type <type> --phone-number-id <id> 3. Toggle: node scripts/update-trigger.js --trigger-id <id> --active true|false 4. Delete: node scripts/delete-trigger.js --trigger-id <id>

For inbound_message triggers, prefer kapso whatsapp numbers resolve --phone-number "<display-number>" --output json to get the exact phone_number_id. Fall back to node scripts/list-whatsapp-phone-numbers.js when the CLI is unavailable.

Debug executions

1. List: node scripts/list-executions.js <workflow_id> 2. Inspect: node scripts/get-execution.js <execution-id> 3. Get value: node scripts/get-context-value.js <execution-id> --variable-path vars.foo 4. Events: node scripts/list-execution-events.js <execution-id>

Create and deploy a function

1. Write code with handler signature (see function rules below) 2. Create: node scripts/create-function.js --name <name> --code-file <path> [--public-endpoint true] 3. Deploy: node scripts/deploy-function.js --function-id <id> 4. Verify: node scripts/get-function.js --function-id <id>

Use --public-endpoint true when the function should be callable without X-API-Key via the Kapso-hosted invoke URL. This is only supported for Cloudflare functions. New functions default to invoke_response_mode=passthrough, which returns the function body directly on successful invoke. Legacy wrapped functions can be migrated later with update-function.js.

Set up agent node with remote sandbox repositories

Use this when the agent needs a remote ephemeral workspace to inspect or modify repository files during a workflow run.

1. Read references/agent-remote-sandbox.md for the execution model and field rules 2. Find model: node scripts/list-provider-models.js 3. Copy assets/agent-remote-sandbox-github-repo-example.json as a starting point, or edit the agent node under data.config 4. Set sandbox_enabled: true 5. Set sandbox_network_mode to allow_all or allow_list 6. If using allow_list, add extra outbound hosts in sandbox_allowed_outbound_hosts 7. Add GitHub repositories to flow_agent_resources with:

  • resource_type: "github_repository"
  • repo_url
  • branch
  • pat

8. Write the system prompt so it explicitly reads from /workspace/repos/<repo-slug> before making changes 9. Validate and update the graph

Notes:

  • Remote sandbox is beta and free during the beta
  • sandbox_enabled controls whether the remote workspace and sandbox tools are available
  • Repository resources stay configured even if sandbox access is turned off later
  • v1 supports GitHub repositories only
  • Use a repository root URL, not a GitHub file URL or tree/... URL
  • Repositories are mounted into /workspace/repos/<repo-slug> inside the remote sandbox
  • Use references/agent-remote-sandbox.md and references/node-types.md for the exact shape

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 next edge
  • Decide edge labels must match conditions[].label
  • Edge keys are source/target/label (not from/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 secrets 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

ScriptPurpose
list-workflows.jsList workflows (metadata only)
get-workflow.jsGet workflow metadata
create-workflow.jsCreate a workflow
update-workflow-settings.jsUpdate workflow settings

Graph

ScriptPurpose
get-graph.jsGet workflow graph + lock_version
edit-graph.jsPatch graph via string replacement
update-graph.jsReplace entire graph
validate-graph.jsValidate graph structure locally

Triggers

ScriptPurpose
list-triggers.jsList triggers for a workflow
create-trigger.jsCreate a trigger
update-trigger.jsEnable/disable a trigger
delete-trigger.jsDelete a trigger
list-whatsapp-phone-numbers.jsList phone numbers for trigger setup

Executions

ScriptPurpose
list-executions.jsList executions
get-execution.jsGet execution details
get-context-value.jsRead value from execution context
update-execution-status.jsForce execution state
resume-execution.jsResume waiting execution
list-execution-events.jsList execution events

Functions

ScriptPurpose
list-functions.jsList project functions
get-function.jsGet function details + code
create-function.jsCreate a function, optionally with a public invoke endpoint
update-function.jsUpdate function code, public endpoint setting, or migrate a legacy wrapped function to passthrough
deploy-function.jsDeploy function to runtime
invoke-function.jsInvoke function with payload
list-function-invocations.jsList function invocations

OpenAPI

ScriptPurpose
openapi-explore.mjsExplore 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

Notes

  • Prefer file paths over inline JSON (--definition-file, --code-file)
  • Variable CRUD (variables-set.js, variables-delete.js) is blocked - Platform API doesn't support it

References

Read before editing:

  • references/local-workflow-source.md - CLI source sync, repo layout, and @kapso/workflows
  • 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/agent-remote-sandbox.md - Remote sandbox behavior, repo resources, mounted paths
  • references/functions-reference.md - Function management
  • references/functions-payloads.md - Payload shapes for functions

Assets

FileDescription
workflow-linear.jsonMinimal linear workflow
workflow-decision.jsonMinimal branching workflow
workflow-agent-simple.jsonMinimal agent workflow
workflow-customer-support-intake-agent.jsonCustomer support intake
workflow-interactive-buttons-decide-function.jsonInteractive buttons + decide (function)
workflow-interactive-buttons-decide-ai.jsonInteractive buttons + decide (AI)
workflow-api-template-wait-agent.jsonAPI trigger + template + agent
function-decide-route-interactive-buttons.jsonFunction for button routing
agent-remote-sandbox-github-repo-example.jsonAgent node with remote sandbox + GitHub repo resource

Related skills

  • integrate-whatsapp - Onboarding, webhooks, messaging, templates, flows
  • observe-whatsapp - Debugging, logs, health checks

<!-- FILEMAP:BEGIN -->

[automate-whatsapp file map]|root: .
|.:{package.json,SKILL.md}
|assets:{agent-remote-sandbox-github-repo-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:{agent-remote-sandbox.md,execution-context.md,function-contracts.md,functions-payloads.md,functions-reference.md,graph-contract.md,local-workflow-source.md,node-types.md,triggers.md,workflow-overview.md,workflow-reference.md}
|scripts:{create-function.js,create-trigger.js,create-workflow.js,delete-trigger.js,deploy-function.js,edit-graph.js,get-context-value.js,get-execution-event.js,get-execution.js,get-function.js,get-graph.js,get-workflow.js,invoke-function.js,list-execution-events.js,list-executions.js,list-function-invocations.js,list-functions.js,list-provider-models.js,list-triggers.js,list-whatsapp-phone-numbers.js,list-workflows.js,openapi-explore.mjs,resume-execution.js,update-execution-status.js,update-function.js,update-graph.js,update-trigger.js,update-workflow-settings.js,validate-graph.js,variables-delete.js,variables-list.js,variables-set.js}
|scripts/lib/functions:{args.js,kapso-api.js}
|scripts/lib/workflows:{args.js,kapso-api.js,result.js}

<!-- FILEMAP:END -->

Related skills

Forks & variants (1)

Automate Whatsapp has 1 known copy in the catalog totaling 238 installs. They canonicalize to this original listing.

How it compares

Choose automate-whatsapp for Kapso flow builder patterns with button-reply branching and agent nodes rather than simple webhook echo bots.

FAQ

What is the preferred workflow edit path?

Use kapso link, pull, edit workflow.ts locally, kapso build, then kapso push with optional --dry-run.

How do I fix lock_version conflicts?

Re-fetch the graph with get-graph.js, re-apply edits, and update with the new expected lock_version.

What handler shape do Kapso functions require?

async function handler(request, env) returning a Response; no export default or arrow functions.

Is Automate Whatsapp safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Automation & Workflowsautomationagents

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.