Guide agents to connect a number before building a Flow#7
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
When no WhatsApp number is connected, the Flow builder dead-ends on an
empty number selection. Mirror the product fix in the agent surface:
- create-flow.js: called without --phone-number-id, it now lists the
connected numbers to choose from, or — when none are connected —
routes to embedded signup ("connect a WhatsApp number first") instead
of a terse "missing required flag" error.
- integrate-whatsapp SKILL.md: add a "Prerequisite: a connected number"
step to the WhatsApp Flows section so agents verify connectivity and
route to setup before entering the builder.
Generated-By: PostHog Code
Task-Id: d1e14ead-a755-409b-b84e-0c286b918552
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Users creating a WhatsApp Flow when they have no connected number hit a dead end: the Flow builder presents an empty, un-actionable "WhatsApp number" selection with no path to go connect one, and abandon. Two distinct users in separate projects hit this within a ~2-hour window (one retried three times before cancelling).
Scope note
The user-facing symptom is in the Kapso product frontend (
/whatsapp_flows/new), which is not this repo — this PR does not change that screen, and the frontend fix (detect the empty state and route to/whatsapp/embedded_signup) is still needed there.What this PR fixes is the same dead-end in the agent-driven path, which is in this repo. The
integrate-whatsappskill tells an agent to runcreate-flow.js --phone-number-id <id>, and with no number connected the script just threwMissing required flag --phone-number-id— the script-surface equivalent of the empty dropdown.Changes
create-flow.js: when called without--phone-number-id, it now inspects the connected numbers — listing them to pick from, or, when none are connected, routing to embedded signup ("connect a WhatsApp number first") instead of a terse error. Falls back to plain guidance if the lookup can't run.integrate-whatsapp/SKILL.md: adds a "Prerequisite: a connected number" step to the WhatsApp Flows section so agents verify connectivity and route to setup before entering the builder.Created with PostHog Code from an inbox report.