# Getting Started with Agents Source: https://flywheel.mintlify.app/agents/basics/getting-started-with-agents Understand the basics and start building an AI agent. Agents give your team the power to build AI-driven automations that reason over user context, make decisions, and execute tools — all inside of Flywheel. Let's dive in to understand the basics and get you started on building your first agent. ## What are agents? Agents are AI-powered automations that go beyond fixed step-by-step workflows. Instead of following a predetermined path, agents use a language model to evaluate context, choose which tools to call, and decide how to act — all in real time. They're ideal when the right action depends on nuanced user data, behavioral patterns, or external information that can't be captured with simple if/else branching. Whether you're looking to automate personalized outreach, triage customer risk, enrich user profiles with web data, or handle complex onboarding sequences, agents have you covered. From customer success to revenue operations, if you can describe the decision, an agent can make it. ## Components of an agent Understanding the components of an agent will give you a clearer picture of how to create, run, and refine your AI automations: **Triggers**: Defines when an agent run starts. It could be a specific user event (like a signup or purchase) or a drop-off condition (when a user fails to complete expected actions). **Agent Node**: The core reasoning engine. This is where you configure the model, system prompt, memory settings, and output behavior that control how the agent thinks and responds. **Tools**: Individual capabilities the agent can call during a run. Tools range from sending emails and Slack messages, to searching the web, creating Intercom tickets, and setting user properties. The agent decides which tools to use based on context. **Prompt**: The system-level instructions that guide the agent's reasoning, tone, and decision-making. A well-crafted prompt is the most important factor in agent quality. **Memory**: Controls what context the agent retains across tool calls within a single run. Memory settings determine how much prior reasoning is available when the agent makes its next decision. **Runs**: Each execution of an agent is called a "run". Runs produce logs, debug timelines, and tool call results that you can inspect to understand agent behavior. **Test Mode**: A controlled environment where you can run agents against real or sample payloads without affecting production data. ## Building an agent To build an agent, start by creating one from **Automation → Agents**. Here's a step-by-step guide: **Choose your trigger:** > [card] [New Event Trigger](/agents/triggers/new-event-trigger) > > Starts a run when a specific user event occurs, like a signup or purchase > [card] [Drop-off Trigger](/agents/triggers/drop-off-trigger) > > Starts a run when users fail to complete expected actions within a timeframe **Configure the agent node**: Set your model, system prompt, memory, and output settings. The prompt is where you describe the agent's role, goals, constraints, and the context it should consider. ## Agent node preview [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=agent-v1\&selected=true) ## Agent configuration preview [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=agent-v1) **Add tools**: Click the + icon on the agent node to add tools. The agent will decide which tools to call based on context and your prompt instructions. Available tools include: **Communication Tools:** > [card] [Email](/agents/tools/email/email) > > Send preconfigured emails with agent-controlled timing > [card] [Marketing Email](/agents/tools/email/marketing-email) > > Send builder-defined marketing emails > [card] [One-to-One Email](/agents/tools/email/one-to-one-email) > > Send personal emails from team members > [card] [AI Marketing Email](/agents/tools/email/ai-marketing-email) > > Generate and send AI-authored marketing emails > [card] [AI One-to-One Email](/agents/tools/email/ai-one-to-one-email) > > Generate and send AI-authored personal emails > [card] [Smart Message](/agents/tools/messaging/smart-message) > > Send context-aware messages across email and Slack **Slack Tools:** > [card] [Slack Message](/agents/tools/slack/slack-message) > > Send messages to Slack channels with context-aware content > [card] [Send Slack Channel Invites](/agents/tools/slack/send-slack-channel-invites) > > Invite users to existing Slack channels > [card] [Create Slack Channel](/agents/tools/slack/create-slack-channel) > > Create dedicated Slack channels and invite users **Assignment & Management Tools:** > [card] [Assign CSM](/agents/tools/workspace/assign-csm) > > Assign Customer Success Managers to users > [card] [Round Robin](/agents/tools/workspace/round-robin) > > Distribute ownership fairly across team members > [card] [Set Custom Property](/agents/tools/workspace/set-custom-property) > > Write values to user custom properties **Data & Research Tools:** > [card] [Find Event](/agents/tools/events/find-event) > > Search past user events for additional context > [card] [Exa Web Search](/agents/tools/search/exa-web-search) > > Search the web for external context and enrichment **Content & Support Tools:** > [card] [Agent Assets](/agents/tools/content/agent-assets) > > Provide approved links, text, and images for agent outputs > [card] [Create Intercom Ticket](/agents/tools/intercom/create-ticket) > > Escalate issues by creating support tickets **Configure tool inputs**: Each tool has inputs that you can set as fixed values in the builder, or leave for the agent to determine at runtime. Use the tool prompt field to guide when and how the agent should use each tool. **Test your agent**: Use the Test tab to run your agent against real or sample payloads. Select a target user, choose or edit an event payload, and click Run test to see how the agent behaves. **Publish**: Click Publish changes to take your agent live. Use the Live toggle to control whether production events trigger the agent. **Pause**: Toggle the Live switch off to stop the agent from processing production events while keeping the published configuration intact. ## Builder tabs ### Editor Configure the selected trigger, agent node, or tool node. This is your primary workspace for building and iterating on agent behavior. ### Runs Inspect historical runs with full logs and debug timelines. Each run shows the agent's reasoning, tool calls, inputs/outputs, and any errors encountered. ### Test Run controlled tests with selected users and event payloads before going live. Test mode writes a test run you can inspect in the Runs tab. ## Publishing and lifecycle Agent drafts and published state are separated to give you safe iteration: * **Publish changes** writes the current draft graph as the next live version * **Discard changes** resets draft state back to the last published version * **Live toggle** controls whether published logic is active for production events > [!NOTE] > > Publishing and going live are separate actions. You can publish a new version without enabling it for production traffic. ## Important things to know **Prompt quality matters most**: The system prompt is the single biggest lever for agent quality. Be specific about the agent's role, goals, constraints, tone, and what information to consider. **Test before going live**: Always test your agent with representative users and edge-case payloads. Check the debug timeline to verify tool selection, reasoning quality, and output correctness. **Tool prompts guide selection**: Each tool has its own prompt field. Use it to tell the agent when this specific tool should (and should not) be called. This prevents unnecessary tool usage and improves decision quality. **Monitor and iterate**: Review run history regularly. Look for unexpected tool calls, poor reasoning, or missed opportunities. Refine your prompts and tool configurations based on real run data. ## Next steps * Learn about [testing and monitoring agents](/agents/basics/testing-and-monitoring-agents) * Explore each trigger and tool page under the **Agents** docs section # Testing and Monitoring Agents Source: https://flywheel.mintlify.app/agents/basics/testing-and-monitoring-agents Test agent runs with sample events and monitor logs, debug data, and run history ## Test mode Use the **Test** tab in the agent builder to run controlled tests before making an agent live. ### Test flow 1. Select the target user 2. Select a recent event example for the configured trigger event 3. Review or edit the event payload JSON 4. Click **Run test** > [card] Agent test flow > > Test mode runs the agent with your selected payload and writes a test run you can inspect in the builder. ## Event payload behavior When recent events are available for the trigger event, Flywheel preloads a real event example. When no recent events are available, Flywheel falls back to schema-based payload generation so you can still run tests. > [!NOTE] > > If your trigger event is not configured yet, set it on the **New Event** trigger in Editor first. ## Run history and details Use the **Runs** tab to inspect run behavior: * **Run History**: list of recent runs for the selected node context * **Logs**: chronological execution logs * **Debug**: step timeline and step result data This is the fastest way to validate prompts, tool selection behavior, and output quality. ## Draft vs published behavior Agent runs should be validated with your current draft and then published when ready: * **Publish changes** applies current draft graph/config to the live version * **Discard changes** restores the last published graph/config * **Live toggle** controls whether real trigger events execute the agent ## Recommended testing checklist Before enabling Live: 1. Test with at least one representative user 2. Test with at least one edge-case payload 3. Verify required tools return expected outputs 4. Verify messages/emails match tone and policy 5. Confirm logs and debug timeline have no unexpected failures # Agent assets Source: https://flywheel.mintlify.app/agents/tools/content/agent-assets Provide approved links, text snippets, and images for agent outputs [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=agent_assets) ## How Agent assets works Agent assets is a content library tool that gives your agent pre-approved material to reference while generating messages. You can store links, reusable text snippets, and uploaded images. This keeps every customer-facing output on brand and compliant — the agent selects from your curated library instead of generating content from scratch. Assets are matched by title and description, so well-named assets are surfaced reliably when the agent's prompt references them. ## Configuration > [card] Inputs > > **Prompt** `string` > > Instructions for when the agent should use the assets. > > **Assets** `object` *required* > > List of curated assets. Each asset has a kind, title, and description with kind-specific content fields. > > **Asset kind** `enum` *required* > > **Options:** `link`, `text`, `image`. > > **Title** `string` *required* > > Asset identifier. Use stable names so prompts can reference them consistently. > > **Description** `string` > > Guidance for when to use the asset. > > **Link URL** `string` > > For `link` assets, the destination URL. > > **Text body** `string` > > For `text` assets, the reusable copy block. > > **Image URL** `string` > > For `image` assets, uploaded image URL. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=agent_assets) > [card] Outputs > > **assets** `object[]` *required* > > The full set of configured assets available to the agent during the run. > > **assets\[].kind** `enum` *required* > > The type of asset: `link`, `text`, or `image`. > > **assets\[].title** `string` *required* > > The title identifier used to reference this asset in prompts and agent reasoning. > > **assets\[].description** `string` > > The usage guidance that tells the agent when this asset is appropriate. > > **assets\[].content** `string` *required* > > The resolved content — a URL for link/image assets, or the text body for text assets. ## Use Cases **Brand-Safe Imagery** ``` Condition: Agent is composing a lifecycle or marketing email Action: Agent selects from uploaded, approved product images instead of generating or linking external images Outcome: Every email uses on-brand visuals that have passed design review ``` **Legal/Compliance Copy** ``` Condition: Message content touches pricing, terms, or regulatory topics Action: Agent inserts the matching disclaimer or legal text snippet verbatim Outcome: Compliance language is consistent across all automated communications ``` **Resource Links** ``` Condition: Agent recommends a help article, doc page, or onboarding guide Action: Agent pulls the canonical URL from the asset library rather than generating a link Outcome: Users always receive correct, up-to-date links — no broken or hallucinated URLs ``` **Product Documentation** ``` Condition: Agent responds to a feature question or onboarding milestone Action: Agent references stored text snippets describing product capabilities and setup steps Outcome: Responses are accurate and aligned with the latest product documentation ``` ## Best Practices **Asset Organization** * Keep asset titles short, stable, and descriptive so prompts can reference them reliably. * Use a consistent naming convention (e.g., `legal-disclaimer-pricing`, `img-hero-product`) across your library. * Group related assets with similar title prefixes to make the library easy to browse and maintain. * Add one asset per concept — avoid bundling multiple links or snippets into a single asset. **Content Governance** * Store only approved, reviewed content for customer-facing communication. * Use the description field to specify exactly when each asset should be used so the agent picks the right one. * Periodically review and remove outdated assets to prevent the agent from referencing stale content. * Version sensitive copy (legal disclaimers, pricing) and update assets promptly when terms change. **Prompt Integration** * Reference asset titles explicitly in your agent prompt (e.g., "Use the `legal-disclaimer-pricing` asset when discussing costs"). * Instruct the agent to prefer assets over generated content for any compliance-sensitive output. * Combine image assets with text assets when emails need both visuals and copy from the approved library. * Test that the agent selects the correct asset by running sample events through the agent preview. # AI Marketing Email Source: https://flywheel.mintlify.app/agents/tools/email/ai-marketing-email Generate and send AI-authored marketing emails from an agent run [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=send_agent_marketing_email) ## How AI Marketing Email works **AI Marketing Email** lets your agent generate the subject, preview text, and body content at runtime, then send the email to the selected user using your configured sender. This is the right tool when message content should adapt to the current user context instead of using fixed, pre-approved copy. The agent uses its prompt instructions and available user data to craft contextually relevant marketing content on every send. This makes AI Marketing Email particularly powerful for lifecycle messaging, personalized promotions, and campaigns where one-size-fits-all copy underperforms. You still control the sender configuration and delivery rules in the builder, so brand identity and send infrastructure remain consistent. ## Configuration > [card] Inputs > > **Prompt** `string` > > Guidance for when and how the agent should use this tool. > > **Send to** `string` *required* > > Target org user ID. Can be selected in the builder or AI-defined during execution. > > **From** `string` *required* > > Sender configuration used for delivery. > > **Subject** `string` *required* > > Email subject. Typically AI-defined for personalization. > > **Preview (optional)** `string` > > Preview text shown by inbox clients. > > **cc** `string[]` > > Optional CC recipients. > > **bcc** `string[]` > > Optional BCC recipients. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=send_agent_marketing_email) > [card] Outputs > > **status** `enum` *required* > > The status of the email send operation. Can be `success`, `failure`, or `skipped`. > > **to\_id** `string` *required* > > The ID of the user that the email was sent to. > > **sender\_config\_id** `string` *required* > > The ID of the sender configuration used for the email. > > **email\_id** `string` > > The ID of the email that was sent (available on success). > > **create\_email\_options** `object` > > The options used when creating the email, including the AI-generated subject, preview text, and body content (available on success). > > **create\_email\_response** `object` > > The response from the email creation service (available on success). > > **code** `enum` > > The code indicating why the email send operation failed or was skipped. Can be `resend_error`, `duplicate_email`, or `user_marketing_email_opt_out`. > > **error\_message** `string` > > The message of the error that occurred (available on failure). ## Use cases **Expansion Opportunity** ``` Condition: User has high expansion potential based on usage patterns Action: Generate benefit-led promotional copy tailored to user's current plan and activity Outcome: User receives a personalized upgrade offer that speaks to their specific needs ``` **Milestone Celebration** ``` Condition: User completed a significant milestone event (e.g., first integration, 1000th API call) Action: Generate contextual congratulations with a recommended next best action Outcome: Timely lifecycle email reinforces engagement and guides the user forward ``` **Personalized Re-Engagement** ``` Condition: User has been inactive for 21+ days with previously high engagement Action: Generate win-back email referencing the user's past activity and new features they missed Outcome: Lapsed user receives relevant, personalized messaging that drives return visits ``` **Segment-Specific Campaign** ``` Condition: User matches a dynamic segment (e.g., healthcare vertical, enterprise tier) Action: Generate industry- or tier-specific campaign content with relevant social proof Outcome: Marketing email resonates with the recipient's context instead of using generic copy ``` ## Best practices **Prompt Quality** * Write detailed prompt instructions that specify tone, length, CTA style, and any content constraints. * Include examples of good and bad output in the prompt to guide the agent's content generation. * Reference specific user properties the agent should incorporate (e.g., plan name, company size, recent activity). **Content Guardrails** * Specify prohibited claims, pricing language, or legal disclaimers that must be included or avoided. * Test generated content across multiple user profiles to verify the agent produces appropriate variations. * Monitor `create_email_options` output to audit what the agent actually sent in each email. **Testing and Iteration** * Start with a narrow user segment to evaluate AI-generated copy quality before broadening the audience. * Compare open and click rates against builder-defined Marketing Email sends to measure personalization impact. * Iterate on prompt instructions based on real send outputs — refine constraints when the agent drifts from expected tone or format. # AI One-to-One Email Source: https://flywheel.mintlify.app/agents/tools/email/ai-one-to-one-email Send one-to-one emails with AI-generated subject and body copy [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=send_agent_one_to_one_email) ## How AI One-to-One Email works **AI One-to-One Email** lets the agent generate personalized one-to-one email content at runtime. You configure core delivery controls — sender identity and failure behavior — in the builder, while the agent tailors the subject, preview text, and body to the current situation. This tool combines the personal feel of one-to-one messaging with the flexibility of AI-generated content. It is ideal for high-touch outreach scenarios where the message should reference specific user context — like recent activity, account health, or lifecycle stage — while still appearing as a direct email from a real team member. The agent adapts every send to the recipient, so no two emails need to read the same way. > [!NOTE] > > An agent's one-to-one email skips anyone who opted out of marketing email: the send returns `skipped` with the code `user_marketing_email_opt_out`, and nothing goes out. ## Configuration > [card] Inputs > > **Prompt** `string` *required* > > Instructions that tell the agent when this tool should be used and what quality bar the generated copy should meet. > > **Send to** `string` *required* > > Target user to email. > > **Send from** `string` *required* > > Team member identity used as sender. > > **Subject** `string` *required* > > AI-generated subject line. > > **Preview (optional)** `string` > > Optional AI-generated preview text. > > **cc** `string[]` > > Optional CC recipients; can be set by builder defaults or agent at runtime. > > **bcc** `string[]` > > Optional BCC recipients; can be set by builder defaults or agent at runtime. > > **Complete on send failure** `boolean` (default: true) > > Controls whether the run should continue when send fails. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=send_agent_one_to_one_email) > [card] Outputs > > **status** `enum` *required* > > The status of the email send operation. Can be `success`, `failure`, or `skipped`. > > **to\_id** `string` *required* > > The ID of the user that the email was sent to. > > **from\_id** `string` *required* > > The team member ID used as the sender for this email. > > **email\_id** `string` > > The ID of the email that was sent (available on success). > > **create\_email\_options** `object` > > The options used when creating the email, including the AI-generated subject, preview text, and body content (available on success). > > **create\_email\_response** `object` > > The response from the email creation service (available on success). > > **code** `enum` > > The code indicating why the email send operation failed or was skipped. Can be `resend_error`, `duplicate_email`, or `user_marketing_email_opt_out`. > > **error\_message** `string` > > The message of the error that occurred (available on failure). ## Use cases **Trial-to-Paid Conversion Follow-Up** ``` Condition: User upgrades from trial to paid plan Action: Agent generates personalized congratulatory email from assigned CSM Outcome: New customer receives a warm, contextual welcome that references their trial activity ``` **High-Risk Account Outreach** ``` Condition: Churn risk score crosses a critical threshold Action: Agent generates a contextual check-in with next-step recommendations from the account owner Outcome: At-risk user receives a personal, relevant message addressing their specific situation ``` **Onboarding Guidance** ``` Condition: User completes initial setup but has not activated a key feature after 5 days Action: Agent generates a helpful nudge from the success manager referencing the user's current progress Outcome: Stalled user receives targeted guidance that feels like a personal check-in, not a generic drip ``` **Quarterly Business Review Prep** ``` Condition: QBR date is within 14 days and usage data is available Action: Agent generates a pre-QBR outreach email summarizing recent activity and proposed agenda items Outcome: Customer receives a thoughtful, data-informed touchpoint that sets up a productive review ``` ## Best practices **Prompt Quality and Tone Control** * Give concrete voice, policy, and CTA constraints in the tool prompt to keep generated outreach consistent and safe. * Include examples of ideal tone and length so the agent has a clear quality bar for every send. * Reference specific user properties the agent should weave into the message (e.g., company name, recent milestones, plan tier). **Sender Identity and Personalization** * Configure sender selection rules to ensure the agent uses the correct team member identity for each recipient. * Avoid generic sender assignments — the `from_id` should map to the person who actually owns the customer relationship. * Audit `from_id` and `create_email_options` outputs periodically to verify the agent is sending from the right person with appropriate content. **Testing and Guardrails** * Start with a small cohort to evaluate generated copy quality before rolling out to a broader audience. * Set `complete_on_send_failure` appropriately — enable it when the agent run has other critical steps that should proceed regardless. * Monitor `code` output for patterns like `duplicate_email` to detect and prevent repeat outreach to the same user. # Email Source: https://flywheel.mintlify.app/agents/tools/email/email Send builder-defined email content to a specific user from an agent [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=send_email) ## How Email works Use **Email** when you want the agent to execute a preconfigured email action. The agent decides when to use the tool, while you control the sender, subject, and body defaults in the builder. This gives you full control over the messaging content while letting the agent handle timing and recipient selection based on real-time context. Email is ideal when your copy is already approved and consistent messaging matters more than personalization. Because all content is builder-defined, the agent cannot modify the email body — it simply triggers delivery when conditions are met during the run. ## Configuration > [card] Inputs > > **Prompt** `string` > > Instructions that define when this tool should be used. > > **Send to (`params.to_id`)** `string` *required* > > Flywheel user ID to receive the email. > > **Sender (`params.sender_config_id`)** `string` *required* > > Sender configuration to use for delivery. > > **Subject (`params.subject`)** `string` > > Subject used for this message. > > **Preview (`params.preview_text`)** `string` > > Optional email preview text. > > **CC (`params.cc_emails`)** `string[]` > > Optional CC recipients. > > **BCC (`params.bcc_emails`)** `string[]` > > Optional BCC recipients. > > **Complete on send failure (`params.complete_on_send_failure`)** `boolean` (default: true) > > Whether the run should continue when send fails. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=send_email) > [card] Outputs > > **status** `enum` *required* > > The status of the email send operation. Can be `success`, `failure`, or `skipped`. > > **to\_id** `string` *required* > > The ID of the user that the email was sent to. > > **sender\_config\_id** `string` *required* > > The ID of the sender configuration used for the email. > > **email\_id** `string` > > The ID of the email that was sent (available on success). > > **create\_email\_options** `object` > > The options used when creating the email, including subject, preview text, and recipients (available on success). > > **create\_email\_response** `object` > > The response from the email creation service (available on success). > > **code** `enum` > > The code indicating why the email send operation failed or was skipped. Can be `resend_error`, `duplicate_email`, or `user_marketing_email_opt_out`. > > **error\_message** `string` > > The message of the error that occurred (available on failure). ## Use cases **Onboarding Completion** ``` Condition: User completed onboarding checklist Action: Send preconfigured welcome email with next steps Outcome: User receives consistent onboarding messaging immediately after setup ``` **High-Intent Follow-Up** ``` Condition: Agent classifies user as high intent based on activity signals Action: Send tailored follow-up using builder-defined template Outcome: Qualified lead receives timely outreach without manual intervention ``` **Renewal Reminder** ``` Condition: User subscription renewal date is within 14 days Action: Send renewal reminder email with plan details Outcome: User is prompted to renew before their subscription lapses ``` **Feature Adoption Nudge** ``` Condition: User has not activated a key feature after 7 days Action: Send feature education email highlighting benefits and setup guide Outcome: Drive feature adoption with well-timed product education ``` ## Best practices **Content Control** * Keep all email content builder-defined to ensure brand consistency and compliance review. * Use this tool instead of AI-generated variants when the copy must match an approved template exactly. * Pair with preview text to improve open rates in inbox clients. **Failure Handling** * Enable `complete_on_send_failure` when the agent run should proceed even if the email fails. * Monitor `code` output values like `duplicate_email` and `user_marketing_email_opt_out` to understand skip reasons. * Log `error_message` output for debugging delivery issues in BetterStack. **Targeting and Timing** * Use the agent prompt to define clear conditions for when this tool should fire during a run. * Avoid sending duplicate emails by checking recent send history through agent context. * Combine with other tools like Set Custom Property to mark users after email delivery. # Marketing Email Tool Source: https://flywheel.mintlify.app/agents/tools/email/marketing-email Send builder-defined marketing emails from an agent run [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=send_marketing_email) ## How Marketing Email works The **Marketing Email** tool sends a marketing email to a user using content and sender defaults configured in the builder. The agent decides *when* to use the tool and *who* to send to, making it ideal for campaign-style messaging where copy is pre-approved but delivery timing depends on user behavior. Because the content is fully builder-defined, Marketing Email ensures brand consistency across all sends. The agent's role is limited to selecting the right moment and recipient, keeping your campaign messaging on-brand while still reacting to real-time signals during the run. ## Configuration > [card] Inputs > > **Prompt** `string` > > Tool-level instruction that explains when this tool should be used. > > **Send to (`params.to_id`)** `string` *required* > > Recipient org user id. Can be provided by user selection or agent decision. > > **From (`params.sender_config_id`)** `string` *required* > > Sender configuration used for delivery. > > **CC (`params.cc_emails`)** `string[]` > > Optional CC recipients. > > **BCC (`params.bcc_emails`)** `string[]` > > Optional BCC recipients. > > **Complete on send failure (`params.complete_on_send_failure`)** `boolean` (default: true) > > Controls whether the run should continue if sending fails. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=send_marketing_email) > [card] Outputs > > **status** `enum` *required* > > The status of the email send operation. Can be `success`, `failure`, or `skipped`. > > **to\_id** `string` *required* > > The ID of the user that the email was sent to. > > **sender\_config\_id** `string` *required* > > The ID of the sender configuration used for the email. > > **email\_id** `string` > > The ID of the email that was sent (available on success). > > **create\_email\_options** `object` > > The options used when creating the email, including subject, body, and recipient details (available on success). > > **create\_email\_response** `object` > > The response from the email creation service (available on success). > > **code** `enum` > > The code indicating why the email send operation failed or was skipped. Can be `resend_error`, `duplicate_email`, or `user_marketing_email_opt_out`. > > **error\_message** `string` > > The message of the error that occurred (available on failure). ## Use cases **Product Launch Announcement** ``` Condition: User is on a qualified trial and matches target segment Action: Send launch announcement with feature highlights and upgrade CTA Outcome: Trial users receive timely awareness of new capabilities ``` **Usage Milestone Campaign** ``` Condition: Product usage reaches a defined threshold (e.g., 100 API calls) Action: Send campaign email celebrating the milestone with next-level tips Outcome: Engaged users receive contextual encouragement to deepen adoption ``` **Retention Campaign** ``` Condition: User has been inactive for 14+ days Action: Send re-engagement email with value reminders and return incentive Outcome: At-risk users receive win-back messaging before churn ``` **Upgrade Promotion** ``` Condition: Free-tier user hits plan limits or requests a gated feature Action: Send targeted upgrade email with plan comparison and discount offer Outcome: High-intent free users receive conversion messaging at peak interest ``` ## Best practices **Campaign Consistency** * Keep all campaign copy and branding builder-defined to maintain consistency across sends. * Let the agent control timing and recipient selection, not the core copy or design. * Use preview text to improve open rates and reinforce the subject line in inbox clients. **Failure Handling** * Set `complete_on_send_failure` to `true` when the agent run should continue even if the email fails. * Check the `code` output for `user_marketing_email_opt_out` to understand opt-out-related skips. * Use `error_message` alongside `code` to diagnose delivery failures and improve reliability. **Recipient Targeting** * Define clear trigger conditions in the agent prompt to avoid sending to unqualified users. * Leverage user properties and event data to let the agent select the best recipients dynamically. * Avoid duplicate sends by combining with Set Custom Property to mark users who have already received the campaign. # One-to-One Email Source: https://flywheel.mintlify.app/agents/tools/email/one-to-one-email Send a builder-defined one-to-one email while letting the agent choose timing and recipient [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=send_one_to_one_email) ## How One-to-One Email works **One-to-One Email** sends a personal email from a configured team member sender using content defaults you define in the builder. Unlike marketing emails, these messages appear as direct communication from a real person on your team, making them ideal for relationship-driven outreach. The builder controls the sender identity, subject, and body content, while the agent handles timing and recipient selection during the run. This ensures every one-to-one message maintains a consistent, personal tone while still being triggered automatically based on user behavior or lifecycle stage. > [!NOTE] > > An agent's one-to-one email skips anyone who opted out of marketing email: the send returns `skipped` with the code `user_marketing_email_opt_out`, and nothing goes out. A one-to-one email step in a workflow does not check the opt-out. ## Configuration > [card] Inputs > > **Prompt** `string` *required* > > Instructions for when and how the agent should use this tool. > > **Send to** `string` *required* > > Target user (`params.to_id`), with user or agent assignment mode. > > **Send from** `string` *required* > > Team member sender (`params.from_id`) used as the one-to-one sender. > > **CC** `string[]` > > Optional CC emails. > > **BCC** `string[]` > > Optional BCC emails. > > **Complete on send failure** `boolean` (default: true) > > Controls whether the run continues when send fails. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=send_one_to_one_email) > [card] Outputs > > **status** `enum` *required* > > The status of the email send operation. Can be `success`, `failure`, or `skipped`. > > **to\_id** `string` *required* > > The ID of the user that the email was sent to. > > **from\_id** `string` *required* > > The team member ID used as the sender for this email. > > **email\_id** `string` > > The ID of the email that was sent (available on success). > > **create\_email\_options** `object` > > The options used when creating the email, including subject, body, CC, and BCC settings (available on success). > > **create\_email\_response** `object` > > The response from the email creation service (available on success). > > **code** `enum` > > The code indicating why the email send operation failed or was skipped. Can be `resend_error`, `duplicate_email`, or `user_marketing_email_opt_out`. > > **error\_message** `string` > > The message of the error that occurred (available on failure). ## Use cases **Lifecycle Handoff** ``` Condition: User passes qualification criteria and is assigned a CSM Action: Send one-to-one introduction note from the assigned CSM Outcome: New qualified user receives a personal welcome from their point of contact ``` **Churn Risk Outreach** ``` Condition: Account risk score crosses a critical threshold Action: Send curated outreach message from the account owner Outcome: At-risk user receives direct, personal communication to re-engage ``` **Missed Milestone Check-In** ``` Condition: User has not completed a key onboarding step after 10 days Action: Send one-to-one reminder from the success lead with guidance Outcome: Stalled user receives targeted help to get back on track ``` **Renewal Conversation Starter** ``` Condition: User subscription renewal is within 30 days Action: Send personal note from account manager to open renewal discussion Outcome: Proactive relationship touch before the renewal window closes ``` ## Best practices **Sender Identity** * Map the sender to the team member who actually owns the relationship with the recipient. * Avoid using generic or shared sender identities — one-to-one emails should feel personal. * Use `from_id` output to verify the correct sender was used in each delivery. **Delivery and State Tracking** * Follow successful sends with Set Custom Property to mark that outreach has been completed. * Enable `complete_on_send_failure` when the agent run should proceed regardless of email delivery status. * Monitor `code` output values like `duplicate_email` to prevent repeat outreach to the same user. **Content and Template Quality** * Keep email content defaults up to date and aligned with your team's current voice and messaging. * Review templates regularly to ensure they reflect current product state and company positioning. * Use preview text to reinforce the subject line and improve open rates in recipient inboxes. # Find Event (Agent Tool) Source: https://flywheel.mintlify.app/agents/tools/events/find-event Search past events so the agent can make decisions from user activity [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=find_event) ## How Find Event works Find Event lets your agent query existing event data during a run. This is useful when the trigger event alone does not contain enough context to decide what action to take. The agent can look up any named event for the current user, apply filter conditions to narrow results, and choose whether to return the newest or oldest match. The returned event object — including its custom properties — becomes part of the agent's working context for downstream tool calls and decisions. ## Configuration > [card] Inputs > > **Prompt** `string` > > Guidance for when the agent should call this tool. > > **Event Name** `string` > > The event to search for. > > **Query Conditions** `object[]` > > Optional filter conditions to narrow matches. > > **Selection Strategy** `enum` (default: newest) > > Which matching event to return. **Options:** `newest`, `oldest`. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=find_event) > [card] Outputs > > **event** `object` *required* > > The found event data that matches the search criteria. > > **Event Properties** > > **event.event\_name** `string` *required* > > The name of the found event. > > **event.timestamp** `string` *required* > > ISO 8601 timestamp of when the event occurred. > > **event.org\_user\_id** `string` *required* > > The user associated with the event. > > **event.custom\_properties** `object` > > Key-value map of custom data attached to the event at ingestion time. > > **event.source** `string` > > Origin of the event (e.g. SDK, API, integration). > > **event.event\_id** `string` > > Unique identifier for the event record. ## Use Cases **Behavior Analysis** ``` Event Name: purchase_completed Query Conditions: purchase_amount > 100 Selection Strategy: newest Use: Personalize recommendations based on recent high-value purchases ``` **Feature Usage Tracking** ``` Event Name: feature_activated Query Conditions: feature_name = "advanced_reporting" Selection Strategy: newest Use: Confirm feature adoption before sending upgrade prompts ``` **Onboarding Progress** ``` Event Name: onboarding_step_completed Query Conditions: step_index >= 3 Selection Strategy: oldest Use: Determine where a user stalled in the onboarding flow ``` **Support Context Enrichment** ``` Event Name: support_ticket_created Query Conditions: priority = "high" Selection Strategy: newest Use: Give the agent recent support history before composing outreach ``` ## Best Practices **Efficient Queries** * Use specific event names rather than broad searches to keep lookups fast. * Apply query conditions to filter irrelevant matches before they reach the agent. * Prefer `newest` selection when recent behavior matters most; use `oldest` for first-occurrence analysis. **Context Utilization** * Combine event data with user properties for richer decision-making. * Reference custom properties from the returned event in downstream tool prompts. * Chain Find Event with other tools (e.g. Smart Message, Set Custom Property) so the agent acts on real activity data. **Data Management** * Ensure event names follow a consistent naming convention so the agent can reliably locate them. * Keep custom property schemas stable across event versions to avoid unexpected nulls. * Use query conditions as guardrails to prevent the agent from acting on stale or irrelevant events. # Create Ticket Source: https://flywheel.mintlify.app/agents/tools/intercom/create-ticket Create Intercom tickets from agent decisions and event context [Agent Tool Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=create_intercom_ticket) ## How Create Ticket works Use this tool when an agent should escalate work into Intercom as a trackable ticket. It is useful for support handoffs, success follow-ups, and account risk workflows. The agent evaluates incoming event data and user context to decide whether a ticket is warranted, then populates the title, description, and ticket type using the information available in the run. Created tickets appear in your Intercom workspace immediately and can be routed, triaged, and resolved by your support or success team. ## Configuration > [card] Inputs > > **Prompt** `string` *required* > > Agent instruction for when to create a ticket and what detail level to include. > > **Associated User** `string` *required* > > Org user to associate with the Intercom ticket. > > **Ticket Type** `string` *required* > > Intercom ticket type to create. > > **Ticket Title** `string` *required* > > Ticket subject line. > > **Ticket Description** `string` *required* > > Main ticket body content with context and requested action. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=create_intercom_ticket) > [card] What to include in ticket content > > **User context** `object` > > Account identifiers, lifecycle stage, and ownership context. > > **Why escalated** `string` > > Root reason the agent opened a ticket (for example, failed onboarding milestone or urgent customer request). > > **Recommended next action** `string` > > Specific action for support/success teams to take. > [card] Outputs > > **intercom\_ticket\_id** `string` *required* > > The unique ID of the ticket that was created in Intercom. > > **intercom\_user\_id** `string` *required* > > The ID of the Intercom user associated with the ticket. > > **ticket\_type** `string` *required* > > The ticket type that was assigned during creation, matching the configured Intercom ticket type. > > **status** `enum` *required* > > Current status of the created ticket. Typically `open` on creation. **Values:** `open`, `pending`, `resolved`, `closed`. ## Use Cases **High-Value Customer Issues** ``` Title: "Priority Support - {{user.name}} ({{user.tier}})" Description: "High-priority issue for enterprise customer requiring immediate attention" Ticket Type: Enterprise Support Use: Ensure VIP customers get immediate support attention ``` **Payment Failure Escalation** ``` Trigger: payment_failed event with amount > $500 Title: "Payment Failure - {{user.company}} - ${{event.amount}}" Description: "Recurring payment failed for active account; risk of involuntary churn" Ticket Type: Billing Escalation Use: Route payment issues to billing specialists before the account churns ``` **Onboarding Issue Escalation** ``` Trigger: User has not completed setup 7 days after signup Title: "Stalled Onboarding - {{user.name}} ({{user.company}})" Description: "User signed up on {{user.created_at}} but has not completed key milestones" Ticket Type: Onboarding Support Use: Alert the success team to proactively reach out and unblock the user ``` **Feature Request Tracking** ``` Trigger: Agent detects repeated feature-related feedback in events Title: "Feature Request - {{event.feature_name}} - {{user.company}}" Description: "Multiple signals indicate demand for this feature from an active account" Ticket Type: Product Feedback Use: Capture structured product feedback and route it to the product team ``` ## Best Practices **Ticket Information** * Use descriptive titles that clearly identify the issue and include the affected user or account. * Include relevant context and user information in descriptions so the assignee can act without extra lookups. * Choose appropriate ticket types for proper routing into the correct Intercom queue. * Add event IDs or timestamps for traceability back to the originating trigger. **Automation Triggers** * Create tickets for high-priority issues that genuinely need human attention. * Avoid creating tickets for routine, automated issues that resolve on their own. * Use appropriate thresholds (dollar amounts, time windows, event counts) to prevent ticket spam. * Deduplicate by checking for existing open tickets before creating new ones for the same user and issue. **Integration Management** * Ensure user mapping between Flywheel and Intercom is accurate so tickets land on the right contact. * Monitor ticket creation rates and adjust triggers as needed to keep volume manageable. * Coordinate with your support team on automated ticket expectations and SLA alignment. * Periodically audit ticket types in Intercom to confirm they match your agent configuration. # Smart Message Source: https://flywheel.mintlify.app/agents/tools/messaging/smart-message Send context-aware messages across email and Slack from a single agent tool [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=send_smart_message) ## How Smart Message works Smart Message lets an agent choose communication paths using a unified message tool. It can work across configured contact methods and use runtime context to decide the right delivery behavior. Rather than requiring separate email and Slack tools, Smart Message consolidates outreach into a single step where the agent selects the optimal channel based on available contact information, urgency, and your configured strategy. ## Configuration > [card] Inputs > > **Prompt** `string` > > Guidance for when this tool should run and how the agent should compose or route the message. > > **To** `string` *required* > > The target user to contact. > > **From** `string` *required* > > The internal sender identity used for message context. > > **Enabled contact methods** `string[]` > > Communication channels this tool can use. > > **Contact selection strategy** `enum` > > How Flywheel should choose among available contacts for enabled methods. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=send_smart_message) > [card] Outputs > > **message\_status** `enum` *required* > > Final result for send routing and delivery (e.g. sent, failed, skipped). > > **delivery\_channel** `string` *required* > > Channel chosen for the message attempt (e.g. email, slack). > > **to\_id** `string` > > User ID the message was delivered to. > > **from\_id** `string` > > Sender identity used for the message. > > **message\_id** `string` > > Unique identifier for the sent message when delivery succeeds. > > **fallback\_used** `boolean` > > Whether a fallback channel was used when the preferred channel was unavailable. ## Use Cases **Channel-Aware Urgent Outreach** ``` Condition: User has Slack identifier and email Strategy: Prefer Slack for urgent updates, fall back to email Use: Reach users on their most responsive channel for time-sensitive messages ``` **Email Fallback Routing** ``` Condition: No valid Slack identifier available Strategy: Automatically route to email Use: Ensure delivery even when the preferred channel is unavailable ``` **Lifecycle Event Follow-Up** ``` Condition: Proactive outreach after key lifecycle events Strategy: Use contact selection strategy to pick the best channel Use: Deliver timely, personalized messages without hardcoding a channel per workflow ``` **Multi-Touch Engagement** ``` Condition: User completed onboarding but has not activated a key feature Strategy: Send via Slack if available, email otherwise Use: Drive feature adoption with a single flexible outreach tool ``` ## Best Practices **Channel Policy** * Define allowed methods explicitly so routing remains predictable and auditable. * Reserve Smart Message for scenarios where channel flexibility is genuinely helpful — use dedicated email or Slack tools when the channel is always the same. * Test fallback behavior to confirm messages still deliver when the primary channel is missing contact data. **Sender Context** * Ensure sender identities are valid and intentional for the outreach type. * Match the sender to the user's assigned CSM or account owner for personal-feeling messages. * Avoid generic sender identities for high-touch outreach where relationship context matters. **Message Quality** * Use the agent prompt to guide tone and length based on the delivery channel — Slack messages should be concise, emails can be more detailed. * Pair Smart Message with Find Event or Set Custom Property to ground the message in real user activity. * Monitor `message_status` and `fallback_used` outputs to identify users with incomplete contact data. # Exa Web Search Source: https://flywheel.mintlify.app/agents/tools/search/exa-web-search Search the web from an agent with filters for type, date range, domains, and result depth [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=exa_web_search) ## How Exa Web Search Works Use Exa Web Search when your agent needs current external information that is not available in Flywheel event or profile data. The tool executes a real-time web query through the Exa search API and returns structured results the agent can reason over to personalize messages, verify claims, or gather competitive context. You control scope with domain allowlists/blocklists, date ranges, and content category filters so the agent only surfaces relevant, approved sources. ## Configuration > [card] Inputs > > **Prompt** `string` > > Instructions for when the agent should run web search and how it should use retrieved sources. > > **Query** `string` *required* > > Search query text. Can be user-defined or AI-defined. > > **Maximum Results** `number` (default: 10) > > Number of results to return. > > **Search Type** `enum` (default: auto) > > Search strategy. **Options:** `auto`, `fast`, `deep`, `neural`. > > **Content Category** `enum` > > Optional source category filter. **Options:** `company`, `research paper`, `news`, `pdf`, `tweet`, `personal site`, `financial report`, `people`. > > **Date Range** `object` > > Relative date window using value + unit (`days`, `weeks`, `months`, `years`). > > **Include Domains** `string[]` > > Domain allowlist. > > **Exclude Domains** `string[]` > > Domain blocklist. > > **Include Text / Exclude Text** `string[]` > > Optional text constraints for filtering results. > > **User Location** `string` > > ISO country code context (for localized result relevance). > > **Moderation** `boolean` > > Content moderation flag. > > **Use Autoprompt** `boolean` > > Allow Exa autoprompt behavior. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=exa_web_search) > [card] Outputs > > **results** `object[]` *required* > > Array of search result objects returned by the Exa API for the agent to reason over. > > **results\[].url** `string` *required* > > The URL of the matching web page. > > **results\[].title** `string` *required* > > The page title as indexed by the search provider. > > **results\[].snippet** `string` > > A text excerpt from the page content relevant to the query. > > **result\_count** `number` *required* > > Total number of results returned in this search execution. > > **query\_used** `string` *required* > > The final query string sent to Exa, which may differ from the input if autoprompt rewrote it. ## Use Cases **Competitive Intelligence** ``` Query: "{{user.competitor}} product launch 2025" Content Category: news Date Range: 30 days Use: Agent references recent competitor moves to personalize renewal or upsell messaging ``` **Account Enrichment** ``` Query: "{{user.company}} funding round OR acquisition" Content Category: news Include Domains: techcrunch.com, crunchbase.com Use: Agent enriches account context with latest funding or M&A activity before outreach ``` **Content Research** ``` Query: "best practices {{user.industry}} {{event.topic}}" Content Category: research paper Maximum Results: 5 Use: Agent gathers authoritative sources to include in educational drip campaigns ``` **Compliance Verification** ``` Query: "{{user.company}} regulatory action OR compliance update" Include Domains: sec.gov, finra.org Exclude Domains: reddit.com, twitter.com Use: Agent validates compliance standing before sending sensitive communications ``` ## Best Practices **Query Strategy** * Keep queries specific and task-oriented to reduce noise in results. * Use dynamic template variables (e.g., `{{user.company}}`) so queries stay relevant per run. * Prefer the `auto` search type unless you have a clear reason to force `deep` or `neural`. * Limit result counts to what the agent actually needs — fewer results mean faster execution. **Domain Control** * Constrain domains for compliance-sensitive messaging to approved sources only. * Use the exclude list to block social media or user-generated content when accuracy matters. * Combine domain filters with content category filters for the tightest result scope. * Regularly review your allowlists to ensure referenced domains are still authoritative and active. **Performance** * Use lower result counts for speed; increase only when the agent needs breadth. * Set date ranges to avoid stale content and keep results timely. * Enable autoprompt only when the agent's query may benefit from Exa's reformulation logic. * Monitor search usage to stay within rate limits and avoid unnecessary API calls. # Create Slack Channel Source: https://flywheel.mintlify.app/agents/tools/slack/create-slack-channel Create a Slack channel and invite users from your agent run context [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=create_slack_channel) ## How Create Slack Channel works Use this tool when your agent needs to create a new collaboration channel and optionally invite team members and external users. The agent can set the channel name dynamically using variables from the run context — such as company slug, user ID, or project name — ensuring consistent, identifiable naming across accounts. Created channels can be public or private, and the tool supports both Slack Connect and guest invite flows for external participants. ## Configuration > [card] Inputs > > **Prompt** `string` > > Instructions that guide when the agent should create channels. > > **Slack Team** `string` *required* > > Team/workspace where the channel will be created. > > **Invite Type** `enum` > > Invite flow used for invited users. > **Options:** `slack_connect`, `guest` > > **Channel Name** `string` *required* > > Channel name. Can be set by the builder user or selected by the agent. > > **Channel Private** `boolean` > > Whether to create a private channel. > > **Invite Team Members** `string[]` > > Optional internal teammates to invite. > > **Invite External Users** `string[]` > > Optional external org users to invite. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=create_slack_channel) > [card] Outputs > > **channel\_id** `string` *required* > > The ID of the newly created Slack channel. > > **channel\_name** `string` *required* > > The name of the newly created Slack channel. > > **slack\_team\_id** `string` *required* > > The ID of the Slack workspace where the channel was created. > > **invites\_sent** `number` *required* > > Total count of invitations processed for the channel. > > **invite\_sent\_to\_emails** `string[]` *required* > > Array of email addresses that invitations were sent to. > > **invite\_sent\_to\_org\_user\_ids** `string[]` *required* > > Array of Flywheel user IDs that invitations were sent to. > > **added\_csm\_user\_ids** `string[]` *required* > > Array of CSM user IDs that were added to the channel. > > **invite\_type** `enum` *required* > > The type of invitation that was sent to external users. > **Values:** `slack_connect`, `guest` > > **status** `enum` *required* > > Execution status for the channel creation operation. > **Values:** `success`, `error` ## Use Cases **Enterprise Customer Onboarding** ``` Channel Name: "customer-{{company.slug}}" Channel Private: true Invite Team Members: [assigned_csm, onboarding_specialist] Invite External Users: [customer_admin, customer_technical_lead] Invite Type: slack_connect ``` **Escalation War Room** ``` Channel Name: "escalation-{{ticket.id}}" Channel Private: true Invite Team Members: [support_lead, engineering_oncall, assigned_csm] Invite External Users: [] Purpose: Incident-specific coordination channel for rapid resolution ``` **Renewal & Expansion Planning** ``` Channel Name: "renewal-{{company.slug}}" Channel Private: true Invite Team Members: [assigned_csm, account_executive] Invite External Users: [customer_decision_maker] Invite Type: guest ``` **Partner Integration Project** ``` Channel Name: "integration-{{company.slug}}-{{project.id}}" Channel Private: false Invite Team Members: [solutions_engineer, assigned_csm] Invite External Users: [partner_technical_contact, partner_project_manager] Invite Type: slack_connect ``` ## Best Practices **Channel Naming** * Use consistent naming conventions for easy identification (e.g., `customer-`, `escalation-`, `renewal-` prefixes). * Include relevant identifiers such as company slug, ticket ID, or project name so channels are searchable. * Keep names descriptive but concise — Slack enforces an 80-character limit on channel names. **Privacy & Access Settings** * Use private channels for customer-specific conversations and sensitive topics. * Use public channels for internal coordination where visibility across teams is beneficial. * Match the `Invite Type` to your organization's Slack policy — use `slack_connect` for long-term partnerships and `guest` for time-boxed collaborations. **Initial Setup & Context** * Pair channel creation with a Slack Message tool to post a welcome message explaining the channel's purpose and key contacts. * Include the assigned CSM in every customer-facing channel to ensure accountability from the start. * Set the channel topic or description in the follow-up message to give new members immediate context. **Channel Lifecycle Management** * Archive channels when their purpose is fulfilled (e.g., after onboarding completes or a renewal closes) to keep the workspace clean. * Use the `channel_id` output to link the channel to the account record in Flywheel for tracking and reporting. * Monitor the `status` output to catch creation failures and route them to a fallback notification so channels are not silently skipped. # Send Slack Channel Invites (Agent Tool) Source: https://flywheel.mintlify.app/agents/tools/slack/send-slack-channel-invites Invite internal and external users to an existing Slack channel from an agent run [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=send_slack_channel_invites) ## How Send Slack Channel Invites Works Send Slack invites into an existing channel. This tool is useful when the agent determines the right people should be pulled into a collaboration thread. It supports both internal team members and external customer-side users, allowing the agent to dynamically assemble the right group based on account context, event triggers, or role assignments. Invitations are processed in bulk and the tool reports back how many were successfully sent, making it easy to chain with follow-up messaging or logging actions. ## Configuration > [card] Inputs > > **Prompt** `string` > > Guidance for when this tool should be used during an agent run. > > **Slack Team** `string` *required* > > Target Slack workspace/team. > > **Channel** `string` *required* > > Existing Slack channel to invite users into. > > **Invite Team Members** `string[]` > > Internal team members to invite. > > **Invite External Users** `string[]` > > Customer-side users to invite where applicable. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=send_slack_channel_invites) > [card] Outputs > > **invites\_processed** `number` *required* > > Total number of invite operations executed across internal and external users. > > **channel\_id** `string` *required* > > The Slack channel ID that users were invited to. > > **invited\_user\_ids** `string[]` *required* > > Array of Slack user IDs that were successfully invited to the channel. > > **invited\_emails** `string[]` *required* > > Array of email addresses for external users that invitations were sent to. > > **tool\_status** `enum` *required* > > Overall tool execution result for the run. > **Values:** `success`, `partial`, `error` > > **error\_message** `string` > > Error details when the invite operation fails. Empty on success. ## Use Cases **Shared Channel Activation** ``` Channel: #customer-{{company.slug}} Trigger: Customer requests a shared collaboration channel Invite Team Members: [assigned_csm, solutions_engineer] Invite External Users: [customer_admin, customer_champion] ``` **Onboarding Kickoff** ``` Channel: #onboarding-{{company.slug}} Trigger: New customer onboarding starts Invite Team Members: [assigned_csm, onboarding_specialist] Invite External Users: [customer_technical_lead, customer_admin] ``` **Escalation War Room Staffing** ``` Channel: #escalation-{{ticket.id}} Trigger: Support escalation event detected Invite Team Members: [support_lead, engineering_oncall, assigned_csm] Invite External Users: [] ``` **Renewal Prep Collaboration** ``` Channel: #renewal-{{company.slug}} Trigger: Renewal date within 60 days Invite Team Members: [assigned_csm, account_executive] Invite External Users: [customer_decision_maker] ``` ## Best Practices **Permissions & Access** * Verify that the Slack bot has permission to invite users to the target channel before enabling live agent runs. * Confirm that external guest or Slack Connect invitations are enabled in your Slack workspace admin settings. * Use the `tool_status` output to detect partial failures where some invites succeed and others do not. **Invite Strategy** * Keep invitation lists focused — invite only the people who need to be in the channel to reduce noise. * Use role-based references (e.g., `assigned_csm`, `customer_admin`) rather than hardcoded user IDs for flexibility across accounts. * Combine with the Create Slack Channel tool when both channel creation and invitation need to happen in sequence. **Follow-Up Actions** * Pair invitations with a Slack Message tool to post an introductory message explaining the channel's purpose. * Log the `invites_processed` count and `invited_user_ids` for audit trails and reporting. * Monitor for `error` status and route failures to a fallback notification (e.g., email or internal alert) so invitations are not silently lost. # Slack Message Source: https://flywheel.mintlify.app/agents/tools/slack/slack-message Send Slack messages from an agent run with context-aware content. [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=send_agent_slack_message) ## How Slack Message works Slack Message sends a message to a Slack channel from your agent. The agent can determine content at runtime and pick the target channel when configured to do so. Messages are composed using a rich content payload that supports variables, dynamic text, and structured formatting — allowing the agent to craft contextual notifications without hardcoding copy. This makes Slack Message ideal for real-time alerts, status updates, and cross-functional communication triggered by upstream agent decisions. ## Configuration > [card] Inputs > > **Prompt** `string` > > Instruction for when and how the agent should use this tool. > > **slack\_channel\_id** `string` *required* > > Slack channel destination. > > **slack\_message\_data** `object` *required* > > Slack message payload (content JSON and variables). > > **from\_type** `enum` > > Message sender type in Slack context. > > **from\_id** `string` > > Optional sender identity, depending on workspace setup. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=send_agent_slack_message) > [card] Outputs > > **status** `enum` *required* > > Run outcome for the message send. > **Values:** `success`, `error` > > **channel\_id** `string` *required* > > Destination channel used for delivery. > > **message\_ts** `string` *required* > > Slack timestamp identifier for the posted message. Can be used to thread follow-up replies. > > **slack\_team\_id** `string` *required* > > The ID of the Slack workspace where the message was posted. > > **from\_type** `enum` *required* > > The sender type that was used to post the message. > > **from\_id** `string` > > The sender identity used, if one was configured. > > **error\_message** `string` > > Error details when sending fails. Empty on success. ## Use Cases **Escalation Alert** ``` Channel: #customer-success Trigger: Onboarding risk score exceeds threshold Message: Account summary with risk factors and recommended next steps From: assigned_csm ``` **Sales Assist Notification** ``` Channel: #sales-assist Trigger: Product intent events spike for a tracked account Message: Account activity summary with engagement highlights From: bot ``` **Ops Ticket Reference** ``` Channel: #support-ops Trigger: Agent creates an Intercom ticket Message: Ticket link, priority level, and customer context From: bot ``` **Team Standup Update** ``` Channel: #cs-team Trigger: Daily scheduled agent run Message: Summary of accounts requiring attention with health scores From: assigned_csm ``` ## Best Practices **Message Content** * Use dynamic variables to inject account-specific context (company name, health score, owner) rather than generic text. * Keep messages concise — include a clear subject line and actionable next step so recipients can triage quickly. * Leverage structured formatting (bold, bullet points) to improve readability in busy channels. **Channel Targeting** * Use dedicated channels per function (e.g., `#escalations`, `#sales-assist`) to avoid noise in general channels. * When the agent selects the channel dynamically, constrain choices in the prompt to a known set of channel IDs. * Pair channel selection with the `from_type` setting so messages appear from the right persona in each context. **Error Handling & Reliability** * Monitor the `status` output to detect delivery failures and trigger fallback actions (e.g., email notification). * Validate that the target channel exists and the bot has posting permissions before enabling live runs. * Use `message_ts` to thread follow-up messages and avoid flooding a channel with separate top-level posts. # Assign CSM Source: https://flywheel.mintlify.app/agents/tools/workspace/assign-csm Assign a CSM to a user from an agent run [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=assign_csm) ## How Assign CSM works Use this tool to set user ownership directly from an agent run. The agent can choose the user, the assignee, and whether the assignment is primary. Assignments happen inside the agent flow and can be used as a handoff step after qualification, churn detection, or onboarding milestones. The resulting assignment is persisted on the user record so that downstream tools and future runs can reference the current owner. ## Configuration > [card] Inputs > > **Prompt** `string` > > Guidance that tells the agent when this tool should be used. > > **User to assign** `string` *required* > > Target user that should receive the assignment. > > **Assign to** `string` *required* > > Team member to assign as CSM. > > **Primary CSM** `boolean` (default: true) > > Set to `true` when this assignment should become the primary CSM relationship. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=assign_csm) > [card] Outputs > > **assignment\_success** `boolean` *required* > > Whether the CSM assignment completed successfully. > > **assigned\_csm** `string` *required* > > The team member ID that was assigned as CSM. > > **is\_primary** `boolean` *required* > > Whether this assignment was set as the primary CSM relationship. > > **org\_user\_id** `string` *required* > > The user ID that received the assignment. ## Use Cases **New Enterprise Customer** ``` Assignment Target: User CSM: Senior CSM for enterprise accounts Is Primary: true Use: Ensure high-touch support for enterprise customers from day one ``` **Product Specialist Assignment** ``` Assignment Target: User CSM: Product specialist for advanced features Is Primary: false Use: Add a secondary CSM with domain expertise alongside the primary owner ``` **Tier-Based Assignment** ``` Condition: user.plan = "growth" CSM: Growth team CSM Is Primary: true Use: Route growth-tier customers to a dedicated success team automatically ``` **Risk-Based Reassignment** ``` Condition: churn_risk_score > 80 CSM: Retention specialist Is Primary: false Use: Bring in a retention expert without removing the existing primary CSM ``` ## Best Practices **Assignment Strategy** * Use primary assignments for main customer relationships. * Assign secondary CSMs for specialized support needs like retention or product guidance. * Consider customer tier and complexity when selecting CSMs in the agent prompt. **Workload Management** * Monitor CSM assignment distribution to avoid overloading individual team members. * Consider current workloads when the agent decides between eligible CSMs. * Pair this tool with Round Robin when balanced distribution matters more than specific selection. **Relationship Continuity** * Avoid reassigning primary CSMs on every run; use conditions to trigger reassignment only when meaningful changes occur. * Persist assignment context with Set Custom Property so future agent runs can reference the current owner. * Log assignment changes with clear conditions so the team understands why ownership shifted. # Round Robin Source: https://flywheel.mintlify.app/agents/tools/workspace/round-robin Distribute ownership across team members in a balanced sequence [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=round_robin) ## How Round Robin Works Round Robin rotates assignment across selected teammates so no single owner receives all inbound work. In agents, this is useful when the model should decide when to hand off while the distribution itself stays fair and predictable. The tool tracks rotation state internally, ensuring each eligible team member is assigned in sequence before the cycle resets. ## Configuration > [card] Inputs > > **Prompt** `string` *required* > > Instructions that tell the agent when to use round robin. > > **Team member options** `object` *required* > > The pool of users eligible for assignment. The agent can choose dynamically depending on context. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=round_robin) > [card] Outputs > > **assigned\_user\_id** `string` *required* > > The selected teammate ID for this assignment decision. > > **assignment\_index** `number` > > The position used in the rotation cycle for the selected user. > > **assignment\_success** `boolean` *required* > > Whether the round robin assignment completed successfully. > > **pool\_size** `number` > > Total number of eligible team members in the current rotation pool. ## Use Cases **Inbound Lead Distribution** ``` Condition: High-intent trial event with no existing owner Action: Round robin assignment to onboarding specialists Outcome: New leads are distributed evenly across the team ``` **Support Escalation Routing** ``` Condition: Support escalation detected by the agent Action: Round robin assignment to on-call CSM queue Outcome: Urgent work is balanced while preserving response speed ``` **New Account Onboarding** ``` Condition: Account created with no assigned CSM Action: Round robin across onboarding team Outcome: Every new customer gets a dedicated owner without manual triage ``` **Regional Team Assignment** ``` Condition: User timezone falls within EMEA business hours Action: Round robin among EMEA-based team members Outcome: Customers are matched with regionally appropriate owners ``` ## Best Practices **Pool Management** * Include only active teammates in the rotation pool. * Remove unavailable or out-of-office users to avoid failed handoffs. * Review the pool periodically to reflect team changes and new hires. **Integration with Other Tools** * Persist the selected owner in a user property with Set Custom Property so downstream tools and future runs can reference it. * Pair with Assign CSM when you need to formalize the round robin result as a primary or secondary CSM relationship. * Avoid re-assigning in every run unless your process requires it — check for an existing owner first. **Fair Distribution** * Keep pools focused by role or region rather than mixing all team members into one large rotation. * Monitor assignment counts to verify the rotation is balanced over time. * Use the `assignment_index` output to audit rotation fairness in reporting dashboards. # Set Custom Property Source: https://flywheel.mintlify.app/agents/tools/workspace/set-custom-property Set or update a user custom property from an agent run. [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=set_org_user_custom_property) ## How Set Custom Property works Use this tool to write a value to a Flywheel user custom property during an agent run. This is useful when the agent determines something you want to persist, such as qualification status, risk level, lifecycle stage, or routing tags. The property update is applied immediately, making the new value available to downstream tools in the same run and to any future agent runs or segments that reference it. ## Configuration > [card] Inputs > > **Prompt** `string` *required* > > Instructions describing when this tool should be used. > > **User** `string` *required* > > The target org user ID to update. > > **Custom Property** `string` *required* > > The custom property definition to update. > > **Value** `string | number | boolean | object` *required* > > The value to set. Type should match the selected custom property. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=set_org_user_custom_property) > [card] Outputs > > **success** `boolean` *required* > > Whether the update completed successfully. > > **org\_user\_id** `string` *required* > > The user ID whose property was updated. > > **property\_name** `string` *required* > > The name of the custom property that was set. > > **previous\_value** `string | number | boolean | object` > > The value the property held before this update, if any. > > **new\_value** `string | number | boolean | object` *required* > > The value that was written to the property. ## Use Cases **Health Score Tagging** ``` Condition: Trial user missing key activation events Property: customer_health Value: "at_risk" Use: Flag users for proactive retention outreach ``` **Lifecycle Stage Progression** ``` Condition: Onboarding milestones completed Property: lifecycle_stage Value: "activated" Use: Move user to the activated segment for upsell workflows ``` **Lead Qualification** ``` Condition: Agent completes qualification flow Property: lead_score_bucket Value: "high" Use: Route high-intent leads to sales-assist agents or CSMs ``` **Routing Tag Assignment** ``` Condition: User matched to a specific product vertical Property: routing_tag Value: "enterprise_data" Use: Ensure future agent runs and messages are tailored to the user's vertical ``` ## Best Practices **Property Design** * Keep property definitions stable and strongly typed to avoid schema drift. * Use clear, descriptive naming conventions so downstream reporting is easy to interpret. * Define an expected set of values (e.g. enum-like strings) for properties used in segmentation. **Write Discipline** * Have the agent write derived values intentionally — not on every run unless a re-evaluation is required. * Use conditions in the agent prompt to gate writes (e.g. only set `customer_health` when the score actually changes). * Pair property updates with Find Event to base the written value on real activity data. **Downstream Integration** * Reference updated properties in subsequent tool calls within the same run for consistent decision-making. * Use custom properties as segment criteria to trigger other workflows or broadcasts. * Audit property change history to understand how agent-driven updates affect user journeys. # Drop-off Trigger Source: https://flywheel.mintlify.app/agents/triggers/drop-off-trigger Start an agent run when users fail to complete expected actions within a specified timeframe [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=drop_off) ## How Drop-off Triggers Work 1. **Monitor Events**: The system tracks when users perform the initial event 2. **Set Expectations**: You define what actions users should take next 3. **Wait and Watch**: The system waits for the expected follow-up events 4. **Trigger on Absence**: If expected events don't occur within your timeframe, the agent run starts Unlike workflow drop-off triggers which follow a fixed recovery path, agent drop-off triggers pass the full drop-off context to the language model. The agent can then reason about why the user may have dropped off, check additional data with tools like Find Event, and take contextually appropriate action. ## Configuration > [card] Inputs > > **Initial Events** `string[]` *required* > > Select one or more events that start the drop-off monitoring. Examples: `trial_started`, `cart_created`, `signup_initiated`. > > **Expected Events** `object[]` *required* > > Configure the events you expect users to complete after the initial event. > > **Event Name** `string` *required* > > The specific event you expect users to complete (part of Expected Events configuration). > > **Delay Value** `number` *required* > > How long to wait before considering it a drop-off (number value). > > **Delay Unit** `enum` *required* > > Time unit for the delay. Options: `seconds`, `minutes`, `hours`, `days`, `weeks`, `months`. > > **Sort Order** `number` > > Priority order for multiple drop-off events. Lower numbers have higher priority. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=drop_off) > [card] Outputs > > **event** `object` *required* > > The drop-off event data generated by Flywheel when the expected event didn't occur. > > **Event Properties** > > **event.event\_id** `string` *required* > > Unique identifier for this drop-off event. > > **event.event\_name** `literal` *required* > > Always `$fw_drop_off` for drop-off events. > > **event.timestamp** `string` *required* > > ISO datetime when the drop-off was detected. > > **event.custom\_properties** `object` *required* > > Contains drop-off specific data and system properties. > > **event.custom\_properties.\$fw\_event\_source** `literal` *required* > > Always `flywheel` for system-generated events. > > **event.custom\_properties.\$fw\_user\_id** `string` *required* > > Internal user identifier. > > **event.custom\_properties.last\_completed\_event\_name** `string` *required* > > Name of the last event the user completed that triggered the drop-off monitoring. > > **event.custom\_properties.last\_completed\_event** `object` *required* > > Full details of the original event that started the drop-off monitoring, including all event properties and custom data. > > **org\_user** `object` *required* > > Comprehensive user information for the user who dropped off. > > **User Properties** > > **org\_user.id** `string` *required* > > Unique user identifier. > > **org\_user.org\_assigned\_user\_id** `string` > > Your company's external user identifier. > > **org\_user.primary\_email** `string` > > User's primary email address. > > **org\_user.first\_name** `string` > > User's first name. > > **org\_user.last\_name** `string` > > User's last name. > > **org\_user.subscription\_status** `enum` > > Current subscription status: `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, `paused`, `inactive`. > > **org\_user.payment\_processor** `enum` > > Payment processor used: `stripe` or `paddle`. > > **org\_user.mrr** `number` > > Monthly recurring revenue from this user. > > **org\_user.ltv** `number` > > Lifetime value of the user. > > **org\_user.first\_payment\_date** `string` > > ISO datetime of user's first payment. > > **org\_user.next\_payment\_date** `string` > > ISO datetime of user's next scheduled payment. > > **org\_user.cancels\_at** `string` > > ISO datetime when subscription will be cancelled (if applicable). > > **org\_user.contact\_info** `object` > > Additional contact information and preferences. > > **org\_user.custom\_properties** `object` > > Custom user properties you've defined. > [!NOTE] > > The system creates drop-off events with the name `$fw_drop_off` for all drop-off triggers. ## Use Cases **Trial Conversion Recovery** ``` Initial Event: trial_started Expected Event: subscription_created Drop-off Delay: 7 days Agent behavior: Check usage patterns, assess activation status, send personalized conversion email or assign to sales ``` **Cart Abandonment Rescue** ``` Initial Event: cart_created Expected Event: purchase_completed Drop-off Delay: 2 hours Agent behavior: Analyze cart contents, check for prior purchases, send targeted recovery message via Smart Message ``` **Onboarding Completion** ``` Initial Event: account_created Expected Events: - profile_completed (24 hours) - first_project_created (3 days) - team_invited (7 days) Agent behavior: Identify which step stalled, search for related events, send step-specific guidance or escalate to CSM ``` **Feature Adoption Push** ``` Initial Event: feature_introduced Expected Event: feature_activated Drop-off Delay: 5 days Agent behavior: Check user tier and usage history, generate contextual tips email, set custom property for follow-up tracking ``` ## Best Practices **Choose Appropriate Timeframes** * Consider your typical user behavior patterns when setting delays * Account for different user segments — some may need more time * Start with longer delays and optimize based on data from the Runs tab **Segment Your Audiences** * Use trigger conditions to create different drop-off flows for different user types * Consider factors like subscription tier, user role, or geographic location * Let the agent prompt handle nuanced segmentation logic **Monitor and Adjust** * Track which drop-off triggers are most effective in the Runs tab * Review agent reasoning to ensure it's making appropriate recovery decisions * Adjust timing and prompt instructions based on actual conversion data * A/B test different delay periods and agent strategies # New Event Trigger Source: https://flywheel.mintlify.app/agents/triggers/new-event-trigger Start an agent run when a specific user event occurs in your application [Agent Node Preview](http://localhost:3000/doc-comp-previews/agent-node-preview?type=new_event) ## How New Event Trigger Works When a user performs an action that matches your trigger configuration, the agent immediately starts a run for that user. New Event triggers respond to specific user actions or events that occur in your application and are ideal for real-time, context-aware responses to user behavior. Unlike workflow event triggers which follow a fixed action sequence, agent event triggers pass the full event and user context to the language model, which then reasons about what tools to call and how to act. ## Configuration > [card] Inputs > > **Trigger Event** `string` *required* > > Select the specific event name that should start an agent run. Examples: `user_signed_up`, `subscription_created`, `purchase_completed`, `trial_started`. > [card] > > [Agent Config Preview](http://localhost:3000/doc-comp-previews/agent-config-preview?type=new_event) > [card] Outputs > > **event** `object` *required* > > The complete event data that triggered the agent run. > > **Event Properties** > > **event.id** `string` *required* > > Unique database identifier for this event. > > **event.event\_id** `string` *required* > > Unique external identifier for this event. > > **event.event\_name** `string` *required* > > The name of the event that triggered the run. > > **event.timestamp** `string` *required* > > ISO datetime when the event occurred. > > **event.created\_at** `string` *required* > > ISO datetime when the event was created in the system. > > **event.org\_user\_id** `string` *required* > > Internal Flywheel user identifier associated with the event. > > **event.org\_assigned\_user\_id** `string` > > Your company's external user identifier, if available. > > **event.org\_id** `number` *required* > > Organization identifier. > > **event.anonymous\_id** `string` > > Anonymous identifier for the user, if available. > > **event.event\_source** `string` > > The source of the event (e.g., web, mobile, API). > > **event.event\_location** `string` > > The location where the event occurred, if available. > > **event.event\_type** `enum` > > The type of event: `track` or `identify`. > > **event.schema\_id** `string` > > Schema identifier for the event structure, if applicable. > > **event.custom\_properties** `object` *required* > > Contains all event-specific data and custom properties specific to your application and event type. > > **org\_user** `object` *required* > > Comprehensive user information for the user who triggered the event. > > **User Properties** > > **org\_user.id** `string` *required* > > Unique user identifier. > > **org\_user.org\_id** `number` *required* > > Organization identifier. > > **org\_user.org\_assigned\_user\_id** `string` > > Your company's external user identifier. > > **org\_user.primary\_email** `string` > > User's primary email address. > > **org\_user.primary\_phone** `string` > > User's primary phone number. > > **org\_user.first\_name** `string` > > User's first name. > > **org\_user.last\_name** `string` > > User's last name. > > **org\_user.created\_at** `string` *required* > > ISO datetime when the user was created. > > **org\_user.updated\_at** `string` *required* > > ISO datetime when the user was last updated. > > **org\_user.subscription\_status** `enum` *required* > > Current subscription status: `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, `paused`, `inactive`. > > **org\_user.payment\_processor** `enum` *required* > > Payment processor used: `stripe` or `paddle`. > > **org\_user.mrr** `number` > > Monthly recurring revenue from this user. > > **org\_user.ltv** `number` > > Lifetime value of the user. > > **org\_user.first\_payment\_date** `string` > > ISO datetime of user's first payment. > > **org\_user.next\_payment\_date** `string` > > ISO datetime of user's next scheduled payment. > > **org\_user.cancels\_at** `string` > > ISO datetime when subscription will be cancelled (if applicable). > > **org\_user.primary\_contact\_method** `string` > > User's preferred contact method. > > **org\_user.contact\_info** `object` *required* > > Additional contact information and preferences. > > **org\_user.csm** `object` *required* > > Customer Success Manager information assigned to this user. > > **org\_user.custom\_properties** `object` *required* > > Custom user properties you've defined. ## Use Cases **New User Onboarding** ``` Event: user_signed_up Agent behavior: Evaluate user profile, check account fit, send personalized onboarding guidance, assign CSM if enterprise tier ``` **Trial Conversion Outreach** ``` Event: trial_started Agent behavior: Check activation milestones, search for prior engagement, send contextual onboarding email or Slack message ``` **High-Value Purchase Follow-up** ``` Event: purchase_completed Agent behavior: Analyze purchase context, generate personalized thank-you email, notify account owner via Slack ``` **Churn Risk Response** ``` Event: subscription_canceled Agent behavior: Gather cancellation context, check usage patterns via Find Event, create Intercom ticket for retention team ``` ## Best Practices **Choose Stable Event Names** * Use consistent, predictable event names that match your tracking plan * Ensure required event properties exist if your tools or prompt rely on them * Test with realistic payloads before enabling Live mode **Consider Event Frequency** * Some events may fire multiple times for the same user * Use your agent prompt to describe how to handle duplicate or repeated events * Consider whether the agent should check for recent runs before acting **Monitor Performance** * Track trigger activation rates and run completion in the Runs tab * Review agent reasoning and tool selection for quality * Iterate on prompts based on real run data # Broadcasts API Source: https://flywheel.mintlify.app/api-reference/broadcasts Draft, preview and schedule email and text broadcasts — every one planned first, and scheduled at least an hour ahead ## Overview A broadcast is one email (or, for a webinar session, one text) sent once to an audience: everyone with an email address, a saved segment, or a webinar session's registrants. Broadcasts are **scheduled** through the API, never sent immediately, and committing one takes two calls: 1. **Plan** — `POST /v1/broadcasts/{broadcast_id}/plan` with a `send_at` shows exactly what would happen: how many people it reaches, when it goes out, who it is from, the body as one real recipient receives it, and every check that would stop or surprise the send. When nothing blocks, it returns a `plan_token`. 2. **Schedule** — `POST /v1/broadcasts/{broadcast_id}/schedule` with that `plan_token` commits the plan. If anything the plan covered has changed since (content, variables, sender, audience, a segment's filters, timing), the plan is over an hour old, or the send time is now less than an hour away, it is refused and you plan again. A broadcast always goes out **at least an hour after it is scheduled**, and until then it can be pulled back — with `POST /v1/broadcasts/{broadcast_id}/unschedule`, or **Unschedule** on the broadcast in the dashboard. Everything before `/schedule` is safe to call freely; drafts and plans reach no one. > [!TIP] > > The same operations are MCP tools on `https://api.flywheel.cx/mcp`: `create_broadcast`, `update_broadcast`, `list_broadcast_variables`, `plan_broadcast`, `schedule_broadcast`, `unschedule_broadcast`, `get_broadcast_stats` and `list_senders`. ## Authentication ``` Authorization: YOUR_API_KEY Auth-Type: api ``` API keys are managed in the dashboard under **Settings → API Keys**. Every broadcast, segment, sender and webinar is resolved inside the organization the key belongs to. ## Variables Broadcasts use Flywheel's variable system — the same one the dashboard editor saves and workflow messages use. The body holds `{{var_}}` placeholders, and `variables` says what fills each one: ```json theme={null} { "html": "

Hi {{var_first}},

Your plan: {{var_plan}}.

", "variables": { "var_first": { "variable": "{{context.root_context.org_user.first_name}}", "fallback": "there" }, "var_plan": { "variable": "{{context.root_context.org_user.custom_properties.plan_name}}", "fallback": "your plan" } } } ``` | Field | Default | Description | | - | - | - | | `variable` | required | What to read — a path from `GET /v1/broadcasts/variables` | | `fallback` | `""` | Used when the person has no value | | `template` | `"{{var}}"` | Text around the value, e.g. `"your {{var}} plan"` | | `date_format` | none | For dates: a date-fns pattern such as `"MMM d"`, or `relative-short` / `relative-today` | | `text_format` | set for name fields | `"name"` repairs the casing of self-typed names | `GET /v1/broadcasts/variables` lists what variables can read: the recipient's fields, your organization's custom properties (by key), and — on a broadcast tied to a webinar — the session: `webinar_title`, `webinar_start_time`, `join_url` (the recipient's personal link) and add-to-calendar links. Where placeholders can go, matching what the dashboard editor keeps when someone edits the broadcast there: * **Email text:** `{{var_}}`. * **A link:** the whole `href` is a `{{link_var_}}` whose `variable` is exactly one path — `Join`. A linked image is an `` around the ``. * **Texts:** `{{var_}}` anywhere; texts are plain, so put a URL variable in the text. Placeholders without a definition, variables whose path does not resolve, template syntax that is not a variable, and variables in the subject or preview text (which are sent as written) are refused rather than sent blank. So are scripts, forms, inline event handlers and `javascript:` links. Variables the body does not use are dropped. ## Create a Broadcast `POST /v1/broadcasts` ```javascript theme={null} const response = await fetch('https://api.flywheel.cx/v1/broadcasts', { method: 'POST', headers: { 'Authorization': 'YOUR_API_KEY', 'Auth-Type': 'api', 'Content-Type': 'application/json' }, body: JSON.stringify({ audience: 'segment', segment_id: '7c0e5a3e-…', subject: 'Your October product update', preview_text: 'Three things we shipped this month', sender_id: 'b1f2…', // from GET /v1/senders html: '

