Skill

Automate WhatsApp Workflows

A Kapso WhatsApp automation skill - workflow graph editing, triggers, execution debugging, function deployment, app integrations, and D1 queries via scripts.

Works with whatsapp

91
Spark score
out of 100
Updated yesterday
Version 15.7.0

Add to Favorites

Why it matters

Build and manage sophisticated WhatsApp automations, including CRUD operations for workflow graphs, trigger management, function deployment, app integrations, and D1 database interactions.

Outcomes

What it gets done

01

Automate WhatsApp message triggers and responses.

02

Integrate WhatsApp with external applications and services.

03

Manage and deploy custom functions for WhatsApp workflows.

04

Perform database operations (CRUD) directly from WhatsApp.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-automate-whatsapp | bash

Overview

Automate WhatsApp

A Kapso WhatsApp automation skill for lock-versioned workflow graph editing, trigger management, execution debugging, function deployment, app integrations, and D1 database operations via CLI scripts. Use when building or running a WhatsApp automation workflow - graph edits, triggers, execution debugging, function deployment, app integrations, or database queries.

What it does

Builds and runs WhatsApp automations through Kapso's platform API, covering workflow CRUD, graph edits, triggers, execution debugging, function management, app integrations, and D1 database operations, all driven through a large library of Node.js scripts rather than raw API calls. Editing a workflow graph follows a strict lock-based cycle: fetch the graph and note its lock_version, edit the JSON directly, or patch it with string replacement for small edits, validate the structure locally, then update with the expected lock version - a version conflict means re-fetching, re-applying, and retrying with the new version rather than forcing the write. Graph structure has hard rules: exactly one start node with id start, existing node IDs are never changed, new nodes get a {node_type}_{timestamp_ms} ID, non-decide nodes have at most one outgoing edge, decide-node edge labels must match their condition labels, and edges use source, target, and label keys rather than from/to.

Triggers are listed, created with a trigger type and phone number ID (inbound-message triggers need a phone number ID looked up first), toggled active or inactive, and deleted. Execution debugging lists and inspects runs, reads a specific value out of the execution context by variable path, and lists execution events for a step-by-step trace. Functions follow a fixed handler signature - no export, export default, or arrow functions, must return a Response object:

async function handler(request, env) {
  const body = await request.json();
  return new Response(JSON.stringify({ result: "ok" }));
}

created from a code file, then deployed and verified as a separate step. Setting up an agent node with an app integration is a four-step lookup chain: find the model, find the connected account by app slug, search for the specific action, then create the integration with the resolved action, account, and configured props before adding it as a tool on the agent node. Database operations cover listing D1 tables, querying rows with filters, and creating, updating, upserting, or deleting rows - raw SQL execution and direct variable CRUD are explicitly unsupported by the platform API.

When to use - and when NOT to

Use it when building or running a WhatsApp automation workflow - editing its graph, managing triggers, debugging executions, deploying functions, wiring app integrations, or querying its D1 database. Two related skills cover adjacent scope: onboarding, webhooks, messaging, and templates belong to a separate integration skill, and debugging, logs, and health checks belong to a separate observability skill - this skill is specifically the build-and-run automation layer, not onboarding or observability. File paths are preferred over inline JSON for definitions and code, and an OpenAPI explorer script is available for searching the underlying spec directly by operation, schema, or keyword.

Inputs and outputs

Takes a workflow definition, trigger config, function code, or a database query; produces a validated and versioned workflow graph, an active trigger, a deployed function, a configured app integration, or database CRUD results.

Who it's for

Teams building WhatsApp automation workflows on Kapso who need direct, scriptable control over graph structure, triggers, execution state, functions, and integrations rather than working through a UI alone.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.