automate-whatsapp

22
0
Source

Build WhatsApp automations with Kapso workflows: configure WhatsApp triggers, edit workflow graphs, manage executions, deploy functions, and use databases/integrations for state. Use when automating WhatsApp conversations and event handling.

Install

mkdir -p .claude/skills/automate-whatsapp && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1537" && unzip -o skill.zip -d .claude/skills/automate-whatsapp && rm skill.zip

Installs to .claude/skills/automate-whatsapp

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

  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, first run node scripts/list-whatsapp-phone-numbers.js to get phone_number_id.

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>
  3. Deploy: node scripts/deploy-function.js --function-id <id>
  4. Verify: node scripts/get-function.js --function-id <id>

Set up agent node with app integrations

  1. Find model: node scripts/list-provider-models.js
  2. Find account: node scripts/list-accounts.js --app-slug <slug> (use pipedream_account_id)
  3. Find action: node scripts/search-actions.js --query <word> --app-slug <slug> (action_id = key)
  4. Create integration: node scripts/create-integration.js --action-id <id> --app-slug <slug> --account-id <id> --configured-props <json>
  5. Add tools to agent node via flow_agent_app_integration_tools

Database CRUD

  1. List tables: node scripts/list-tables.js
  2. Query: node scripts/query-rows.js --table <name> --filters <json>
  3. 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 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 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

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
update-function.jsUpdate function code
deploy-function.jsDeploy function to runtime
invoke-function.jsInvoke function with payload
list-function-invocations.jsList function invocations

App integrations

ScriptPurpose
list-apps.jsSearch integration apps
search-actions.jsSearch actions (action_id = key)
get-action-schema.jsGet action JSON schema
list-accounts.jsList connected accounts
create-connect-token.jsCreate OAuth connect link
configure-prop.jsResolve remote_options for a prop
reload-props.jsReload dynamic props
list-integrations.jsList saved integrations
create-integration.jsCreate an integration
update-integration.jsUpdate an integration
delete-integration.jsDelete an integration

Databases

ScriptPurpose
list-tables.jsList D1 tables
get-table.jsGet table schema + sample rows
query-rows.jsQuery rows with filters
create-row.jsCreate a row
update-row.jsUpdate rows
upsert-row.jsUpsert a row
delete-row.jsDelete rows

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
node scripts/openapi-explore.mjs --spec platform op queryDatabaseRows

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

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-app-integration-example.jsonAgent node with app integrations

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-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-list.js,variables-set.js}
|scripts/lib/databases:{args.js,filters.js,kapso-api.js}
|scripts/lib/functions:{args.js,kapso-api.js}
|scripts/lib/workflows:{args.js,kapso-api.js,result.js}
<!-- FILEMAP:END -->

More by sickn33

View all →

mobile-design

sickn33

Mobile-first design and engineering doctrine for iOS and Android apps. Covers touch interaction, performance, platform conventions, offline behavior, and mobile-specific decision-making. Teaches principles and constraints, not fixed layouts. Use for React Native, Flutter, or native mobile apps.

5233

unity-developer

sickn33

Build Unity games with optimized C# scripts, efficient rendering, and proper asset management. Masters Unity 6 LTS, URP/HDRP pipelines, and cross-platform deployment. Handles gameplay systems, UI implementation, and platform optimization. Use PROACTIVELY for Unity performance issues, game mechanics, or cross-platform builds.

5116

fastapi-pro

sickn33

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

5114

frontend-slides

sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

5614

flutter-expert

sickn33

Master Flutter development with Dart 3, advanced widgets, and multi-platform deployment. Handles state management, animations, testing, and performance optimization for mobile, web, desktop, and embedded platforms. Use PROACTIVELY for Flutter architecture, UI implementation, or cross-platform features.

369

godot-gdscript-patterns

sickn33

Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization. Use when building Godot games, implementing game systems, or learning GDScript best practices.

497

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

286790

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

212415

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

206291

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

217234

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

171200

rust-coding-skill

UtakataKyosui

Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.

165173

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.