Hi {{var_first}},

Here is what shipped…

', variables: { var_first: { variable: '{{context.root_context.org_user.first_name}}', fallback: 'there' } } }) }); const { broadcast, created } = await response.json(); ``` | Field | Type | Required | Description | | - | - | - | - | | `broadcast_id` | string | No | Your own v4 UUID. Makes the call safe to retry: the same id returns the draft already created (`created: false`) | | `channel` | string | No | `email` (default) or `sms`. Text broadcasts go to a webinar session's registrants only | | `audience` | string | Yes | `everyone` (every person with an email address), `segment`, or `webinar` | | `segment_id` | string | With `segment` | A segment of your organization | | `webinar_id` | string | With `webinar` | A webinar session of your organization | | `webinar_audience` | string | No | Webinar only: `registered` (default), `attended` or `no_show` | | `webinar_offset_minutes` | number | No | Webinar only: time the broadcast from the session — minutes before the anchor, negative for after. `60` = an hour before the start | | `webinar_anchor` | string | No | Webinar only: `start` (default) or `end` of the session | | `subject` | string | To schedule | Email subject, sent exactly as written | | `preview_text` | string | No | Email inbox preview line | | `html` | string | To schedule | Email body with `{{var_…}}` placeholders | | `message_body` | string | To schedule | Text broadcasts: the message, with `{{var_…}}` placeholders | | `variables` | object | With placeholders | What fills each placeholder — see [Variables](#variables) | | `sender_id` | string | To schedule | Email: who it is from, from `GET /v1/senders` | | `send_style` | string | No | Email: `designed` (default) or `plain` | Keep the email HTML to what the dashboard editor can reopen — `p`, `h1`–`h3`, `strong`, `em`, `a`, `ul`/`ol`/`li`, `img`, `hr`, `br` — since your organization's email layout (logo, footer, unsubscribe link) wraps it at send. `send_style: "plain"` sends the email the way a person types one in Gmail instead: the words as written in a text part and a minimal HTML part, no layout, no images (refused), no preview text, links exactly as written, no open or click tracking, and one plain line with your organization's address and unsubscribe link. Its stats return `opened` and `clicked` as `null` (not tracked), and `totals.replied` counts the emails someone answered when the sending domain receives its mail through Mailgun. A reply is counted only when it comes back to the address the email was sent from, as a Plain email's does from such a domain; one that goes to the sender's separate reply-to address (a Designed email's, when the sender has one) never reaches Flywheel and isn't counted. The broadcast's `content_checks` say what Plain changes in the body, and the plan refuses a Plain email from a domain that sends through Resend with open tracking on. A broadcast created here appears in the dashboard's Broadcasts list and opens in its editor like any other. ## Plan `POST /v1/broadcasts/{broadcast_id}/plan` ```javascript theme={null} const plan = await fetch(`https://api.flywheel.cx/v1/broadcasts/${id}/plan`, { method: 'POST', headers: { 'Authorization': 'YOUR_API_KEY', 'Auth-Type': 'api', 'Content-Type': 'application/json' }, body: JSON.stringify({ send_at: '2026-10-06T15:00:00-04:00' }) // at least an hour from now }).then((r) => r.json()); ``` ```json theme={null} { "broadcast_id": "…", "ready": true, "plan_token": "bpt1.1790000000.at1790622000.4c1d…", "expires_at": "2026-10-01T13:00:00.000Z", "channel": "email", "delivery": { "send_at": "2026-10-06T19:00:00.000Z", "paced_over_hours": 3 }, "audience": { "kind": "segment", "segment_name": "Active customers", "recipients": 1284, "note": "…" }, "sender": { "id": "…", "from": "Jaen ", "reply_to": "hi@acme.com" }, "preview": { "person_id": "…", "subject": "Your October product update", "body": "

Hi Ada,

…" }, "checks": [] } ``` * `send_at` must be at least an hour from now (and at most a year). A webinar broadcast timed from its session (`webinar_offset_minutes`) plans for that time instead and takes no `send_at`. * `recipients` is counted the way the sender counts, now; the audience is resolved again when it sends, and people who opted out, bounced or complained are skipped then. * `delivery.paced_over_hours`: sends to a list are spread over three hours from `send_at`; webinar broadcasts go out at once. * `checks` with `level: "error"` block scheduling (no `plan_token` is issued) — for example `send_at_required`, `send_at_too_soon`, `subject_missing`, `sender_missing`, `sender_domain_unverified`, `variable_missing`, `webinar_canceled`, `allowance_used_up`. `warning` checks don't block but are worth reading: `everyone` (the broadcast goes to your whole list), `no_recipients_yet`, `allowance_short`, `variable_unresolvable`, `gmail_clipping`, `sent_before`. Planning writes nothing. ## Schedule `POST /v1/broadcasts/{broadcast_id}/schedule` ```json theme={null} { "plan_token": "bpt1.1790000000.at1790622000.4c1d…" } ``` ```json theme={null} { "broadcast": { "id": "…", "status": "scheduled", "timing": { "send_at": "2026-10-06T19:00:00.000Z", … }, … }, "delivery": { "send_at": "2026-10-06T19:00:00.000Z", "paced_over_hours": 3 }, "message": "Scheduled for 2026-10-06T19:00:00.000Z, spread over 3 hours from then. Until then it can be pulled back: unschedule_broadcast, or Unschedule on the broadcast in the dashboard." } ``` It returns `409` if the broadcast changed since it was planned or the plan expired — plan again — and `400` if something now blocks it, including a send time that is less than an hour away. ## Unschedule `POST /v1/broadcasts/{broadcast_id}/unschedule` Takes a scheduled broadcast back to `draft`, up to the moment it starts sending. Refused once sending has begun. ## Read, Edit and Delete | Endpoint | | | - | - | | `GET /v1/broadcasts` | List, newest first. Filters: `status` (`draft`, `scheduled`, `sending`, `sent`, `stopped`, `error`), `channel`, `webinar_id`; paging with `limit` (max 200) and `offset` | | `GET /v1/broadcasts/{broadcast_id}` | One broadcast, with its body and variables | | `PATCH /v1/broadcasts/{broadcast_id}` | Change a draft. Omitted fields stay; `null` clears `preview_text`, `sender_id` or `webinar_offset_minutes`. A new `html` / `message_body` replaces the whole body; `variables` replaces the whole map; the body and its variables are checked together. A scheduled broadcast has to be unscheduled first | | `DELETE /v1/broadcasts/{broadcast_id}` | Delete a broadcast nobody has received any of | | `GET /v1/broadcasts/variables` | What a body's variables can read | | `GET /v1/broadcasts/{broadcast_id}/stats` | Sent / opened / clicked totals and per day, how many emails drew a reply, where every recipient ended up, and why skipped ones were skipped | | `GET /v1/senders` | The email senders a broadcast can use (`ready` when the sending domain is verified), and whether your organization has an SMS number for text broadcasts | > [!NOTE] > > Any change to a broadcast invalidates an earlier plan. Plan again after editing, and review it before scheduling. # Events API Source: https://flywheel.mintlify.app/api-reference/events Track user events to build comprehensive user profiles and trigger automated workflows ## Overview The Flywheel Events API allows you to track user actions, behaviors, and interactions with your product. Events are the foundation for building comprehensive user profiles and triggering automated workflows in Flywheel. Events represent any meaningful user action you want to track and analyze, such as: * User signups and registrations * Product purchases and transactions * Page views and navigation * Feature usage and engagement * Profile updates and changes ## Authentication All events endpoints require authentication using an API key and authentication type header. Include both headers in your requests: ``` Authorization: YOUR_API_KEY Auth-Type: api ``` Both headers are required for all API requests. ## User Identification ### The `identify` Parameter The `identify` parameter is a powerful boolean flag that controls whether user identification and profile updates occur before the event is processed. When set to `true`, Flywheel will: 1. **Extract User Data**: Pull identifiable information from the event properties 2. **Find or Create User**: Locate existing users or create new profiles 3. **Update Profile**: Merge new information with existing user data 4. **Link Event**: Associate the event with the identified user #### When to Use `identify: true` Use the identify parameter when your event contains user profile information that should update the user's record. Custom properties must be placed within a `$set` object: ```javascript theme={null} { "event": { "event": "profile_updated", "user_id": "user123", "identify": true, "properties": { "email": "john.doe@company.com", "first_name": "John", "last_name": "Doe", "phone": "+1-555-0123", "$set": { "company": "Tech Corp", "job_title": "Engineering Manager" } } } } ``` > [!NOTE] > > Standard user properties (email, first\_name, last\_name, phone, etc.) are extracted from the root level of `properties`. Custom properties are only extracted from the `$set` object. Properties outside `$set` that aren't standard user properties will not be added as custom properties. #### Identifiable Properties When `identify: true` is set, Flywheel extracts these properties from the event data to update user profiles: * **email**: User's email address * **first\_name**: User's first name * **last\_name**: User's last name * **full\_name**: Full name (automatically split into first/last) * **phone**: Phone number * **primary\_email**: Primary email address * **primary\_phone**: Primary phone number * **stripe\_customer\_id**: Stripe customer identifier #### User Lookup Priority Flywheel uses this priority order to find existing users: 1. **Direct user ID** (`user_id` parameter) 2. **Organization assigned user ID** (`org_assigned_user_id`) 3. **Identifiable properties** in order: * `stripe_customer_id` * `email` * `anonymous_id` * `primary_email` * `primary_phone` * `phone` #### Examples with `identify` **User Registration with Profile Data** ```javascript theme={null} { "event": { "event": "user_registered", "user_id": "new_user_123", "identify": true, "properties": { "email": "jane@startup.com", "first_name": "Jane", "last_name": "Smith", "$set": { "company": "Startup Inc", "plan": "premium", "source": "website" } } } } ``` **Profile Update Event** ```javascript theme={null} { "event": { "event": "profile_updated", "user_id": "existing_user_456", "identify": true, "properties": { "phone": "+1-555-9876", "$set": { "job_title": "Senior Developer", "company_size": "50-100" } } } } ``` **Anonymous to Identified User** ```javascript theme={null} { "event": { "event": "user_converted", "anonymous_id": "anon_789", "identify": true, "properties": { "email": "convert@example.com", "first_name": "Alex", "$set": { "conversion_source": "trial_signup" } } } } ``` #### Performance Considerations * **Use sparingly**: Only set `identify: true` when you need to update user profiles * **Batch updates**: Consider batching profile updates rather than identifying on every event * **Profile-specific events**: Best used for events that inherently involve profile changes ## Event Properties Event properties can include any additional data relevant to the event: ### Supported Property Types * **String**: Text values, names, IDs * **Number**: Prices, quantities, scores, durations * **Boolean**: True/false flags * **DateTime**: ISO 8601 formatted timestamps ### Property Examples ```javascript theme={null} { "properties": { // String properties "product_name": "Premium Plan", "user_type": "enterprise", "source": "organic_search", // Number properties "price": 99.99, "quantity": 3, "session_duration": 1800, // Boolean properties "is_trial_user": true, "email_verified": false, "has_mobile_app": true, // DateTime properties "trial_end_date": "2024-02-15T00:00:00Z", "last_login": "2024-01-15T10:30:00Z" } } ``` ## Anonymous Events You can track events for users who haven't been identified yet using the `anonymous_id` parameter: ```javascript theme={null} { "event": { "event": "page_viewed", "anonymous_id": "anon_789", "properties": { "page": "/pricing", "referrer": "https://google.com", "device_type": "mobile" } } } ``` Anonymous events can later be linked to identified users when they sign up or log in. ## Endpoints The following endpoint is available with interactive API playground for testing: > [card] [Track User Event](/api-reference/events/track-user-event) > > Track user events to build comprehensive profiles and trigger automated workflows ## Event Processing All events are processed through Flywheel's event pipeline which: 1. **Validates** the event data against your schema (if configured) 2. **Identifies** the user (if `identify: true` is set) 3. **Stores** the event in your organization's database 4. **Triggers** any configured workflows and automations 5. **Updates** user profiles and segments in real-time ## Best Practices ### Event Naming * Use descriptive, consistent names: `user_signup`, `product_purchased`, `trial_started` * Use snake\_case for event names * Be specific but not overly verbose * Group related events with common prefixes: `checkout_started`, `checkout_completed` ### Properties * Include relevant context in properties * Use consistent property names across events * Avoid nested objects when possible * Include timestamps for time-sensitive data ### Performance * Batch events when possible for high-volume applications * Use `identify: true` sparingly to avoid unnecessary processing * Consider using anonymous tracking for non-critical events ## Rate Limits Events endpoints are subject to rate limiting to ensure fair usage and service reliability. Contact support if you need higher limits for your use case. # Track User Event Source: https://flywheel.mintlify.app/api-reference/events/track-user-event /api-reference/openapi.json post /v1/events Track a user event to build comprehensive user profiles and trigger automated workflows. Events represent user actions, behaviors, and interactions with your product that you want to track and analyze. # Transactional Email API Source: https://flywheel.mintlify.app/api-reference/transactional-email Send transactional emails using custom HTML or pre-built templates ## Overview The Flywheel Transactional Email API allows you to send emails programmatically to your users. There are two main ways to send transactional emails: 1. **Custom emails** - Send emails with custom HTML content, text, and full control over email properties 2. **Template emails** - Send emails using pre-built templates with dynamic variables ## Authentication All transactional email endpoints require authentication using an API key and authentication type header. Include both headers in your requests: ``` Authorization: YOUR_API_KEY Auth-Type: api ``` Both headers are required for all API requests. ## Endpoints The following endpoints are available with interactive API playground for testing: > [card] [Send Custom Email](/POST/v1/transactional/custom) > > Send emails with custom HTML content and full control over email properties > [card] [Send Template Email](/POST/v1/transactional/template) > > Send emails using pre-built templates with dynamic variables ## Interactive API Playground All endpoints include an interactive playground where you can test API calls directly from the documentation. The playground includes: * **Live testing**: Send real API requests with your authentication token * **Code examples**: Auto-generated code snippets in multiple languages (cURL, JavaScript, Python, PHP) * **Request/Response validation**: Real-time validation of request parameters and response formats * **Authentication testing**: Test with your actual API credentials in a secure environment ## Email Delivery All emails are sent through our reliable email infrastructure powered by Resend. You'll receive an email ID in the response that you can use to track delivery status. ## Rate Limits Transactional email endpoints are subject to rate limiting to ensure fair usage and service reliability. Contact support if you need higher limits for your use case. ## Support For questions about the Transactional Email API, contact our support team at [support@flywheel.cx](mailto:support@flywheel.cx). # Send Custom Transactional Email Source: https://flywheel.mintlify.app/api-reference/transactional-email/send-custom-transactional-email /api-reference/openapi.json post /v1/transactional/custom Send a custom transactional email with full control over HTML content, text, attachments, and email properties. This endpoint allows you to send emails with custom HTML or text content without using pre-built templates. # Send Transactional Email Template Source: https://flywheel.mintlify.app/api-reference/transactional-email/send-transactional-email-template /api-reference/openapi.json post /v1/transactional/template Send a transactional email using a pre-built template. Templates are created in the Flywheel dashboard and can include dynamic variables that are populated at send time. # Webinars API Source: https://flywheel.mintlify.app/api-reference/webinars Create webinars, register attendees, and drive reminder + follow-up workflows ## Overview The Webinars API lets you run your entire webinar communication flow through Flywheel: 1. **Create a webinar** (or create it in the dashboard) and link it to a workflow 2. **Register people** as they sign up — registrants don't need to exist in Flywheel first; profiles are created or matched automatically 3. Flywheel **enrolls each registrant** into every live workflow with a matching **Webinar Registration** trigger (reminder emails/SMS anchored to the start time, etc.) 4. **Report attendance** during or after the webinar so **Webinar Attendance Split** nodes can branch attendees vs no-shows for follow-up 5. **Reschedule** if the date moves — all pending anchored reminders automatically recompute to the new time ## Authentication All webinar endpoints require authentication using an API key and authentication type header. Include both headers in your requests: ``` Authorization: YOUR_API_KEY Auth-Type: api ``` API keys are managed in the Flywheel dashboard under **Settings → API Keys**. All webinar objects are scoped to the organization the API key belongs to. ## Create a Webinar `POST /v1/webinars` ```javascript theme={null} const response = await fetch('https://api.flywheel.cx/v1/webinars', { method: 'POST', headers: { 'Authorization': 'YOUR_API_KEY', 'Auth-Type': 'api', 'Content-Type': 'application/json' }, body: JSON.stringify({ webinar: { title: 'Onboarding Masterclass', start_time: '2026-09-01T17:00:00Z', timezone: 'America/New_York', duration_minutes: 60, join_url: 'https://zoom.us/j/123456789', provider: 'zoom', automation_id: 'a3a9c0de-...' // optional: workflow to associate } }) }); const { webinar } = await response.json(); // webinar.id → use this for registrations ``` | Field | Type | Required | Description | | - | - | - | - | | `id` | string | No | Your own v4 UUID for the webinar. Makes the call safe to retry: the same `id` returns the webinar already created instead of a second one | | `title` | string | Yes | Webinar title | | `start_time` | string | Yes | ISO 8601 datetime with timezone offset | | `timezone` | string | No | IANA timezone, e.g. `America/New_York` | | `duration_minutes` | number | No | Length of the webinar | | `join_url` | string | No | Link attendees use to join | | `provider` | string | No | Platform label, e.g. `zoom`, `livestorm`. A label only — to connect Demio or WebinarJam, link the webinar (see below) | | `status` | string | No | `draft` or `scheduled` (defaults to `scheduled`) | | `automation_id` | string | No | A workflow of your organization to associate with this webinar | > [!NOTE] > > Webinars can also be created in the dashboard under **Webinars**. Either way they start as `scheduled` unless you pass `draft`. ## Register a User `POST /v1/webinars/{webinar_id}/registrants` The core endpoint. Pass whatever your signup form collected as `person` — **they do not need to be an existing Flywheel user**. Flywheel matches them to an existing profile by `external_user_id`, `email`, `phone` or `anonymous_id`, or creates a new one. Send `ad_source` and the pixel's `visitor_id` too and the registration carries its attribution. ```javascript theme={null} const response = await fetch('https://api.flywheel.cx/v1/webinars/0d4f6f36-2b6a-4c1e-9a6f-1f2d3c4b5a69/registrants', { method: 'POST', headers: { 'Authorization': 'YOUR_API_KEY', 'Auth-Type': 'api', 'Content-Type': 'application/json' }, body: JSON.stringify({ person: { email: 'jane@acme.com', full_name: 'Jane Doe', phone: '+15550123456', properties: { company: 'Acme', signup_source: 'landing_page' } }, // Optional: straight off the landing page's query string, stored verbatim ad_source: { utm_source: 'facebook', utm_campaign: 'fall-launch', fbclid: 'IwAR...' }, // Optional: window.flywheel('vid') when the page carries the Flywheel pixel visitor_id: '01J9ZX...' }) }); const { registration_id, person_id, already_registered, join_url, join_url_personal } = await response.json(); ``` The response: ```json theme={null} { "registration_id": "7c1b2a3d-5e6f-4a8b-9c0d-1e2f3a4b5c6d", "person_id": "9e2b4c71-0a5f-4d38-b6e1-3c7f8a2d5e94", "already_registered": false, "join_url": "https://us02web.zoom.us/w/81234567890?tk=...", "join_url_personal": true } ``` | Field | Type | Description | | - | - | - | | `registration_id` | string | The registration | | `person_id` | string | The Flywheel person, matched or created | | `already_registered` | boolean | `true` when this person was already registered for this webinar. Nothing was re-sent | | `join_url` | string \| null | The link this person joins with, the same one their messages carry: their own link when the linked platform issued one, otherwise the webinar's `join_url`. `null` when the webinar has neither | | `join_url_personal` | boolean | `true` when `join_url` is this person's own link. `false` when it is the webinar's shared link, or `null` | Use `join_url` for a join button on your thank-you page or in a calendar invite. Check `join_url_personal` first when the webinar requires registration on its platform: on such a Zoom webinar the shared link opens Zoom's own registration form, not the room. A repeat registration returns the same link. A platform that could not be reached never fails the registration; the response then carries the shared link with `join_url_personal: false`. Someone already in Flywheel can be registered by id instead: send `{ "person_id": "..." }` in place of `person`. > [!WARNING] > > **`POST /v1/webinars/register` is deprecated** (September 2026). It still works — same behaviour, it runs the same code — but new integrations should use the endpoint above. Its `user` object becomes `person`, and `user.user_id` becomes `person.external_user_id`; the response names the person `person_id` instead of `org_user_id`. ### What happens on registration 1. **Identification** — the person is found (by `external_user_id` → `email` → `phone` → `anonymous_id` priority) or created. With `visitor_id`, the pixel visitor who filled the form in is claimed, bringing their touch history; `ad_source` is recorded for attribution. Name fields and custom `properties` are merged into their profile. 2. **Registration** — an idempotent registration record is created for the (webinar, user) pair. 3. **Workflow enrollment** — the user is enrolled into every live workflow with a **Webinar Registration** trigger matching this webinar (or bound to "any webinar"). 4. **Event fired** — a `$fw_webinar_registration` event is recorded on the user's timeline with the webinar details, usable in event-triggered workflows, segments, and analytics. > [!NOTE] > > Registering the same user for the same webinar twice is safe: the API returns the existing registration with `already_registered: true` and fires **no** duplicate workflows or events. > [!WARNING] > > A **canceled** webinar refuses registrations with a `400` whose `code` is `failed_precondition` — registering would start its reminder workflows for a session that is not happening. The person is still identified (created or matched) first, so a signup from a stale page is not lost. ### Person object | Field | Type | Description | | - | - | - | | `external_user_id` | string | Your own id for this person | | `email` | string | Email address | | `phone` | string | Phone number | | `first_name` / `last_name` | string | Name fields | | `full_name` | string | Split into first/last automatically when those aren't supplied | | `anonymous_id` | string | Anonymous id from your tracking | | `properties` | object | Custom profile properties (string, number, boolean values) | At least one of `external_user_id`, `email`, `phone` or `anonymous_id` is required. ### The `$fw_webinar_registration` event Every new registration records this event with the following properties: ```json theme={null} { "event_name": "$fw_webinar_registration", "custom_properties": { "webinar_id": "0d4f6f36-...", "webinar_title": "Onboarding Masterclass", "webinar_start_time": "2026-09-01T17:00:00.000Z", "webinar_join_url": "https://zoom.us/j/123456789", "registration_id": "7c1b2a3d-..." } } ``` The `$fw_` prefix is reserved — it can only be produced by Flywheel itself, so the event is a trustworthy signal in workflows and segments. ## Webinar Platform Integrations (Demio) If your organization has connected **Demio** (Dashboard → Settings → Integrations) and the webinar is linked to a Demio event in the webinar drawer, registration does two extra things automatically: 1. The registrant is **pushed to the Demio event**, so they exist in Demio without any extra call. 2. Demio's **personalized join link** for that attendee is stored on the registration and exposed to workflows as the `registration_join_url` context variable — use it in reminder emails/SMS so each person gets their own join button. Attendance also syncs automatically: about 30 minutes after the webinar's scheduled end, Flywheel pulls Demio's participants report and marks attendees, feeding Webinar Attendance Split workflow nodes with no manual attendance calls. You can still call the attendance endpoint below for corrections or non-Demio webinars. ## Mark Attendance `POST /v1/webinars/attendance` Report that a registrant attended (or didn't). Resolve the user by `user_id` or `email`. Attendance is read **live** by Webinar Attendance Split workflow nodes when they run, so you can report it during the webinar or after it ends. Reporting it also arms the webinar's attended / no-show follow-up sequences. A canceled webinar refuses attendance (`failed_precondition`). ```javascript theme={null} await fetch('https://api.flywheel.cx/v1/webinars/attendance', { method: 'POST', headers: { 'Authorization': 'YOUR_API_KEY', 'Auth-Type': 'api', 'Content-Type': 'application/json' }, body: JSON.stringify({ webinar_id: '0d4f6f36-2b6a-4c1e-9a6f-1f2d3c4b5a69', email: 'jane@acme.com', attended: true // optional, defaults to true }) }); ``` ## Reschedule a Webinar `POST /v1/webinars/reschedule` Move the start time. Every pending "wait until webinar start ± offset" step in in-flight workflow runs is recomputed, the webinar's own scheduled messages are re-anchored, and a linked platform's attendance sync moves to the new end time — so everything timed off the webinar follows automatically. ```javascript theme={null} const response = await fetch('https://api.flywheel.cx/v1/webinars/reschedule', { method: 'POST', headers: { 'Authorization': 'YOUR_API_KEY', 'Auth-Type': 'api', 'Content-Type': 'application/json' }, body: JSON.stringify({ webinar_id: '0d4f6f36-2b6a-4c1e-9a6f-1f2d3c4b5a69', start_time: '2026-09-08T17:00:00Z' }) }); const { recomputed } = await response.json(); // recomputed → number of pending reminder tasks moved to the new time ``` ## Manage Webinars, Series and Attendance The endpoints above cover the signup path. The management API covers everything else the dashboard does — list and edit webinars, recurring series, registrants, the send plan, revenue and platform links. The same operations are available to AI agents as MCP tools on `/mcp` (`list_webinars`, `get_webinar_plan`, `register_for_webinar` and so on). | Method | Path | What it does | | - | - | - | | `GET` | `/v1/webinars` | List webinars. Filters: `status`, `series_id`, `starts_after`, `starts_before`, `order` (`asc`/`desc`), `limit`, `offset` | | `GET` | `/v1/webinars/{webinar_id}` | One webinar with registration counts (registered, attended, no-show) and its messages by status | | `PATCH` | `/v1/webinars/{webinar_id}` | Edit `title`, `start_time`, `timezone`, `duration_minutes`, `join_url`, `status`, `automation_id`. Omitted fields stay; `null` clears. A new start or duration re-anchors every reminder | | `DELETE` | `/v1/webinars/{webinar_id}` | Delete a webinar that has no registrations, no sent messages and no series. Otherwise cancel it (`status: canceled`) | | `POST` | `/v1/webinars/{webinar_id}/clone` | Copy to a new `start_time`, messages included as drafts. Optional `new_webinar_id` for safe retries | | `GET` | `/v1/webinars/{webinar_id}/registrants` | Registrants with attendance, watch time, offer clicks and purchases. Filter by `segment`: `registered`, `attended`, `no_show`, `left_early`, `clicked_offer`, `purchased`, `refunded` | | `POST` | `/v1/webinars/{webinar_id}/registrants` | Register someone: `person_id`, or a signup `person` with optional `ad_source` / `visitor_id`. Returns their `join_url` (see Register a User) | | `PUT` | `/v1/webinars/{webinar_id}/registrants/{person_id}/attendance` | Set `attended` for one registrant | | `GET` | `/v1/webinars/{webinar_id}/plan` | Every message the webinar sends and when, resolved for sample (or your `entry_times`) registration moments | | `GET` | `/v1/webinars/{webinar_id}/revenue` | Revenue, split into attributed and unattributed, per message | | `PUT` | `/v1/webinars/{webinar_id}/platform` | Link to `demio`, `webinarjam` or `zoom` (`event_id`; optional `date_id` for Demio and WebinarJam — left out on a WebinarJam webinar with several schedules, the one on the webinar's date is picked). Zoom ids are checked against your connected Zoom account | | `DELETE` | `/v1/webinars/{webinar_id}/platform` | Unlink from the platform. On a series' template webinar, the series' upcoming webinars sharing that Zoom webinar are unlinked too | | `GET` / `POST` | `/v1/webinar-series` | List series / create one: `name`, `cadence` (`interval_unit` `day`/`week`, `interval_count`, `weekday` 0–6 for weekly, `time_of_day` `HH:mm`), `timezone`, `duration_minutes`, `build_ahead_count`, optional `id`. Link the series' template webinar to a **recurring** Zoom webinar and every upcoming webinar of the series is linked to it too, in either order | | `GET` / `PATCH` | `/v1/webinar-series/{series_id}` | A series with its sessions, skipped dates and next unbuilt dates / edit its rule or `status` (`active`, `paused`, `archived`) | | `POST` | `/v1/webinar-series/{series_id}/materialize` | Build any sessions the series is short of now | | `POST` | `/v1/webinar-series/{series_id}/skips` | Skip an upcoming date (`occurrence_date`, `yyyy-MM-dd`) | | `DELETE` | `/v1/webinar-series/{series_id}/skips/{occurrence_date}` | Put a skipped date back | | `GET` | `/v1/webinar-series/{series_id}/revenue` | Revenue across the series, with a per-session breakdown | Status moves are validated: `draft` → `scheduled` or `canceled`; `scheduled` → `live`, `completed` or `canceled`; `live` → `completed` or `canceled`; `canceled` → `scheduled` (messages whose time passed while canceled are not re-sent); `completed` is final. ## Typical Integration A landing-page signup form wired to Flywheel: ```javascript theme={null} // 1. Once: create the webinar (or grab its id from the dashboard) const { webinar } = await flywheel('/v1/webinars', { webinar: { title: 'Product Deep Dive', start_time: '2026-09-15T16:00:00Z' } }); // 2. On every form submission: register the signup app.post('/webinar-signup', async (req, res) => { await flywheel(`/v1/webinars/${webinar.id}/registrants`, { person: { email: req.body.email, full_name: req.body.name, properties: { signup_source: 'landing_page' } }, ad_source: { utm_source: req.query.utm_source, fbclid: req.query.fbclid } }); res.redirect('/thanks'); }); // 3. After the webinar: sync attendance from your platform (e.g. Zoom report) for (const attendee of zoomAttendees) { await flywheel('/v1/webinars/attendance', { webinar_id: webinar.id, email: attendee.email }); } ``` Pair this with a workflow that uses the **Webinar Registration** trigger, anchored waits ("1 day before start", "1 hour before start"), and a **Webinar Attendance Split** after the webinar ends for attendee vs no-show follow-ups. # Create Webinar Source: https://flywheel.mintlify.app/api-reference/webinars/create-webinar /api-reference/openapi.json post /v1/webinars Create a webinar for your organization. API-created webinars default to 'scheduled' status. Link an automation (workflow) to enroll registrants into it automatically. # Mark Webinar Attendance Source: https://flywheel.mintlify.app/api-reference/webinars/mark-webinar-attendance /api-reference/openapi.json post /v1/webinars/attendance Record that a registrant attended (or did not attend) a webinar. Attendance is read live by Webinar Attendance Split workflow nodes, so it can be reported during or after the webinar. The user is resolved by user_id or email. # Register User for Webinar Source: https://flywheel.mintlify.app/api-reference/webinars/register-user-for-webinar /api-reference/openapi.json post /v1/webinars/register Register someone for a webinar. The user does NOT need to exist in Flywheel already: they are found by any supplied identifier (user_id, email, phone or anonymous_id) or created as a new user profile. Registration enrolls the user into every live workflow with a matching Webinar Registration trigger and fires a `$fw_webinar_registration` event. Repeat registrations for the same user are idempotent and produce no duplicate side effects. # Reschedule Webinar Source: https://flywheel.mintlify.app/api-reference/webinars/reschedule-webinar /api-reference/openapi.json post /v1/webinars/reschedule Move a webinar's start time. Every pending anchored wait ('wait until webinar start ± offset') in in-flight workflow runs is recomputed so reminder sequences follow the new time. # API Keys Source: https://flywheel.mintlify.app/feature-guides/api-keys Generate and manage workspace API keys for Flywheel integrations # API keys Use API keys to authenticate your app or backend when calling Flywheel APIs. ## Open API key settings 1. Go to **Settings** → **API** in your workspace. 2. Use **Generate API Key** to create a new key. > [card] [Open API Settings](https://app.flywheel.cx/dashboard/deeplink?target=/settings/api) > > Go directly to your workspace API key settings. ## Create a new API key When you click **Generate API Key**, Flywheel opens a dialog where you: 1. Enter a descriptive key name (for example: `production-events-writer`) 2. Click **Create API Key** 3. Copy the key immediately > [!NOTE] > > The full key value is shown once at creation time. Store it in your secret manager before closing the dialog. ## Manage existing keys In **Settings** → **API**, Flywheel lists your existing keys with: * **Name** * **Created date** * **Redacted key value** You can delete a key from the row actions menu. ## Use your key in API requests Flywheel APIs use header-based authentication: ``` Authorization: YOUR_API_KEY Auth-Type: api ``` The same authentication format is used throughout the API reference pages. ## Best practices * Create separate keys for each environment (dev/staging/prod). * Use descriptive names so teammates know where each key is used. * Rotate keys periodically. * Delete keys you no longer use. # Broadcasts Source: https://flywheel.mintlify.app/feature-guides/broadcasts Create and send targeted email campaigns to your users and segments Broadcasts are one-time email campaigns that you send to your entire user base or specific segments. They're perfect for announcements, promotions, newsletters, and other marketing communications that reach multiple users at once. ## Creating a Broadcast ### 1. Start a New Broadcast 1. Navigate to **Marketing** → **Broadcasts** in your dashboard > [card] [Go to Broadcasts](https://app.flywheel.cx/dashboard/deeplink?target=/broadcasts) > > Access your broadcasts dashboard directly 2. Click **Create Broadcast** ### 2. Configure Your Broadcast #### Audience Selection Choose who receives your broadcast: * **All Users**: Send to your entire user base with valid email addresses * **Specific Segment**: Target a pre-defined user segment * **Custom Filters**: Apply additional filtering criteria #### Email Settings Configure the basic email properties: * **Subject Line**: Craft a compelling subject that drives opens * **Preview Text**: Optional preview text shown in email clients (Designed emails only) * **Sender**: Choose a sender from your list of senders * **Style**: **Designed** sends the email in your template, with tracking when your domain tracks. **Plain** sends it the way a person types an email in Gmail: just your words, no images, no preview text, links exactly as written, no tracking, and one plain unsubscribe line at the end. Switching an email with images to Plain removes them, after a warning. Name a Plain email's sender after a person, not a brand. > [card] [Go to Sender Settings](https://app.flywheel.cx/dashboard/deeplink?target=/settings/email) > > Add or manage your email senders ### 3. Preview and Test Before sending your broadcast: * **Preview**: See how your email looks across different devices * **Test Send**: Send test emails to yourself or team members * **Spam Check**: Verify your content won't trigger spam filters * **Link Validation**: Ensure all links work correctly ## Sending Your Broadcast ### Send Options #### Send Immediately * Click **Send Now** to deliver immediately * Broadcast goes out to all recipients right away * Best for time-sensitive announcements #### Schedule for Later * Choose a specific date and time * Consider your audience's time zones * Schedule during optimal engagement hours ### Delivery Management Flywheel automatically handles: #### Smart Delivery * **Batch Processing**: Emails are sent in batches to ensure deliverability * **Rate Limiting**: Respects sending limits to maintain sender reputation * **Retry Logic**: Automatically retries failed deliveries ## Broadcast Analytics ### Engagement Metrics Monitor user engagement: * **Sent**: Total number of emails delivered * **Clicked**: Total number of emails clicked * **Opened**: Total number of emails opened > [!NOTE] > > Make sure to enable open tracking in the [email settings](https://app.flywheel.cx/dashboard/deeplink?target=/settings/email) to see the opened > metrics. A broadcast sent in the **Plain** style (like an email typed in Gmail: just the words, no images and no tracking) shows its opens and clicks as **Not tracked**, never 0%. When a Plain email's sending domain receives its mail through Mailgun, the report also says how many of the sent emails someone **replied** to. Replies are forwarded to the sender's reply-to address, so you still get each one. A Designed email keeps the sender's reply-to address, so its replies go straight there and aren't counted (unless the sender has none). ## Broadcast Status and Management ### Status Types | Status | Description | | - | - | | `Draft` | Broadcast is being created/edited | | `Sending` | Currently being delivered | | `Sent` | Delivery completed | | `Scheduled` | Waiting for scheduled send time | # Custom Properties Source: https://flywheel.mintlify.app/feature-guides/custom-properties Create and manage custom user properties to store additional data and enhance personalization Custom properties allow you to store additional information about your users beyond the standard profile fields. They enable deeper personalization, better segmentation, and more targeted marketing campaigns by capturing business-specific data that matters to your organization. ## What are Custom Properties? Custom properties are additional data fields you can attach to user profiles to store: * **Business-specific Information**: Customer type, account tier, industry * **Behavioral Data**: Preferences, settings, usage patterns * **Calculated Values**: Lifetime value, engagement score, risk rating * **External System Data**: CRM IDs, support ticket counts, subscription details * **Demographic Information**: Company size, job title, location details Unlike standard user properties (name, email, phone), custom properties are completely flexible and defined by your business needs. ## How Custom Properties are Created Custom properties can be created in several ways: ### 1. Automatic Creation from Events When Flywheel receives user data through events with `identify: true`, it automatically creates custom properties from properties within a `$set` object: ```javascript theme={null} // When this event is received with identify: true { user_id: 'user123', event: 'user_signup', identify: true, properties: { email: 'user@example.com', first_name: 'John', $set: { company_size: '50-100', // → Creates "company_size" custom property industry: 'Technology', // → Creates "industry" custom property utm_source: 'google_ads', // → Creates "utm_source" custom property trial_type: 'premium' // → Creates "trial_type" custom property } } } // Flywheel automatically creates custom properties for each field in $set // Properties outside $set are not added as custom properties ``` > [!NOTE] > > Only properties within the `$set` object are extracted as custom properties. Standard user properties (email, first\_name, last\_name, phone, etc.) can still be passed at the root level of `properties` and will be set on the user record directly. ### 2. Manual Creation in Settings Create custom properties manually for better control and organization: 1. **Navigate to Settings** * Go to **Settings** → **Users** → **Custom Properties** * Click **Add Custom Property** > [card] [Custom Properties Settings](https://app.flywheel.cx/dashboard/deeplink?target=/settings/users) > > Access custom properties configuration and management 2. **Define the Property** * **Name**: Internal name used in API calls and data * **Display Name**: Human-readable name for the UI * **Description**: Explain what the property represents * **Type**: Choose the data type (string, number, boolean, date) 3. **Configure Options** * **Required**: Whether the property is mandatory * **Default Value**: Set a default if no value is provided * **Validation Rules**: Set constraints on acceptable values ## Property Types Flywheel supports several property types to match your data: ### String Properties Text-based information: ```javascript theme={null} { industry: 'Technology', customer_tier: 'premium', preferred_language: 'en', utm_source: 'google_ads' } ``` ### Number Properties Numeric values for calculations and comparisons: ```javascript theme={null} { lifetime_value: 1250.00, login_count: 45, support_tickets: 3, engagement_score: 85 } ``` ### Boolean Properties True/false flags for binary characteristics: ```javascript theme={null} { is_premium_user: true, email_verified: false, has_mobile_app: true, opted_in_marketing: false } ``` ### Date Properties Timestamp-based information: ```javascript theme={null} { trial_end_date: '2024-02-15T00:00:00Z', last_purchase_date: '2024-01-10T14:30:00Z', onboarding_completed_date: '2024-01-05T09:15:00Z' } ``` ## Managing Custom Properties ### Viewing Custom Properties Access custom properties in several ways: #### Settings Dashboard * **Property List**: See all defined custom properties * **Usage Statistics**: View which properties are most used * **Data Types**: Review property types and configurations * **Validation Rules**: Check constraints and requirements #### User Profiles * **Individual User View**: View and edit custom property values for specific users > [card] [View User Profiles](https://app.flywheel.cx/dashboard/deeplink?target=/users) > > Access individual user profiles and custom property values ### Editing Custom Properties Update custom property configurations: 1. **Navigate to Property Settings** * Go to **Settings** → **Users** → **Custom Properties** * Click on the property you want to edit > [card] [Edit Custom Properties](https://app.flywheel.cx/dashboard/deeplink?target=/settings/users) > > Modify existing custom property configurations 2. **Modify Configuration** * Update display name or description * Change validation rules * Modify default values * Adjust property type (with caution) 3. **Impact Assessment** * Review existing data before making changes * Consider impact on segments and workflows * Test changes in staging environment first # Event Definitions Source: https://flywheel.mintlify.app/feature-guides/event-definitions Create and manage event definitions to control event schemas and display configuration Event definitions let your team standardize event structure and control how events appear throughout Flywheel. ## What event definitions do Event definitions help you: * Keep event names and properties consistent * Edit display settings (icon, color, description template) * Review event source and schema details * Manage custom and Flywheel-provided event definitions ## Open event definitions Go to **Events** → **Event Definitions** in your dashboard. > [card] [Open Event Definitions](https://app.flywheel.cx/dashboard/deeplink?target=/event-definitions) > > Review and manage event definitions for your workspace. ## Create a custom event definition 1. Click **Create Event** 2. Enter an event name (Flywheel converts spaces to underscores) 3. Open the new definition from the list 4. Configure schema fields and display settings > [!NOTE] > > Custom event definitions are editable. Factory event definitions are read-only. ## Configure a definition Inside an event definition drawer, you can configure: * **Properties**: schema fields used for validation and context * **Icon & color**: event visual identity in tables and timelines * **Description template**: dynamic event text based on event properties * **Description properties**: property mapping used by the description template ## Search and open definitions On the Event Definitions page, you can: * Search by event name * Open any row to view details * Identify the event source at a glance from source icons ## Best practices * Use clear, stable event names like `trial_started` or `invoice_paid` * Keep property schemas simple and strongly typed * Document important custom properties before sending high-volume traffic * Update display templates so teammates can quickly interpret events # User Segments Source: https://flywheel.mintlify.app/feature-guides/segments Create and manage targeted user segments for personalized marketing campaigns User segments allow you to group your users based on specific criteria, enabling targeted and personalized marketing campaigns. With Flywheel's powerful segmentation engine, you can create dynamic groups that automatically update as user data changes. ## What are User Segments? User segments are filtered groups of users based on properties, behaviors, and custom conditions. They help you: * Target specific user groups with relevant messaging * Personalize marketing campaigns * Analyze user behavior patterns * Create tailored user experiences Segments in Flywheel are **dynamic by default**, meaning they automatically update as user data changes: * Users are automatically added when they meet the criteria * Users are removed when they no longer match * Real-time updates ensure accurate targeting ## Creating User Segments ### 1. Navigate to Segments In your Flywheel dashboard: 1. Go to **Users** → **All Users** 2. Apply at least one filter to the users list 3. Click **Save Segment** > [card] [Save a New Segment](https://app.flywheel.cx/dashboard/deeplink?target=/users?showSaveSegment=true) > > Go directly to the users page with the save segment dialog open ### 2. Define Segment Criteria You can create segments based on: * **User Properties**: Email, name, subscription status, custom properties * **Event Behavior**: Users who performed specific actions * **Date Conditions**: Registration date, last activity, etc. * **Custom Properties**: Any custom data you've collected ### 4. Segment Configuration When creating a segment, you can customize: * **Name**: Descriptive name for your segment * **Description**: Optional description for team collaboration * **Icon**: Visual identifier (choose from available icons) * **Color**: Color coding for easy identification ## Using Segments in Broadcasts Once you've created segments, you can use them to target specific groups in your broadcast campaigns. ### Targeting a Segment 1. **Create a New Broadcast** * Navigate to **Email** → **Broadcasts** * Click **Create Broadcast** > [card] [Create a New Broadcast](https://app.flywheel.cx/dashboard/deeplink?target=/broadcasts/new) > > Go directly to the broadcast creation page 2. **Select Your Segment** * In the broadcast composer, find the **To** section * Choose your target segment from the dropdown * Preview the estimated reach 3. **Compose Your Message** * Craft your email content * Use personalization variables specific to your segment * Preview how it looks for segment members 4. **Send or Schedule** * Send immediately or schedule for optimal timing * Monitor delivery and engagement metrics ## Best Practices ### Segment Strategy * **Start Simple**: Begin with basic demographic or behavioral segments * **Be Specific**: Create focused segments for better targeting * **Test and Iterate**: Monitor performance and refine criteria ### Naming Conventions * Use descriptive names: "Premium Users - Last 30 Days" * Include date ranges where relevant * Use consistent naming patterns across your team Ready to create your first broadcast? > [card] [Broadcasts Guide](/feature-guides/broadcasts) > > Learn how to craft compelling campaigns for your segments # Transactional Email Source: https://flywheel.mintlify.app/feature-guides/transactional-email Send automated, personalized emails triggered by user actions and events Transactional emails are automated messages sent to individual users in response to specific actions or events. Unlike broadcasts, these emails are triggered by user behavior and are highly personalized, making them essential for user engagement and business operations. ## What are Transactional Emails? Transactional emails are automated, one-to-one messages that are triggered by user actions or system events. Common examples include: * **Welcome emails** when users sign up * **Password reset** confirmations * **Purchase confirmations** and receipts * **Shipping notifications** and tracking updates * **Account activity** alerts * **Subscription** confirmations and renewals ## Templates vs Custom Emails Flywheel supports two approaches to transactional emails: ### Email Templates **Templates** are pre-designed email layouts that you can reuse across multiple transactional emails: * **Reusable Design**: Create once, use for multiple email types * **Consistent Branding**: Maintain brand consistency across all communications * **Variable Support**: Use placeholders for dynamic content * **Easy Management**: Update the template to change all emails using it ### Custom Emails **Custom emails** are built from scratch for specific use cases: * **Unique Design**: Completely custom layout and styling * **Specific Purpose**: Tailored for particular transactional scenarios * **Full Control**: Complete control over HTML, CSS, and content * **One-time Use**: Designed for specific email types or campaigns ## Creating Transactional Emails 1. Go to **Email** → **Transactional** > [card] [Transactional Emails](https://app.flywheel.cx/dashboard/deeplink?target=/transactional) > > Create and manage transactional email campaigns 2. Click **Create New Transactional Email** 3. Configure your email settings 4. Write your email content and add variables ## Sending Transactional Emails ### Using the API Send transactional emails programmatically using Flywheel's API: > [card] [Transactional Email API](/api-reference/transactional-email) > > Complete API documentation with interactive playground for sending custom emails and template-based emails # Introduction Source: https://flywheel.mintlify.app/introduction Welcome to Flywheel - The customer communication platform from the future ![Header Graphic](https://tjrjdjibpxytpsncacxh.supabase.co/storage/v1/object/public/public_img_bucket/docs/header-graphic.png) # What is Flywheel? Flywheel is a customer communication platform that helps you send targeted emails and Slack messages based on realtime user activity. With Flywheel, you can track user behavior, subscription changes, and feature usage, then use that data to trigger workflows that boost retention, reduce churn, and help your customers succeed. No more revenue slipping through the cracks or "we should have followed up" moments - just pure, workflow-driven customer success magic. Think of us as your growth and revenue teams' secret weapon. Here's what makes Flywheel the most cracked tool in your retention arsenal: ### The Most Insane Workflow Builder You'll Ever Use * Build ridiculously powerful workflows that just work * Hooks directly into Stripe - when users upgrade, downgrade, or bounce, Flywheel springs into action * Slurps up events from PostHog and Segment like a smoothie (more integrations dropping soon) * Spits out gorgeous, high-converting emails without needing to bug your design team * Slides into your users' DMs (Slack or email) exactly when they need it ### Real-time User Profiles, Zero Manual Updates Required * Auto-magically links everything: Stripe data, event history, emails, Slack convos * Your user list IS your email list - goodbye API request hell * Every user's story at your fingertips: what they've done, what they're paying, where they're stuck * Hit them with the perfect message at the perfect time (like "Hey, you're crushing it with \[feature], want to level up?") ### Admin Tools That'll Make Your Support Team Kiss You * Spin up custom admin tools faster than you can say "SQL injection" * Let your support squad handle the common stuff without bugging engineering * Turn 48-hour support nightmares into 5-minute fixes * Keep your engineers focused on building cool stuff, not updating user credits ### Let's Get Started Here's what we'll cover to get you up and running: 1. **[Connect Your Domain](#domain-setup)** - Set up your sending infrastructure 2. **[Sync Stripe Data](#stripe-integration)** - Import your customer subscription data 3. **[Track User Events](#event-tracking)** - Start collecting user activity from your app 4. **[Create Workflows](#building-workflows)** - Build your first automated communications ## Domain Setup Setting up your domain is the first crucial step to sending emails through Flywheel. We'll help you configure your DNS records so your emails come directly from your domain, maximizing deliverability and maintaining your brand consistency. ![Domain Settings Interface](https://tjrjdjibpxytpsncacxh.supabase.co/storage/v1/object/public/public_img_bucket/docs/domain-settings.png) ### What You'll Need * Access to your domain's DNS settings * 5-10 minutes of setup time ### Configuration Options We recommend setting up two domains for optimal deliverability and flexibility: 1. **Marketing & Automated Emails** (Recommended) * Use subdomain: `mail.yourdomain.com` * Perfect for newsletters, automated workflows, and bulk communications * Keeps marketing email reputation separate from transactional emails 2. **One-to-One Communications** * Use root domain: `yourdomain.com` * Ideal for direct team member communications * Maintains personal touch for customer support and sales conversations We'll guide you through adding the required MX, TXT, and CNAME records for both domains. Don't worry if you're not technical - you can always share the DNS records with your development team. ### Adding Your Domain To add a domain in Flywheel: 1. Navigate to **Settings** 2. Select **Email** 3. Click **Add Domain** > [card] [Setting up your domain](/quick-start/domain-setup) ## Stripe Integration Connect your Stripe account to automatically sync customer data and trigger communications based on subscription events. ### What Gets Synced * Customer profiles and metadata * Subscription status and history * Payment and billing information * Product and price data ### Key Features * Real-time subscription event tracking * Automatic customer profile creation * Historical data import ## Event Tracking Start collecting user activity data to power personalized communications and workflows. ### Implementation Options * PostHog * Segment * Custom webhooks ### Key Events to Track * User signups and onboarding * Feature usage and engagement * Custom business events * Account changes > [card] [Event tracking](/quick-start/collect-events) ## Building Workflows Create communication workflows that respond to user behavior and drive engagement. ### Workflow Types * Onboarding sequences * Feature activation campaigns * Subscription lifecycle management * Engagement recovery ### Workflow Components * Triggers based on events or conditions * Timing and delay controls * Conditional branching * Multi-channel delivery (email + Slack) Each workflow can combine user data, event history, and subscription status to deliver the right message at the right time. # Broadcasts Source: https://flywheel.mintlify.app/mcp/broadcasts Draft, plan and schedule one-off email and text broadcasts through the Flywheel MCP server, with personalized variables and a reviewed plan before anything reaches a real person ## What a broadcast is A broadcast is one email (or, for a webinar session, one text) sent once to an audience. It is different from a workflow (see [/mcp/workflows](/mcp/workflows)), which reacts to events per person over time: a broadcast is a single send to a whole audience at one moment. Every broadcast tool on the Flywheel MCP server (`https://api.flywheel.cx/mcp`): | Tool | Permission | What it does | | - | - | - | | `list_broadcasts` | `broadcasts.read` | List broadcasts, newest first, with filters and paging | | `get_broadcast` | `broadcasts.read` | One broadcast in full: body, variables, audience, timing, sender, counts | | `list_broadcast_variables` | `broadcasts.read` | What a broadcast's variables can read | | `list_senders` | `senders.read` | Email senders (and whether each is ready) and the organization's SMS number | | `create_broadcast` | `broadcasts.write` | Create a draft. Sends nothing | | `update_broadcast` | `broadcasts.write` | Change a draft. Sends nothing | | `plan_broadcast` | `broadcasts.read` | Show exactly what scheduling would do, and return a `plan_token`. Writes nothing | | `schedule_broadcast` | `broadcasts.send` | Commit a plan: the broadcast goes out to real people at the planned time | | `unschedule_broadcast` | `broadcasts.write` | Take a scheduled broadcast back to draft | | `delete_broadcast` | `broadcasts.write` | Delete a broadcast nobody has received any of | | `get_broadcast_stats` | `broadcasts.read` | Sent / opened / clicked and where every recipient ended up | Everything before `schedule_broadcast` is safe to call freely: drafts and plans reach no one. `schedule_broadcast` is the only tool that commits a send, and it only accepts a `plan_token` from `plan_broadcast`. > [!WARNING] > > Broadcasts are only **scheduled** through the MCP, never sent immediately, and always at least an hour ahead. Show the plan from `plan_broadcast` to the person you work for and get their go-ahead before calling `schedule_broadcast`: it reaches real people. A connection only sees the tools its permissions allow. If a tool is called without its permission, the result is an error naming the missing permission (for example `broadcasts.send`); an org owner has to reconnect with that access. Arguments that do not match a tool's schema are rejected as invalid arguments. Every other failure (a refused body, an unknown id, a refused schedule) comes back as a tool result marked as an error, with a message saying what to fix. The REST equivalents of these tools are documented in [/api-reference/broadcasts](/api-reference/broadcasts). ## Broadcast lifecycle and statuses A broadcast's `status` is one of `draft`, `scheduled`, `sending`, `sent`, `stopped` or `error`. * `draft`: created with `create_broadcast`, or returned to draft by `unschedule_broadcast` or by editing a `stopped` / `error` broadcast with `update_broadcast`. * `scheduled`: committed with `schedule_broadcast` (or scheduled in the dashboard). `update_broadcast` and `delete_broadcast` refuse it until `unschedule_broadcast` takes it back to draft. * `sending` / `sent`: it has gone out. It can no longer be edited, re-planned or deleted. To send similar content again, create a new broadcast. * `stopped`: an earlier send was stopped (the email allowance ran out, or a pre-webinar message's moment passed once the session started). `error`: an earlier send failed to enqueue. Both can be edited, planned and scheduled again; anyone who already received it is skipped as a duplicate. The tools that write (`update_broadcast`, `schedule_broadcast`, `delete_broadcast`, `unschedule_broadcast`) are conditional on the status they read: if the dashboard or the sender changed the broadcast a moment earlier, the call is refused with a message to read it again rather than racing a send in flight. ## Audiences: everyone, segment or webinar `create_broadcast` requires `audience`, one of: | `audience` | Needs | Who gets it | | - | - | - | | `everyone` | nothing else | Every person in the organization with an email address | | `segment` | `segment_id` (from `list_segments`, see [/mcp/people](/mcp/people)) | Members of that segment with an email address, as its filters match at send time | | `webinar` | `webinar_id` (a session UUID from `list_webinars`, see [/mcp/webinars](/mcp/webinars)) | That session's registrants, narrowed by `webinar_audience` | The ids must belong to your organization; an unknown one is refused. Mixing fields is refused too: `segment_id` only goes with `segment`, `webinar_id` and the `webinar_*` fields only go with `webinar`. ```json theme={null} { "audience": "segment", "segment_id": "7c0e5a3e-2f4b-4c1e-9a77-0d5b1e9f3a21" } ``` The audience is a definition, not a frozen list. `plan_broadcast` counts it now; it is resolved again when the broadcast sends, so people who join the segment or register for the session before then get it. People who opted out, bounced or complained are not subtracted from the plan's count: they are skipped one by one at send time and show up as skipped in `get_broadcast_stats`. ### Webinar audiences and timing from the session A broadcast with `audience: "webinar"` goes to one session's registrants. Three optional fields shape it: | Field | Values | Meaning | | - | - | - | | `webinar_audience` | `registered` (default), `attended`, `no_show` | Everyone registered, only those who attended, or only no-shows | | `webinar_offset_minutes` | integer, or `null` | Time the broadcast from the session: minutes **before** the anchor, negative for **after**. `60` = an hour before; `-30` = thirty minutes after. Allowed range: 10080 minutes (7 days) after the anchor up to 43200 minutes (30 days) before it. `null` = not timed from the session; you pick a `send_at` when you plan | | `webinar_anchor` | `start` (default), `end` | Which moment the offset counts from. `end` is the start plus the session's duration; if the session has no duration, `end` falls back to the start | `webinar_anchor` is only accepted together with `webinar_offset_minutes`. A broadcast timed from its session moves with the session: its send time is computed from the session's start (or end), and if the session is rescheduled the time follows it. Plan it without `send_at`. A reminder that goes out an hour before the start, to everyone registered: ```json theme={null} { "audience": "webinar", "webinar_id": "3f9a1c2e-8b4d-4e6f-a1b2-c3d4e5f60718", "webinar_audience": "registered", "webinar_offset_minutes": 60, "webinar_anchor": "start" } ``` A replay email to no-shows two hours after the session ends: ```json theme={null} { "audience": "webinar", "webinar_id": "3f9a1c2e-8b4d-4e6f-a1b2-c3d4e5f60718", "webinar_audience": "no_show", "webinar_offset_minutes": -120, "webinar_anchor": "end" } ``` A message anchored to the start with a positive offset (before the start) is a pre-webinar message: once the session has started, the sender stops it, and `plan_broadcast` raises `webinar_started`. Messages at offset `0`, after the start, or anchored to the end are not stopped. A canceled session's broadcasts are never sent (`webinar_canceled`). To see every message a registrant of a session receives, broadcasts and sequences together, use `get_webinar_plan` (see [/mcp/webinars](/mcp/webinars)). `list_broadcasts` with `webinar_id` lists just one session's broadcasts. ## Email and text broadcasts `channel` is set once, on `create_broadcast`: `email` (the default) or `sms`. It cannot be changed afterwards with `update_broadcast`; create a new broadcast instead. | | Email (`channel: "email"`) | Text (`channel: "sms"`) | | - | - | - | | Audience | `everyone`, `segment` or `webinar` | `webinar` only | | Content fields | `subject`, `preview_text`, `html` | `message_body` | | Sender | `sender_id` from `list_senders` | The organization's SMS number (no field) | | Recipients | People with an email address | Registrants with a phone number | | Delivery | Spread over 3 hours from `send_at` (longer when the sending domain's send guard limits it); a webinar email goes out at once | Goes out at once | Text broadcasts go to a webinar session's registrants only. Creating one with `audience: "everyone"` or `"segment"` is refused. Email-only fields (`subject`, `preview_text`, `html`, `sender_id`) are refused on a text broadcast, and `message_body` is refused on an email. To schedule, an email needs a `subject`, a non-empty `html` and a `sender_id`; a text needs a `message_body` and an SMS number connected to the organization. iMessage numbers cannot send broadcasts. `message_body` is plain text of up to 1600 characters; over 480 characters `plan_broadcast` warns (`long_text`) that it goes out as several messages. `subject` and `preview_text` are sent exactly as written. Variables do not work in them: any `{{` in either field is refused. ## Senders: list\_senders `list_senders` takes no arguments and returns who a broadcast can be sent from: ```json theme={null} { "email": [ { "id": "b1f2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "from_name": "Jaen", "from_email": "jaen@mail.acme.com", "reply_to": "hi@acme.com", "domain": "mail.acme.com", "domain_status": "verified", "ready": true } ], "sms": { "connected": true, "phone_number": "+15555550123" } } ``` * Pass an email sender's `id` as `sender_id` on `create_broadcast` or `update_broadcast`. A `sender_id` that is not one of your organization's senders is refused. * `ready` is true only when the sender's sending domain is verified. You can save a draft with a sender that is not ready, but `plan_broadcast` blocks it (`sender_domain_missing` or `sender_domain_unverified`) until the domain is verified. * `sms.connected` says whether text broadcasts can be sent at all. Text broadcasts have no `sender_id`; they always go from the organization's SMS number. ## Variables: personalizing a broadcast Broadcasts use Flywheel's one variable system, the same one the dashboard editor saves and workflow messages use. Two pieces work together: 1. The body (`html` or `message_body`) holds placeholders: `{{var_}}` where a value goes in text, or `{{link_var_}}` as a link's whole `href`. 2. The `variables` map says what fills each placeholder, keyed by its id. ```json theme={null} { "html": "

Hi {{var_first}},

You are on {{var_plan}}.

", "variables": { "var_first": { "variable": "{{context.root_context.org_user.first_name}}", "fallback": "there" }, "var_plan": { "variable": "{{context.root_context.org_user.custom_properties.plan_name}}", "template": "the {{var}} plan", "fallback": "your current plan" } } } ``` For a person named Ada on the Pro plan this renders "Hi Ada, You are on the Pro plan." For a person with neither value it renders "Hi there, You are on your current plan." The fallback replaces the whole value, template included, so write it to fit the sentence on its own. Ids are `var_` or `link_var_` followed by letters, digits, `_` or `-`. Every placeholder in the body must be defined in `variables`; definitions the body does not use are dropped when the broadcast is saved. ### Discovering what variables can read: list\_broadcast\_variables `list_broadcast_variables` takes no arguments and returns every path a variable can read, in three groups: ```json theme={null} { "person": [ { "variable": "{{context.root_context.org_user.first_name}}", "label": "First Name", "description": "User's first name", "type": "string" } ], "custom_properties": [ { "variable": "{{context.root_context.org_user.custom_properties.plan_name}}", "label": "Plan name", "description": null, "type": "string" } ], "webinar": [ { "variable": "{{context.root_context.webinar.webinar_title}}", "label": "Webinar title", "description": "Title of the session", "type": "string" }, { "variable": "{{context.root_context.webinar.webinar_start_time}}", "label": "Start time", "description": "When the session starts, formatted in the session's timezone", "type": "string" }, { "variable": "{{context.root_context.webinar.join_url}}", "label": "Join URL", "description": "The recipient's personal join link (falls back to the session's link)", "type": "string" }, { "variable": "{{context.root_context.webinar.add_to_calendar_google}}", "label": "Google Calendar link", "description": "Adds the session to Google Calendar, with the recipient's join link", "type": "string" }, { "variable": "{{context.root_context.webinar.add_to_calendar_outlook}}", "label": "Outlook Calendar link", "description": "Adds the session to Outlook, with the recipient's join link", "type": "string" }, { "variable": "{{context.root_context.webinar.add_to_calendar_ics}}", "label": "Apple Calendar link (.ics)", "description": "Downloads a calendar file for Apple Calendar and desktop clients", "type": "string" } ], "how_to_use": "Write {{var_}} in the body where a value goes and define it in variables: …" } ``` (`person` is abbreviated here; it lists every field of the recipient, such as `last_name`, `primary_email`, `mrr` and `subscription_status`.) Each entry's `variable` string goes straight into a variable definition's `variable` field. Custom properties are addressed by their key (`custom_properties.`), not their display name. The `webinar` paths only work on a broadcast whose audience is a webinar session; on any other broadcast they are refused. ### Variable definition fields Each entry in `variables` is an object with these fields: | Field | Default | Description | | - | - | - | | `variable` | required | What to read: exactly a path from `list_broadcast_variables`, such as `{{context.root_context.org_user.first_name}}`. `null` always renders the fallback | | `fallback` | `""` | Used instead when the person has no value. It replaces the whole rendered value, `template` included | | `template` | `"{{var}}"` | Text around the value, with `{{var}}` where the value goes, such as `"{{var}} plan"`. Only applied when there is a value | | `date_format` | none | For date values: a date-fns pattern such as `"MMM d"`, or `relative-short` / `relative-today`. Use it with the default `template` | | `text_format` | `"name"` for name fields | `"name"` repairs the casing of self-typed names ("ada lovelace" becomes "Ada Lovelace"). Set automatically when `variable` reads `first_name`, `last_name` or `full_name`; pass `null` to turn it off | | `variable_type` | `"template"` | Optional; the only accepted value is `"template"` | Values are inserted as-is, and newlines in a value become `
` in an email. A date example, rendering a renewal date as "Oct 14": ```json theme={null} { "var_renews": { "variable": "{{context.root_context.org_user.next_payment_date}}", "date_format": "MMM d", "fallback": "soon" } } ``` ### Link variables: link\_var\_ placeholders When a link's URL comes from a variable, the placeholder is a `link_var_` id and it must be the link's **whole** `href`: ```json theme={null} { "html": "

Join the session

", "variables": { "link_var_join": { "variable": "{{context.root_context.webinar.join_url}}" } } } ``` Rules, all enforced by `create_broadcast` and `update_broadcast`: * A `link_var_` placeholder goes in an `` (as the entire value) or inside a button (see the HTML rules below). It is refused in text. * A `var_` placeholder is refused in an `href` or a button: the dashboard editor drops `var_` ids there on the first edit, after which the link would render empty. * A link variable's `variable` must be exactly one `{{context.root_context.…}}` path, with nothing around it. * To link an image, wrap it: `Join`. Variables in `src` or any other attribute are refused. ### Webinar variables: join link, start time and calendar links On a broadcast with `audience: "webinar"`, variables can read the session as each recipient sees it: `webinar_title`, `webinar_start_time` (already formatted in the session's timezone, so it needs no `date_format`), `join_url` (the recipient's personal join link, falling back to the session's link) and three add-to-calendar links that carry the recipient's join link. A complete reminder email body: ```json theme={null} { "subject": "We start in an hour", "html": "

Hi {{var_first}},

{{var_title}} starts {{var_start}}.

Join the session

Add to Google Calendar

", "variables": { "var_first": { "variable": "{{context.root_context.org_user.first_name}}", "fallback": "there" }, "var_title": { "variable": "{{context.root_context.webinar.webinar_title}}", "fallback": "The session" }, "var_start": { "variable": "{{context.root_context.webinar.webinar_start_time}}", "template": "at {{var}}", "fallback": "soon" }, "link_var_join": { "variable": "{{context.root_context.webinar.join_url}}" }, "link_var_gcal": { "variable": "{{context.root_context.webinar.add_to_calendar_google}}" } } } ``` Moving a broadcast off its webinar (changing `audience` with `update_broadcast`) is refused while its variables still read `root_context.webinar`; send replacement `variables` in the same call. ### Variables in text broadcasts A text's `message_body` uses `{{var_}}` placeholders the same way. Texts are plain, so there is no link markup and no `link_var_`: put a URL variable straight into the text. ```json theme={null} { "channel": "sms", "audience": "webinar", "webinar_id": "3f9a1c2e-8b4d-4e6f-a1b2-c3d4e5f60718", "webinar_offset_minutes": 15, "message_body": "Hi {{var_first}}, we go live in 15 minutes: {{var_join}}", "variables": { "var_first": { "variable": "{{context.root_context.org_user.first_name}}", "fallback": "there" }, "var_join": { "variable": "{{context.root_context.webinar.join_url}}" } } } ``` A text body may also contain a raw `{{context.root_context.…}}` path, which the dashboard's text editor writes for a link's URL; it must resolve. Older merge tags such as `{{first_name|there}}` are refused: use a variable. ### What the variable checks refuse Silent blanks are refused up front rather than sent. `create_broadcast` and `update_broadcast` reject: * A placeholder with no definition in `variables`. * A path that does not exist in a broadcast's context (a typo, or `root_context.webinar` on a broadcast that is not tied to a session). `list_broadcast_variables` is the list of valid paths. * A path outside `root_context` (other context exists only inside workflows), and a raw `{{context.…}}` path written directly in an email body: put it in a variable and write `{{var_…}}`. * Any other template syntax in the body (`{{first_name}}`, `{{#if}}`), an unclosed `{{`, and variables inside HTML comments. * A `template` that uses anything other than `{{var}}` (and `{{context.root_context.…}}` paths). * Variables in `subject` or `preview_text`. `plan_broadcast` re-checks what is stored and raises `variable_missing` (error) or `variable_unresolvable` (warning) if something slipped through, for example a body edited in the dashboard. ## Designed or Plain: send\_style An email broadcast has a `send_style`: * `designed` (the default) wraps the body in the organization's email layout: logo, footer and unsubscribe link. Opens and clicks are tracked when the sending domain tracks them. * `plain` sends it the way a person types an email in Gmail: the words as written, with the formatting Gmail has (bold, italic, lists, links), as a text part and a minimal HTML part. There is no layout, no image, no preview text (the inbox shows the first line, so `preview_text` is not sent), links go exactly as written, and nothing is tracked: no open pixel, no click tracking. It ends with one plain line holding the organization's name, postal address and unsubscribe link, then "Sent with Flywheel" when the organization's Flywheel branding is on. The `List-Unsubscribe` and `List-Unsubscribe-Post` headers stay; `List-Id` is dropped. Name the sender after a person, not a brand. What Plain makes of a body is in `get_broadcast`'s `content_checks`, and again in `plan_broadcast`'s checks: * `plain_email_image` (error): a Plain email holds no images. `create_broadcast` and `update_broadcast` refuse a Plain body with one, so remove it in the same call that sets `send_style: "plain"`. * `plain_email_button` (warning): a button goes as a plain link with the button's words. * `plain_email_link_count` (warning): more than 3 links. An email a person types rarely has more, and spam filters notice. * `plain_email_link_shortener` (warning): a link shortener such as bit.ly, which spam filters distrust. * `plain_open_tracking` (error, `plan_broadcast` only): the sender's domain sends through Resend with open tracking on. Resend adds its pixel to every email from the domain and can't leave one out, so the broadcast can't be sent Plain until open tracking is off for that domain. A Plain email's opens and clicks are not tracked, so `get_broadcast_stats` returns them as `null`, never `0`. Nothing else sees its clicks either: a webinar broadcast sent Plain records no offer clicks (the `clicked_offer` outcome of a `webinar_attendance` trigger), and purchase attribution, which credits the last tracked click, never credits it. ## Email HTML body rules `html` is the email's body only. The organization's email layout (logo, footer, unsubscribe link) wraps it at send, or the plain unsubscribe line for a Plain email (`send_style: "plain"`), so don't write your own footer or unsubscribe link. If you pass a full document (``, ``, ``), only the contents of `` are kept. A broadcast written through the MCP also opens in the dashboard editor, and the body must survive being edited there. Keep to what the editor understands: `p`, `h1`–`h3`, `strong`, `em`, `a`, `ul` / `ol` / `li`, `img`, `hr`, `br`, and buttons. ### Images and paragraphs The editor's image is a top-level block, and its parser drops an image it finds inside a paragraph. When the dashboard reopens an API-written body, it lifts each image out of its paragraph (splitting the paragraph around it) so it survives, but the cleanest body puts images at the top level from the start: ```html theme={null}

Here is what shipped this month.

October release

Thanks for building with us.

``` rather than `

Here is what shipped this month.

`. A linked image is an `` wrapping only the ``. ### Buttons A button is an ``. Inside a button, `link_var_` placeholders are allowed in its `href`, its `data-button-text` and its text: ```html theme={null} Join the session ``` `var_` placeholders are refused inside a button. ### Markup that is refused `create_broadcast` and `update_broadcast` refuse: * `