Skip to content

Add support for native Automations workflows #6

Description

@jasich

Summary

The CLI can currently create funnels/pages and manage forms, email broadcasts/templates/topics, webhooks, and related resources, but it cannot create or manage native ClickFunnels Automations workflows.

That gap shows up when trying to build a complete lead magnet funnel from the CLI. We can create the opt-in page and thank-you page, but cannot add the expected automation: after a contact opts in on a funnel step, send a thank-you / asset-delivery email.

Current behavior

The public CLI/OpenAPI surface appears to expose:

  • funnel / page for the funnel and opt-in/thank-you pages
  • form, forms-field, forms-submission, etc.
  • emails-broadcast, emails-template, emails-topic
  • webhooks-outgoing-endpoint
  • refine-filter

But there is no CLI resource for native workflow creation or management. The support docs describe this as an Automations app workflow:

  • trigger: Opt-In
  • event location: a funnel step / opt-in page
  • action: Send Email
  • status: enabled/active

Today that final piece must be done in the ClickFunnels UI.

Desired workflow

A CLI user should be able to create an automation like:

cf workflow create --workspace-id 5466 --input workflow.json

Example input shape:

{
  "workflow": {
    "name": "AI Agent Field Guide - Opt-In Thank You",
    "run_type": "only_one_run_per_contact",
    "enabled": true,
    "triggers": [
      {
        "event_type": "opt_in",
        "funnel_id": "JKzone",
        "show_page_step_id": 2999624
      }
    ],
    "steps": [
      {
        "type": "send_email",
        "from_email": "no-reply@aiagentsurvivalguide.com",
        "from_name": "Jason Sich",
        "subject": "Your AI Agent Field Guide",
        "html_body": "<p>Thanks for grabbing the guide...</p>",
        "text_body": "Thanks for grabbing the guide..."
      }
    ]
  }
}

Exact request/response names should follow the underlying API, but the CLI should make the common opt-in follow-up case possible without requiring UI work.

Why this matters

Creating a funnel through the CLI is only half the job for a lead magnet. The expected outcome is:

  1. visitor opts in
  2. contact is created/identified
  3. visitor lands on the thank-you page
  4. thank-you / asset-delivery email is sent automatically

Without workflow support, CLI-built funnels are visually complete but operationally incomplete.

Acceptance criteria

  • Add generated or hand-written CLI support for native Automations workflow resources, if the API exposes them.
  • Support at least create/get/list/update for workflows.
  • Support enabling/disabling a workflow.
  • Support an opt-in trigger scoped to a funnel step/page.
  • Support a send-email action or whatever native workflow step maps to the UI's "Send Email" action.
  • Include docs/examples for creating a lead magnet opt-in follow-up email from the CLI.
  • If the public API does not expose this yet, document the limitation clearly in the CLI README so users do not assume emails-broadcast is the same thing as an automated follow-up workflow.

Notes

This came up while building a real funnel with the CLI. The CLI successfully created the funnel and pages, but the native opt-in email workflow could not be created via the documented public API/CLI surface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions