Business Workflows

No-Code Claude Agents in Bubble: Custom Workflows Without Coding

Build intelligent Claude AI agents in Bubble without coding. This tutorial shows how to create lead scoring and dynamic forms for smarter workflows.

J

Jennifer Yu

Workflow Automation Specialist

December 23, 2025 min read
Share:

No-Code Claude Agents in Bubble: Custom Workflows Without Coding

Introduction

Hey there, fellow no-coder! Ever dreamed of supercharging your Bubble apps with Claude AI's brainpower, but shied away because APIs sound scary? Buckle up, because today we're building custom AI agents right in Bubble—no code required.

We'll integrate the Claude API to handle real business tasks like lead scoring (analyzing prospects to prioritize hot ones) and dynamic forms (generating personalized questions on the fly). Perfect for sales teams, marketers, or anyone automating workflows.

Why Claude in Bubble? Claude's models (like Claude 3.5 Sonnet) excel at reasoning, context handling, and safety—ideal for enterprise-grade agents. Bubble's visual editor makes it drag-and-drop simple. By the end, you'll have agents that think and act autonomously.

This tutorial assumes basic Bubble knowledge. Ready? Let's build! (Word count so far: ~150)

Prerequisites

Before we start:

  • A Bubble.io account (free tier works for testing).
  • An Anthropic API key: Head to console.anthropic.com, sign up, and grab your key from Settings > API Keys.
  • Bubble app: Create a new one or use an existing landing page/form setup.

Pro tip: Store your API key securely in Bubble's App Settings > API Keys (name it 'Anthropic'). Never hardcode it!

(Word count: ~250)

Step 1: Set Up the Claude API Connector in Bubble

Bubble's API Connector plugin is your gateway to Claude. It's free and built-in.

  1. In your Bubble editor, go to Plugins tab > Add plugins > Search "API Connector" > Install.

  2. Open API Connector > Add another API:

    • API Name: Claude API
    • Authentication: Private key in header
      • Key: x-api-key
      • Value: [your_anthropic_api_key] (use the dynamic expression from App Settings).
    • Add header: anthropic-version with value 2023-06-01 (Claude's API version).
    • Add header: content-type with value application/json.
  3. Create a new Call: Claude Messages

    • Method: POST
    • URL: https://api.anthropic.com/v1/messages
  4. Body type: JSON > Raw

    • Paste this JSON template (Bubble will parse it):
{
  "model": "claude-3-5-sonnet-20240620",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "[prompt]"
    }
  ]
}
  • Make [prompt] a dynamic parameter: Add parameter prompt (text type).
  1. Initialize the call (test with a sample prompt like "Hello, Claude!") and save.

Boom! Your connector is live. Test it returns Claude's response under content[0].text.

(Word count: ~550)

Step 2: Build a Lead Scoring Agent

Let's create a sales agent's dream: Upload lead data, get an instant score from 1-10 with reasoning.

Design the UI

  1. Add elements to your page:

    • Input A: Lead name, company, email, notes (multi-line input).
    • Button: "Score Lead"
    • Repeating Group: To display results (source: search for dummy leads or dynamic state).
    • Text elements: For score and explanation.
  2. Create a custom state on the page: lead_data (text).

