convert-and-flow-operator
Tier 0 GHL operator — the Convert and Flow CLI (caf/convertandflow/ghl) gives the agent direct CRM access for contacts, opportunities, calendars, conversations, documents, payments, forms, social, loc
SKILL.md44-convert-and-flow-operator/SKILL.md
GitHubGHL PIT aliases:
GOHIGHLEVEL_API_KEYis the preferred name; 10 additional aliases resolve the same LOCATION PIT. SeeTERMINOLOGY.md(repo root) for the canonical alias set and backend-equivalence notes (Convert & Flow / leadconnectorhq.com = one platform).
Skill 44 — Convert and Flow Operator (Tier 0)
READ-BEFORE-ACT — Model Check + PLAN MODE + QC GATE (workflow builds)
Full-Funnel Pipeline Role (P5 seam): In a full-funnel build (SOP-07 P5 stage), this
skill receives APPROVED copy + funnel page IDs from Skill 6 (06-ghl-install-pages). It
does NOT author copy or business rules — it wires ONLY what P2e (Email Campaign Strategist)
and P4 (Skill 6 / funnel builder) have produced and delivered. The P4→P5 handoff is:
page_ids + opt-in form IDs from Skill 6, plus the APPROVED email sequence copy from P2e.
The P5 task MUST verify: subaccount_matches (location whitelist gate), WF-1..21 PASS, rubric
≥ 8.5. Never begin P5 without confirmed APPROVED copy from P2e and verified page_ids from P4.
Skill 45 (Design Intelligence Library): this skill produces no visual design and does not read Skill 45; the brand voice of everything it builds comes from the approved email and text copy it is handed (Skill 50's persona styles and the locked brief), never from a design card.
Step 0 — Model Check (before any BUILD or MODIFY): If the active session model is a lighter/non-high-reasoning model or thinking is not HIGH, surface the recommendation to the owner first, then proceed. Recommendation gate, not a hard block. Read-only ops skip this. NOTE: If Step 9 QC catches a HALLUCINATION, this recommendation FLIPS TO A HARD REQUIREMENT.
Step 0.5 — PLAN MODE (before any new workflow CREATE/BUILD): BINDING GATE — do NOT
touch caf workflows build or the Tier 4 backstop until the plan is presented and the two
gating questions are answered. Steps: THINK (result + expectations + best approach) →
DEPENDENCY PRE-CHECK → OUTLINE → CHECKLIST (instantiate references/workflow-build-checklist-template.md) →
IMPROVEMENTS → PRESENT + GATING QUESTIONS (publish: DRAFT vs LIVE? / re-entry: once vs
allow-multiple?). Rushing to a default build is NOT the best outcome and is a VIOLATION.
Step 0.6 — TIMING INTELLIGENCE: When a brief contains scheduled actions, read references/workflow-timing.md. Infer what each clock is measured from. Event/registration-based waits automatically need a correctly configured Set event start time before dependent Waits; previous-step delays do not. Record the timing contract, verify its source in this location, generate the outline, and QC actual saved settings. Never turn day 4 + day 7 after registration into sequential waits totaling day 11. Use the managed browser for event timing until an API payload is verified; never drop timing metadata to bypass validation.
Step 0.7 — PRE-BUILD EXISTENCE CHECK (before any caf workflows build): BINDING GATE —
run caf workflows list and confirm the target folder/workflow names are not already present
before building. The engine now checks workflows too (an existing workflow name is refused into
errors rather than duplicated or silently modified) — this step is the human-in-loop backstop
for catching a bad/reused name choice early, not permission to skip the engine's own check.
⚠️ FOLDERS ARE YOUR JOB, NOT THE ENGINE'S. Neither the internal nor the public API exposes a
folder listing — GET /workflow/{loc} returns workflow items only, and the public
GET /workflows/?locationId= omits type and parentId entirely. So the engine CANNOT
de-duplicate folders by name. It does the one thing it can: if a workflow from your plan already
exists, it reuses that workflow's parentId so a re-run drops into the SAME folder instead of
creating another. When nothing exists to derive from, it creates the folder and records an
explicit note in stats["notes"] saying it could not prove uniqueness. Read the notes. If you
are rebuilding into a folder that may already exist, check the GHL UI and pass --folder-id
explicitly rather than trusting a name. Duplicate folders are the one failure mode this fix
cannot close for you. Treat the CLI EXIT CODE as authoritative, never
stderr. A healthy run prints an SSL/urllib3 version notice and the [caf] Allowed write locations set to... line on EVERY invocation — non-empty stderr on exit 0 is NORMAL, not a
failure signal. NEVER re-run a build solely because stderr was non-empty. If genuinely
uncertain whether the last build succeeded, verify with caf workflows list (or
workflows export) before rebuilding — never rebuild blind.
Step 9 — QC GATE (before declaring done): BINDING GATE — the build agent MUST NOT say
"done" until an independent QC sub-agent (a different model than the build agent — the
client's selected QC model, or their configured default where it differs; see INSTRUCTIONS.md
Step 9.2) passes all checklist items and the filled checklist is handed to the client.
Sequence: announce to client → spawn the independent QC sub-agent (via sessions_send;
resolve the model per Step 9.2 and verify it is available first; the model that ran is the one
named in the Command Center-signed --qc-session record, never a typed string)
→ QC runs caf workflows export +
qc-built-workflow.sh <wf-id> item-by-item → all WF-1..21 PASS → THEN compute the weighted
quality rubric (references/workflow-quality-rubric.md, 8 dimensions, ≥ 8.5 to ship) → hand
client the filled checklist + the rubric score. The rubric is a SUPERSET OVERLAY computed AFTER
WF-1..21, never instead of it. Any WF FAIL: fix + re-run QC. Rubric below 8.5: loop, naming the
specific low dimension. HALLUCINATION FAIL: hard stop + redo on reasoning-model thinking=HIGH.
Teach Yourself Protocol read-order
- SKILL.md (this file) — overview, CLI surface, credential model, write-safety posture
- INSTALL.md — autonomous setup, venv, wrapper,
caf doctor - INSTRUCTIONS.md — day-to-day usage, Step 0.5 PLAN MODE, natural language intents,
TRINITY routing, Step 9 QC GATE (including hallucination escalation), rollback
3b. automation-templates/ — the 49-template automation library (28 editorial sequence
templates + 21 launch-family build specs; template-first / reuse-before-reinvent) +
automation-templates/README.md. Matched at INSTRUCTIONS Step 0.4 via_matcher/cli.py --match(shared core_matcher/flex.py, committed lexical index_matcher/catalog-index.json)._links/funnel-to-automation.jsonis the canonical funnel→ automation map. Flexibility = guide-not-rule (honor explicit spec; CREATE_NEW only when nothing fits). 3c. Launch mode (Skill 49/83) — if the request is a Black Friday or signature-launch automation build ("set up the Black Friday automations"), read the Launch mode (Skill 49/83) section below FIRST, thenautomation-templates/launch-c/README.mdandautomation-templates/launch-c/plan_reader.py(the plan reader), andtools/siglaunch/(the purchase-event pipeline: normalizer, receiver, processor, provisioning; seetools/siglaunch/STAGING-NOTES.md). Do not start from the editorial matcher for a launch. - references/workflow-build-checklist-template.md — canonical WF-1..WF-21 checklist
(instantiate at PLAN MODE Step D; hand to client after QC passes)
4b. references/workflow-quality-rubric.md — 8-dimension weighted quality rubric (SUPERSET
overlay on WF-1..21; each dimension cites its WF evidence source; ≥ 8.5 to ship; computed at
Step 9 AFTER WF-1..21)
4c. universal-sops/funnel-automation-build-quality-rubric.md — the library-aware FAB-QC ≥ 8.5
overlay (shared scorer
shared-utils/fab_qc.py); run at Step 9.3c viaqc-built-workflow.sh --fab - qc-built-workflow.sh — per-build QC script (mechanically asserts WF-3,4,5,6,7,12,15,18,21,22;
plus WF-19 under
--conversational; then emits the weighted rubric floor score + the FAB-QC overlay with--fab); invoked by the independent QC sub-agent at Step 9 - CORE_UPDATES.md — exact text to merge into AGENTS.md / TOOLS.md / MEMORY.md
- QC.md — human-readable checklist (authoritative install-QC script is
qc-convert-and-flow.sh) - CHANGELOG.md — skill version history
Store only lean references in core files; full runtime docs live in this folder + master-files.
Launch mode (Skill 49/83)
Use this path when the request is a Black Friday or signature-launch automation build. The
launch plan (Skill 49 launch_plan.py, checked by Skill 83) lists automation units with
build_rail = this skill's engine and draft_only = true; this skill builds them. Everything
is DRAFT-ONLY: nothing here publishes a workflow or sends a message, and approval to build is
not approval to publish or send.
The path, in order: reader -> build command -> QC -> receipt.
Reader —
python3 automation-templates/launch-c/plan_reader.py --launch-plan plan.json --build-plan <skill-50 build-plan.json> [--build-plan ...] --out automation-builds.json(run from this skill folder; exit 0 ok, 2 usage or invalid input, 3 IO). It emits onebuilds[]entry per launch-plan automation unit, eachstate: readyorstate: blockedwithblocked_bynaming what is missing. A blocked build is never built; fix the named input (a page URL, a text set, a Skill 50 build plan, the calendar) and re-read. Never upgrade a blocked build by assumption.Build command — only
readybuilds proceed, and the launch document is compiled and built in ONE command:caf --json --experimental workflows build \ --from-automation-build automation-builds.json \ --journal workflow-build-journal.json \ --plan-mode-file plan-mode.json--plan-mode-fileis REQUIRED for a real build (not for--dry-run). It is the PLAN MODE run file{approval_id, plan_hash, publish_intent, re_entry, build_model}(INSTRUCTIONS.md Step 0.5); the command verifies it with the approval flow's verifier (kindlaunch_plan_build, scopepublish:<INTENT>+reentry:<DECISION>) BEFORE any client or write exists and otherwise exits 1 withREFUSED: PLAN MODE record missing or unverified. A file the build agent wrote itself cannot be confirmed.--from-automation-buildrunscompile_launch_builds()(document -> campaign dict; it refuses blocked builds, missing required outputs and missing suppression guards, and every workflow it produces is a draft) and then the campaign build under the write lock.--journalis REQUIRED on that path: it is the receipt file (unit key, remote id, phase, expected and read-back hash) that makes a re-run safe.--dry-runcompiles and prints the workflows, their compiler mode, owed browser steps and incomplete channel actions, and writes nothing.automation-builds.jsonis NOT a campaign plan, and a Skill 50 plan carrying_meta.profileis refused by--from-plan(exit 2) with a pointer to this command; both refusals exist so launch guards can never be dropped silently.Step compilation is
launch_step_compiler.compile_installable()— the ONE launch compiler, called by both this command andcompile_launch_builds(). It installs the buildable template graph (tags, branches, waits, SMS, goals and the short post-sale purchase handler) when everywait untiltoken resolves to a real calendar date and every email slot has approved copy; otherwise it installs the approved email/wait sequence and RECORDS why the template graph was skipped (compile_mode,compile_notes). Guards, absolute-wait ledger rows and the real purchase gate are applied in both modes.Still run the compiled work through PLAN MODE (Step 0.5) and the Step 0.7 existence check, and set
CAF_BUILD_JOURNALwhen you use the older--from-plan <campaign.json>path.QC — the independent QC sub-agent (a different model than the builder, Step 9) runs the full command below on every built workflow: every WF item PASS or graded PASS, then the quality rubric at 8.5 or better. Any FAIL: fix and re-run. First write the WF-9 wait schedule for the unit (the QC compares the export's waits against it):
python3 automation-templates/launch-c/emit_launch_schedule.py \ --automation-build automation-builds.json --unit <build id or unit_key> --out schedule.json ./qc-built-workflow.sh <workflow-id> --json --publish-intent DRAFT --re-entry ONCE \ --plan-mode-file plan-mode.json --qc-session qc-session.json \ --grades grades.json --deps deps.json \ --launch --launch-schedule schedule.json [--fab]Leave out any of
--plan-mode-file,--qc-session,--grades,--depsor the schedule and the script cannot return 0 (exit 1 for a failed gate, 2 for ungraded items), so a bare./qc-built-workflow.sh <id>is never a pass.--qc-sessionis the Command Center-signed record naming the QC model and session (--qc-model, a typed string, is refused), and its model must differ from the plan file'sbuild_model.--publish-intent/--re-entrymust equal the plan file. A workflow with an SMS step also needs its consent, STOP, contact-cap, quiet-hours and deadline rules saved as native conditions (WF-25;automation-templates/launch-text/sms_eligibility.py verify-saved), or QC fails.Receipt — a build is done only when its receipt exists: the compiled unit's required outputs (
workflow_id,steps_saved,trigger_created,readback_verified) in the build journal, and the filled WF checklist plus rubric score from QC. For a Skill 71 funnel hand-off the executor returns the stage receipt that Skill 71 files atprivate/receipts/automation-wiring.json(see Consumers). No receipt, no "done".
Channel actions are complete only when their copy is bound. A compiled SMS step whose body
comes from no approved source stays copy_pending (the compiler reports it under
channel_actions.sms and incomplete_actions); an email step always carries its approved
sender/subject/body. A pending SMS is recorded as unavailable and never blocks the email work.
Settings are applied and read back. settings.marketing is the promotional flag itself
(never its negation), and a requested Allow Reentry is written as settings.allowReentry and
read back after the save: the build records declared/observed/applied under
stats["reentry"]. An absent native value stays UNKNOWN — it is never normalised to false and
never reported as applied.
Browser-required work is executed, not described. Ledger rows the compiler emits
(trigger without a verified payload, wait until date) are handed to the selected capability
when one is wired and their observed result is merged into stats["browser_steps"]. With none
wired they are recorded as pending and listed in incomplete_actions.
Purchase and entitlement events for a live launch go through tools/siglaunch/ (normalizer ->
receiver -> processor -> provisioning), under this skill's own approval and read-back gates.
The siglaunch receiver is deliberately NOT a production entry (PRODUCTION_ENTRY_ENABLED = False); the declared Black Friday 2026 purchase path is the native GHL post-sale workflows.
Repairing a launch goes through the build command above, never by enabling that runner.
Native products and prices are not a safe default. caf payments create-product and
caf payments create-price exist, but on main they are not tied to an approval record and
create-price takes --amount in cents. Do not create a product or price for a launch without
the owner's recorded approval of the plan, and read the created price back before use.
Template library size: 49 template-shaped JSON files in automation-templates/ (28 editorial
sequence templates + 21 launch-family build specs). Verify it, never hand-edit it:
python3 -I -c "import glob;print(len([p for p in glob.glob('44-convert-and-flow-operator/automation-templates/*/*.json') if not p.split('/')[-2].startswith('_') and p.split('/')[-1] not in ('automation-build.schema.json','text-sets.json')]))"
(run from the repo root; prints 49. _links/funnel-to-automation.json carries the same figure as
automation_template_count, generated by _links/_build_link_map.py.)
What This Skill Is
Skill 44 is the Tier 0 in the 6-tier GHL access chain (skill 36). It wraps the Convert and Flow CLI engine and exposes it through three aliases:
caf # shortest
convertandflow
ghl
The CLI gives the agent DIRECT CRM access over the GHL internal API — no MCP schema overhead, no browser, no manual paste. Natural-language requests in Telegram map to CLI commands automatically; operators never need to memorize command syntax.
What Tier 0 covers (standard ops — PIT only)
- contacts — search, get, create (explicit NEW record only), upsert (DEFAULT for generic add/save — match keys + supplied fields only, verified by read-back), update (non-tag fields;
--tagrefused destructive), tag/untag (additive), bulk operations - opportunities — list, get, update, move pipeline stage
- calendars — list calendars, get appointments, create/update bookings
- conversations — list, get, send message, read threads
- documents — list, get, send
- payments — list invoices, create invoice, send invoice, list transactions;
create-productandcreate-priceexist but are not safe without the owner's recorded approval (amount in cents; read the price back) - forms — list, get submissions
- social — list accounts, schedule post, get post status
- locations — get location info, list custom fields, list custom values
- workflows —
listis READ-ONLY on the LOCATION PIT (Tier 0). BUTgetandexportroute through the INTERNAL Firebase client and REQUIRE the Firebase refresh token — they are NOT PIT reads (see "Workflow BUILD and EDIT" below; the same token gates read-back). With no Firebase token,get/exportcannot run and workflow QC falls to the Tier-4 agent-browser read-back (fail-closed — "no token" never means "skip QC").
Sub-agent contact lookup rule (CRITICAL)
MCP tools (ghl-mcp__*) are available ONLY in the orchestrating agent session. Spawned
sub-agents receive NO MCP tool injection. Any contact lookup inside a sub-agent MUST
use caf contacts search/get (the CLI) or raw HTTPS to services.leadconnectorhq.com.
The CLI is a subprocess — it works identically in the orchestrator and in sub-agents.
This is the primary reason Tier 0 CLI is preferred over the orchestrator-only MCP path
for lookups. See 36-ghl-mcp-setup/GHL-LOOKUP-SOP.md for the full lookup routing table.
Workflow BUILD and EDIT (Firebase token required)
workflows build, workflows patch-email, workflows patch-trigger, workflows restore
require the GOHIGHLEVEL_FIREBASE_REFRESH_TOKEN. When that token is:
- present + healthy — Tier 0 builds/edits the workflow directly via the internal API.
- unread / misconfigured (e.g. the token exists in a store the process did not resolve, or a
key-name/env-store mismatch) — BUILD falls to Tier 4: Skill 6's GATED, MANAGED Automations builder
(the designated path, IMPLEMENTED —
06-ghl-install-pages/tools/ghl_workflow_builder.py, routed through thebrowser_manager.shsingleton gateway, resolving its steps from theautomations_builder_gatesregistry intools/gates.json— NEVER bare agent-browser freehand atapp.gohighlevel.com), and the owner is nudged: "I need you to grab the Convert and Flow token to build workflows directly." Nothing is silent.Tier-4 builder implementation status (P3-08): the HARNESS is BUILT and unit-tested —
06-ghl-install-pages/tools/ghl_workflow_builder.pydrives the Automations builder end-to-end through thebrowser_manager.shsingleton gateway (guaranteed teardown, reaper backstop) and REFUSES (MissingGateError) if a required gate is absent rather than freehand-navigate. Proof:06-ghl-install-pages/tests/test_ghl_workflow_builder.pydrives a token-unset build through the gated path, quotes the built workflow id, and asserts zero-orphan teardown;python3 06-ghl-install-pages/tools/ghl_workflow_builder.py --selftestis the runnable one-liner. The Automations STEP SELECTORS shipstatus: runtime(accessibility role/name find hints the harness resolves against the live DOM) — Skill 6's "NO invented CSS is shipped as fact" law forbids asserting them as captured, so a live-capture hardening pass on the operator's own GHL location flips each tocapturedinSELECTORS-LIVE-automations.md(the ordinary runtime-gate follow-on). The CI guard protecting this path is live —06-ghl-install-pages/and44-convert-and-flow-operator/are scan roots ofscripts/guard-agent-browser-managed.sh, so any unmanaged spawn here FAILS CI (P3-08 step 1). When even the managed browser session cannot seed, the human-in-loop Build-with-AI paste (Skill 41 Layer 0) is the fallback. - genuinely dead / revoked / expired — Tier 4 does NOT help (see the token-circularity note below);
route to
06-ghl-install-pages/tools/ghl_auth.py's gated Tier-2 email-2FA self-heal, which mints a fresh token so the next run is Tier 0 again.
TOKEN CIRCULARITY (P3-08 — read this before relying on Tier 4). Tier 4 is NOT a universal no-token backstop. The managed browser session Tier 4 needs is seeded from the SAME
GOHIGHLEVEL_FIREBASE_REFRESH_TOKENwhose absence supposedly triggered Tier 4 (Skill 6'sbrowser_manager.shreuses the Firebase-token session seed). So Tier 4 only helps when the token is unread or misconfigured — present but not resolved by the process. When the token is genuinely dead (revoked, expired, wrong client), Tier 4 cannot seed a session either, and the ONLY recovery isghl_auth.py's gated Tier-2 email-2FA self-heal (gated on recorded authorization + a live Gmail read-proof + email-2FA method + client-owned creds), which logs in headless, reads the freshest 2FA code from the client's own Gmail, and SELF-HEALS a fresh refresh token into the client store. Decision rule: token unread/misconfigured → Tier 4 gated builder; token genuinely dead → ghl_auth.py Tier-2 self-heal, never Tier 4. (Skill 36GHL-LOOKUP-SOP.mdRULE 6 encodes the same routing.)
GHL-AUTH-DOCTRINE: TIER-2 EMAIL-2FA FALLBACK — gated (auth+gmail-proven+email-2fa+creds), bounded, self-heals to TOKEN-ONLY. The canonical auth entry point Skill 44 calls when a workflow write needs a session is the shared orchestrator
06-ghl-install-pages/tools/ghl_auth.py(a 3-tier ladder) — Skill 06 and Skill 44 both call it, never the fallback directly. Tier 1 (token-only — theGOHIGHLEVEL_FIREBASE_REFRESH_TOKENseed above) stays PRIMARY; almost every build takes it. ONLY when Tier 1 has no usable token (absent / revoked / expired) does the orchestrator evaluate the GATED Tier-2 email-2FA bootstrap: gate A a recorded client authorization, gate B the box PROVES it can read the client's OWN Gmail via a live read BEFORE any login (so a misconfigured box never starts a login it can't finish), gate C email is the selected 2FA method, gate D agency creds resolve from the CLIENT's own secret store. On all four green it logs in headless, reads the freshest email-2FA code from the client's own Gmail, submits it, and on success SELF-HEALS a freshGOHIGHLEVEL_FIREBASE_REFRESH_TOKENinto the client store so the very next run is Tier 1 again. Bounded:MAX_LOGIN_ATTEMPTS <= 3, backoff, hard-stop on any lockout/captcha. Any gate fail or hard stop → Tier 3: fail loud, non-zero exit, precise client instruction (then the Tier-4 agent-browser backstop / Token-Grabber nudge above). ALL login/password/2FA code lives in EXACTLY ONE module (tools/ghl_auth_fallback.py) plus its browser helper (tools/ghl_login_browser.py); CI guardscripts/guard-ghl-auth-fallback.shlocks the invariants. Client uses their OWN creds/keys ONLY; secrets NEVER in repo/logs/stdout.
Media
The CLI has NO media upload commands. Media NEVER routes to Tier 0 — always Tier 3
(POST /medias/upload-file — see 29-ghl-convert-and-flow/references/medias.md).
Consumers (who hands work to this skill, re-checked against main 2026-11-02)
This section states, for each consumer, what that consumer does on main, re-checked from the consumer's own folder on 2026-11-02 (main at af3e727). A consumer's own folder wins over this section if they disagree: read it before relying on a line here. The launch route is in Launch mode (Skill 49/83) above. The pattern across every consumer below: work arrives as FILES AND PLANS that an operator agent running this skill executes under this skill's own gates. No consumer calls the caf CLI in process, nothing here polls for work, and a handed-off plan is not a built object until execution receipts with read-backs exist.
Skill 49: 49-signature-funnel (launch plan producer)
- In
signature_launchmode,scripts/launch_plan.pywrites the launch plan in the shared contract (shared-utils/signature_launch_contract/launch-plan.schema.json):automations(this skill's units),email_sequences(Skill 50),text_sets,conversation_ai,launch_calendar, every unit withwaits_for,draft_onlytrue andbuild_railthis skill's engine. A missing launch date, doors time, timezone or AI mode blocks the plan by name. See49-signature-funnel/LAUNCH_MODE.md. - That plan is the reader's input (
launch-c/plan_reader.py). Skill 49 builds no workflows and calls no caf command; its docs name this skill's "S44 provisioning" and "S44 workflow wiring" as later steps it does not perform. Emitting a plan is not a built object.
Skill 83: 83-black-friday-launcher (launch plan checker and package assembler)
- Skill 83 validates the launch plan's calendar and completeness (
python3 -m launcher_core.cli plan --plan <launch-plan.json> [--deliveries <deliveries.json>], where--deliveriesis one JSON file (an object of unit id to delivery result); omit it to see what is missing, code inlauncher_core/launch_plan.py), lists every planned unit including the automations, and fails the package when a planned unit was not delivered. It never builds a workflow and never invents a unit, date or price. - It does not run this skill. An agent asked to set up the Black Friday automations reaches this skill through Launch mode (Skill 49/83) above, not through Skill 83's own entry commands.
Skill 6: 06-ghl-install-pages (P4 to P5 funnel seam)
- Full-funnel builds: Skill 6's v2_dispatcher.py writes routing/skill44-handoff.json when a verified full-funnel build carries linked automations marked build_now (funnel template id, location id, the timing contract, and the to_build list), reads the file back, and FAILS the dispatch if the write or the read-back fails. An orchestrator then dispatches each to_build automation to this skill as its own build (PLAN MODE plus Step 9 QC). The handoff is a file, not an API call, and it fires only when build_now automations exist.
- Form dependency plans: Skill 6's ghl_form_builder.py THINK layer emits routing/form-dependency-plan.json (owner_skill 44, cli "caf (PIT-authenticated)") listing the zhc_ custom fields and tags a form needs, each stamped create or reuse. This skill creates or looks up those dependencies BEFORE the browser build, because the browser layer adds pre-created fields via Add Object Fields and never mints fields on the fly. The builder itself never invokes caf.
- The P4 to P5 page and form ids and the approved email sequence copy described in READ-BEFORE-ACT above arrive through these Skill 6 artifacts and the funnel task record, not through a live integration.
Presentations department: 23-ai-workforce-blueprint role library (presentations)
- Emits plan contracts into a run folder, nothing more. checkout_form_builder.py writes working/sales-checkout/checkout_form_skill44.json (the checkout form plus Form-Submitted workflow contract, mechanism SKILL44_WIDGET -> FORM) and records its own receipt at status plan_emitted with the form and workflow ids null. ghl_external_installer.py (phases P-U-GHL-SALES, P-U-GHL-VSL, P-U-FORM-GATE) writes working/vsl/gate_form_skill44_plan.json naming this skill's real entry points (caf workflows build --from-plan via CampaignBuilder under the write lock, the Skill 6 workflow builder harness, caf read-backs) and leaves ecosystem/gate-form.json plus workflows/gate-workflow.json at pending_external_execution until an execution returns adapter ids and read-backs that pass its validate_receipt.
- What does NOT happen today: no presentations code executes this skill. Its live Skill 44 adapters are stubs that refuse (DeferralRequired) until a wave owner designates a test location; only in-memory fakes have ever executed these contracts, inside tests. Any wording that reads as if the presentations pipeline builds live forms or workflows through this skill automatically is wrong; the contracts are plans until a delegated agent executes them here.
- The run-level seam (FIX-PLAN Item 33a): presentations also emits working/ghl/ghl-ops-request.json at install and at delivery (scripts/ghl_ops.py), listing the GHL operations a run needs (form creation and attachment, workflow trigger coverage, product and order-form binding on the sandbox path, test-submission proof, booking-calendar verification), each with the Wiring Gate read-back checks the receipt must answer. The executing agent returns working/ghl/ghl-ops-receipt.json with per-object read-backs. The presentations reader judges an entry claiming success without its read-back as unverified, never success.
- The VSL gate spec (presentations scripts/vsl-gate-form-spec.json) is a contract document for the gate form object. The VSL page the pipeline ships today (vsl_builder.py) carries a native HTML gate form whose submit unlocks playback client-side; wiring that submit to a live GHL endpoint is a deployment-time step, and the Skill 44 gate form exists only when the P-U-FORM-GATE plan above is executed.
Skill 38: 38-conversational-ai-system (TRINITY counterparty)
- Skill 38 authors the communications playbook, its declares block, and its build contract (
<slug>--build-contract.json) FIRST. Skill 44 then reads that build contract and declares block and builds the GHL automation to exactly that spec. Skill 44 never invents, alters, or reverses this order and never authors playbook content. This skill CONSUMES Skill 38's output and is not the entry point for a conversational build. The fourth TRINITY leg is the build contract, whoseplaybook_structure_hashmust equal the freshly computed structure hash of the playbook. The coupling is enforced mechanically on this side:qc-built-workflow.sh --conversationalexecutes Skill 38'sscripts/qc-trinity-registry.sh, and the WF-19 gate fails the build on any non-zero exit. Without the flag, WF-19 stays a human-review item.
Dependency export for Skill 38 gates
Skill 44 is the sole producer of .caf-calendars-export.json and .caf-pipelines-export.json in the client's conversation-workflows folder, via tools/export_deps.py.
Run:
python3 tools/export_deps.py --workflows-dir <master-files>/conversation-workflows
The producer runs caf --json calendars list and caf --json opportunities pipelines through a PIT-authenticated caf, validates each response shape, and writes both export files atomically. No network means no export, never a fabricated one.
- Exit 0: both exports written successfully.
- Exit 2: usage or path resolution error.
- Exit 3: caf failure or invalid response shape.
Skill 38's qc-playbook-declares.sh FAILs with REQUIRES_OPERATOR when a playbook declares calendars or applied tags and the required export is absent. qc-opportunity-sync.sh FAILs with REQUIRES_OPERATOR when a playbook declares a pipeline or stage-map and the pipelines export is absent. Both gates fail closed, never skip required validation.
Regenerate both exports after any calendar or pipeline change in GHL.
Skill 50: 50-email-engine (deploy rail)
- On its P4 deploy step, Skill 50 emits a DRAFT-ONLY workflow build plan (tools/emit_build_plan.py, validated against its build-plan schema) covering email plus wait steps only. Skill 50 never sends anything. The plan enters this skill's PLAN MODE (Step 0.5 boards the build), a human approves before any send, and the built draft faces this skill's QC gate (score 8.5 or better).
- Launch use: the same build plans are the reader's
--build-planinput in Launch mode (Skill 49/83); Skill 50's launch profiles andtools/s49_launch_shape.pycarry the launch email shape. A build plan is not a caf campaign file: the reader binds it to its launch sequence and compiles it first, so do not feed a Skill 50 plan straight tocaf workflows build --from-plan.
Skill 71: 71-blackceo-signature-page (automation hand-off producer)
- Skill 71 has a hand-off producer:
71-blackceo-signature-page/scripts/automation_handoff.py, called bystage_gate.pyat ghl-install-test close, when the run's intake recordspublish_target = "ghl"andautomation_scope = "workflows". It writeshandoff/automation-handoff.json(ids only: location, funnel, page, form ids, trigger classes) and hash-locks it. When the run carries the launch wiring inputs it also writeshandoff/automation-request.json, a draft-only envelope (any other deploy mode is refused). Contract:71-blackceo-signature-page/references/automation-handoff.md. The envelope is a run file; the module sends nothing. - This skill executes the request under its own gates.
tools/siglaunch/receiver/is NOT a production entry (PRODUCTION_ENTRY_ENABLED = False) and executes nothing. The request is built by running the plan reader and thencaf workflows build --from-automation-build(with--plan-mode-file, see Launch mode), and the receipt is the build journal; the outcome is filed by Skill 71 as the stage receiptprivate/receipts/automation-wiring.json, carryingbuild_method(caf-cliortier4-browser-backstop), this skill's QC evidence (qc-built-workflow.shexit code and the filled checklist) and the read-back. A refusal is a receipt too and leaves the stage open. - Check that file before telling an owner a funnel has no automation hand-off. Skill 71 also consumes presentations page briefs, a different seam.
Explicit non-consumers
- Skill 46 (46-kie-callback-relay) does not consume this skill and does not use the GHL Firebase token. The daily token liveness check is owned here (tools/check-ghl-token-liveness.sh); Skill 46's SKILL.md cross-references it for discoverability only.
Credential model
| Env var | Required for | Canonical name |
|---|---|---|
GOHIGHLEVEL_API_KEY |
All ops (location PIT) | canonical; CAF_API_KEY accepted as alias |
GOHIGHLEVEL_LOCATION_ID |
All ops | canonical; CAF_LOCATION_ID accepted |
GOHIGHLEVEL_FIREBASE_REFRESH_TOKEN |
Workflow write/edit | canonical; CAF_FIREBASE_REFRESH_TOKEN accepted |
GOHIGHLEVEL_ALLOWED_LOCATION_IDS |
Write whitelist | comma-separated; empty = single-location default |
GOHIGHLEVEL_DRAFT_ONLY |
Write safety | true = no live publishes without approval |
CAF_OWNER_CONTACT_ID |
Owner notices | the owner's OWN contact id for this location, set at install; one SMS or email to exactly that contact passes the write gate without an approval record (every other recipient still needs approval); unset = no exemption |
The wrapper at ~/.openclaw/tools/convert-and-flow-cli/caf maps the canonical env names
to whatever the engine expects at runtime (engine internals untouched).
Unified 11-alias scan (as of this update): ghl_client._get_token() now scans all 11
env-var names in the LOCATION-PIT alias set (GOHIGHLEVEL_API_KEY canonical + 10 aliases)
before raising a credential error. This closes the prior crash-loop where a box storing the
token under a legacy alias (e.g. GHL_API_KEY or PIT_TOKEN) would surface
CredentialNotFoundError and spin the agent into a retry loop. Agency PITs and the Firebase
refresh token (GOHIGHLEVEL_FIREBASE_REFRESH_TOKEN) are not part of this scan and remain
on separate paths.
Write-safety posture
- Dry-run flag —
--dry-runshows the API call without firing it. The agent ALWAYS dry-runs a destructive write first and surfaces the diff before executing. - Draft-only default —
GOHIGHLEVEL_DRAFT_ONLY=truemeans content writes (workflows, social posts) default to draft status; a second approval step is required to publish. - Location whitelist — writes are restricted to
GOHIGHLEVEL_ALLOWED_LOCATION_IDS; a cross-location write attempt is rejected before the API call. - Approval gate —
ZHC-andZHC_prefixed objects carry standing approval per skill 41's contract; all other programmatic creates surface to the owner for confirmation. - Workflow-write data rollback — every
workflows update/patch-email/patch-triggerwrites a timestamped snapshot to~/.openclaw/tools/convert-and-flow-cli/data/snapshots/<location>/<workflow-id>/<ts>.jsonBEFORE mutating.workflows restore <snapshot-path>replays the snapshot. - Internal-write serialization — a lock file under the data dir prevents concurrent builds from the same box.
SMS / conversation sends — NEVER hand-roll bare urllib
POST /conversations/messages is the endpoint that sends SMS/GHL messages. GHL's
services.leadconnectorhq.com sits behind Cloudflare, and Cloudflare's edge WAF fingerprints
and 403-blocks the DEFAULT Python urllib User-Agent (Python-urllib/x.y) BEFORE the request
ever reaches GHL — proven live 2026-07-19: the 403 body is Cloudflare's own error code: 1010
page (not a GHL JSON error), with server: cloudflare + cf-ray present and zero GHL response
headers (no x-ratelimit-*, no x-envoy-upstream-service-time). The SAME request with curl,
the requests Python library (default UA python-requests/x.y — what ghl_client.py already
uses), or any explicit non-default User-Agent header flips straight to a genuine GHL response.
Use the canonical path — never improvise raw HTTP for this endpoint:
contacts send-sms <contact_id> --message "..."— the CLI command added for this fix; sends directly by contactId (no conversationId lookup required), routed throughghl_client.post()(requests-backed, immune to the block).conversations send <conversation_id> --message "..."— if you already have a conversationId.- The Community/Official GHL MCP
send_smstool (Tier 1/2 per36-ghl-mcp-setup) — also immune, uses its own HTTP client, not bare urllib. - If you must use raw HTTP directly, set an explicit
User-Agentheader (e.g.curl/8.4.0) — the ONLY thing that matters is that the UA string isn't the bare urllib default;Accept/Accept-Encodingwere proven NOT to matter in the live test.
TRINITY rule (skill 38 auto-invoke)
Any workflow that contains a conversational node MUST produce all three legs:
- GHL automation (skill 44 builds the structure)
- Communications playbook (skill 38 auto-invoked for the brain)
- Workflow-AI / Build-with-AI prompt (skill 38 generates)
All three legs ship together or the build is NOT registered. Skill 44's per-build QC ENFORCES
this mechanically: run ./qc-built-workflow.sh <workflow-id> --conversational, which EXECUTES
38/scripts/qc-trinity-registry.sh and FAILs WF-19 on any non-zero exit (incomplete TRINITY or
missing conversation-workflows/ folder). Without --conversational, WF-19 is N/A (human
review) — correct for a purely mechanical workflow with no conversational leg.
Dependency-first contract (from skill 41)
Skill 44 REFUSES to build a workflow whose dependencies (tags, custom fields, custom values) do not yet exist in GHL. It checks each dependency with a GET first (skill 41 Step 2 pattern) and surfaces missing items before touching the workflow builder.
Chrome Extension: Token Grabber (load unpacked)
The skill ships the Token Grabber Chrome extension at tools/chrome-extension/.
This extension is NOT on the Chrome Web Store. Clients load it via Chrome's "load unpacked" developer method (see INSTALL.md Action 5b for the full steps).
What it does: reads stsTokenManager.refreshToken from the page's
firebaseLocalStorageDb IndexedDB on convertandflow.com, gohighlevel.com, or
leadconnectorhq.com, and copies it to clipboard. Makes zero network calls.
Token env var: GOHIGHLEVEL_FIREBASE_REFRESH_TOKEN
The files in tools/chrome-extension/:
manifest.json— MV3 manifest (permissions: activeTab, scripting, clipboardWrite)popup.html— extension popup UIpopup.js— IndexedDB readericon48.png— extension icon
These are identical to the convert-and-flow-token-grabber.zip the operator ships.
The same four files also exist inside tools/engine/chrome-extension/ (that copy is
for the engine's own reference); tools/chrome-extension/ is the client-facing copy.
Owner-facing setup guide
For walking an OWNER through grabbing the token (warm, plain-English, 8 steps + the
public download link), send or read from references/owner-token-grabber-guide.md.
That doc is what a client agent uses to get a non-technical owner from zero to a working
Firebase token; it also carries a clearly-separated FOR THE AGENT section on wiring
the pasted token into the gateway-inherited env and building the first DRAFT-only,
ZHC- prefixed test workflow.
Fleet announcement (standardized owner message + send runbook)
Once a box has been given Skill 44, the owner gets the standardized announcement in
references/fleet-announcement-template.md — the canonical 3-message template
(placeholders [OWNER_NAME] / [AGENT_NAME]: congratulations + what it unlocks, then the
🔑 FINAL SETUP Part 1 of 2 and Part 2 of 2 walkthrough that reuses the Token Grabber steps
above). The same file carries the operator-facing fleet-send runbook: the GATE (only
announce when the box's ledger shows skill44 remediation complete — engine ≥ 2.1.1 with a
live caf read, or explicitly token-pending), SEND MECHANICS (always the client's own
gateway via openclaw message send, one client at a time, verify each send), and per-client
RECEIPTS to the operator ledger. Do NOT paste the runbook section to an owner.
Daily Firebase Token Liveness Check (Skills 44 + 46)
A daily cron (ghl-token-liveness, registered by scripts/ensure-pipeline-crons.sh at
08:00 UTC) runs tools/check-ghl-token-liveness.sh on every client box where Skill 44
is installed. The check:
- Resolves
GOHIGHLEVEL_FIREBASE_REFRESH_TOKEN(env-store order:secrets/.env→openclaw.json env.vars→workspace/.env, matching the same order asseed-ghl-auth.pyand the transport engine). - POSTs a
grant_type=refresh_tokenexchange tosecuretoken.googleapis.com/v1/token?key=FIREBASE_API_KEY(the public Firebase web API key hardcoded in transport.py — not a secret). - Classifies the response:
- VALID (HTTP 200 +
id_tokenpresent) → logsPASS, writes a day-stamp file, exits 0. No notification is sent. - INVALID (HTTP 400, error codes
TOKEN_EXPIRED/USER_DISABLED/INVALID_REFRESH_TOKEN) → sends a plain-English re-grab notification to the CLIENT's own Telegram chat (never to operator IDs) and exits 1.
- VALID (HTTP 200 +
- Is idempotent: a
~/.openclaw/workspace/ghl-token-liveness/ghl-token-liveness-<date>.okstamp prevents the notification from firing more than once per calendar day.
What the client sees if their token dies:
Hi — just a heads-up from your AI agent. Your workflow automation connection to Convert and Flow needs a quick refresh. The secure key that lets me build automations for you has expired. Here is how to refresh it (same steps as your original setup): log into Convert and Flow fresh, click the Token Grabber icon, click "Grab the token" then "Copy the token," and send me the copied key.
The notification guides them through the same 8-step Token Grabber flow documented in
references/owner-token-grabber-guide.md.
Per operator instruction this daily check is cross-referenced from Skill 46 (Kie Callback Relay) as well. Note: Skill 46 does not itself use the GHL Firebase token — the token and this check are owned by Skill 44; the cross-reference is only for discoverability.
Files in this folder
- SKILL.md (this)
- INSTALL.md — setup +
caf doctor+ Chrome extension load-unpacked steps (Action 5b) - INSTRUCTIONS.md — runtime usage, Step 0.5 PLAN MODE, TRINITY routing, Step 9 QC GATE, hallucination escalation, rollback recipe
- CORE_UPDATES.md — text to merge into core files
- QC.md — checklist (authoritative install-QC:
qc-convert-and-flow.sh) - CHANGELOG.md
- skill-version.txt
- qc-convert-and-flow.sh — automated install-level QC validator (static + live modes)
- qc-built-workflow.sh — per-build QC script (takes workflow-id, asserts WF-3/4/5/6/7/12/15/18/21/22, plus WF-19 under --conversational; emits per-item PASS/FAIL JSON AND the weighted quality-rubric floor score; invoked by the independent QC sub-agent at Step 9)
- platform/mac/ — Mac-specific paths + auto-re-grab recipe
- platform/vps/ — VPS-specific paths
- tools/engine/ — de-branded CLI engine (vendored from Jay's zip)
- tools/chrome-extension/ — Token Grabber Chrome extension (client-facing; load unpacked)
- tools/check-ghl-token-liveness.sh — daily Firebase token health check (Skills 44 + 46);
VALID → exit 0 + day-stamp; INVALID → client notification via
openclaw message send - references/owner-token-grabber-guide.md — owner-facing Token Grabber walkthrough (8 steps + download link) + agent wiring notes
- references/fleet-announcement-template.md — standardized owner announcement (canonical 3-message template,
[OWNER_NAME]/[AGENT_NAME]) + operator fleet-send runbook (gate, send mechanics, receipts) - references/workflow-build-checklist-template.md — canonical WF-1..WF-21 reusable checklist (agent self-check at PLAN MODE Step D + client hand-over after QC passes)
- references/workflow-quality-rubric.md — 8-dimension weighted quality rubric (SUPERSET overlay on WF-1..21; each dimension cites its WF evidence; ≥ 8.5 to ship; computed at Step 9 AFTER WF-1..21)
Relationship lattice (GK-27): see
docs/CONTENT-CONVERSATION-LATTICE.mdfor how this skill's build path relates to Skill 38 and its backstop rail relates to Skill 3.
Build-only, never a responder (T-19): this skill builds and QC's the GHL workflow that renders interactive controls; it never answers a conversation or an interactive step. The single-owner rule — OpenClaw inbound by default, with rendered controls, provider callbacks, free text and stale taps all resolving to that one owner — lives in
38-conversational-ai-system/launch/interactive-owner-contract.md. A native GHL workflow node is a build artifact, not a second responder.
Python dependency: jsonschema (operator note, never for the client)
The siglaunch normalizer and processor import jsonschema. On a Homebrew or Debian Python (externally managed,
PEP 668) pip refuses a plain or --user install, so the package lives in the shared pydeps folder
<root>/pydeps/py<major>.<minor>/ ($OC_PYDEPS_DIR as-is, else $OPENCLAW_ROOT, else /data/.openclaw when it
exists, else $HOME/.openclaw; $HOME/.claude/pydeps/py<X.Y>/ is also looked up), installed with
pip install --target. Both modules put that folder on sys.path themselves before they import, so plain python3
works: no venv, no activation step. Never use --break-system-packages, never create a venv, never tell the client.
If the import fails, check with bash update-skills.sh --check and run the one sanctioned fix from
83-black-friday-launcher: python3 -m launcher_core.cli dependencies --install.