Wire the Workflow

  1. On Button click:

    • Set state lead_data to a formatted string, e.g.:
      Name: [input name]
      Company: [input company]
      Email: [input email]
      Notes: [input notes]
      
  2. Make API call:

    • Use Claude API > Claude Messages
    • Parameter prompt: Dynamic expression:
      Analyze this lead for sales potential on a scale of 1-10. Consider fit, urgency, budget signals. Provide score and 3 bullet reasons.
      
      Lead:
      [page lead_data]
      
  3. Handle response:

    • Create custom states: lead_score (number, extract with :formatted as number from result's content[0].text), lead_reasoning (text).
    • Use Toolbox plugin (free) or Bubble's text tools to parse Claude's output (e.g., regex for score).
    • Simpler: Instruct Claude to output JSON:
      Respond ONLY in JSON: {"score": 8, "reasons": ["bullet1", "bullet2"]}
      
      Then parse with :JSON as [type] (create a data type LeadScore).

Example Prompt in Action

Full prompt:

Score this lead 1-10 for B2B SaaS (our product: AI workflow tool). Factors: company size, role, pain points, timeline.

Lead Data:
[lead_data]

Output JSON only: {"score": number, "reasons": ["reason1", "reason2", "reason3"]}

Display in Text: "Score: [lead_score]" and Repeating Group for reasons.

Test it! Submit a lead like "Acme Corp CTO, scaling pains, budget approved"—Claude nails it with 9/10.

(Word count: ~950)

Step 3: Dynamic Forms with Claude

Now, level up: User describes needs, Claude generates a tailored form (e.g., HR onboarding).

UI Setup

  • Input: "Describe your workflow need" (e.g., "Onboarding form for new sales hires").
  • Button: "Generate Form"
  • Dynamic Group/Repeating Group: Render form fields from AI.

Workflow Magic

  1. Button click > API call with prompt:

    Generate a dynamic form JSON for: [input]
    
    Output ONLY JSON array of fields: [
      {"label": "Name", "type": "text", "required": true},
      {"label": "Role", "type": "dropdown", "options": ["Sales", "Marketing"]},
      {"label": "Start Date", "type": "date"}
    ]
    
    Keep to 5-8 fields, relevant to [input].
    
  2. Parse response to custom state form_fields (list of FormField type: label text, type text, options list, required yes/no).

  3. Dynamic Rendering:

    • Repeating Group source: page form_fields
    • In cell: Conditional inputs—"If type=text, show Input; if dropdown, show Choice elements."
  4. Submit form: Collect responses into JSON, send back to Claude for processing (e.g., "Summarize submissions").

Example output Claude generates:

[
  {"label": "Full Name", "type": "text", "required": true},
  {"label": "Department", "type": "dropdown", "options": ["Sales", "Engineering", "HR"]},
  {"label": "Emergency Contact", "type": "text"}
]

Voila! Instant custom forms. Scale to support tickets, surveys, whatever.

(Word count: ~1250)

Advanced Tips & Best Practices

  • Models Matter: Use claude-3-haiku for speed/cost (simple tasks), claude-3-5-sonnet for complex reasoning.
  • Prompt Engineering: Always specify output format (JSON). Use system prompts via messages array with role "system". Example advanced body:
    {
      "model": "claude-3-5-sonnet-20240620",
      "max_tokens": 1024,
      "messages": [
        {"role": "system", "content": "You are a sales expert agent."},
        {"role": "user", "content": "[prompt]"}
      ]
    }
    
  • Error Handling: Add workflows for API errors (e.g., if result is empty, show "Try again").
  • Rate Limits: Anthropic: 50 RPM for Sonnet. Use Bubble's scheduler for batches.
  • Security: Privacy mode on; validate inputs to prevent prompt injection.
  • Scaling: Save results to Bubble database. Integrate with Zapier for external triggers.
  • Cost: ~$3/million tokens input. Track in Anthropic console.

Common Pitfalls:

  • Forgetting anthropic-version header → 400 error.
  • Loose prompts → unstructured output. Always enforce JSON.

(Word count: ~1500)

Wrapping Up

You've just built no-code Claude agents that crush lead scoring and dynamic forms—saving hours weekly. Experiment: Add email summaries, content generation, or customer support bots.

Fork this on Bubble's template gallery or share your builds in comments. Questions? Drop 'em below.

Happy automating! 🚀

(Word count: ~1620)

Published on Claude Directory | Explore more Claude + No-Code tutorials.

The #1 Newsletter in AI

Stay ahead of the AI curve

The most important updates, news, and content — delivered in one weekly newsletter.

No spam. Unsubscribe anytime. Privacy policy

claude ai
bubble io
ai agents
no-code
automation
ai-agents
J

About Jennifer Yu

Workflow Automation Specialist

Jennifer covers workflow strategy, no-code platforms, and clear implementation guidance for teams adopting automation.

Comments (0)