STEP 1: PLUGIN SETUP
Install the Plugin: Add "AI Agent Platform" to your app from the Bubble Marketplace.
API Keys (Where to store them?): We strongly recommend creating a "Settings" page in your app and storing your API keys in the database. This allows you to manage all your credentials in one central place.
STEP 2: CONFIGURING THE "RUN AI AGENT" ACTION IN A WORKFLOW
Add the "Run AI Agent" action to any workflow. Here's how to fill out the fields:
Global Settings:
LLM Provider: Choose your AI's brain (e.g., OpenAI, Google Gemini).
LLM API Key: Input the API key for your chosen LLM (e.g., Current User's Config's openai_key).
Meta API Token: Your access token from the WhatsApp Cloud API.
Sender Phone Number ID: The ID of your sending phone number (found in your Meta dashboard). Important: this is the ID, not the phone number itself.
Recipient WhatsApp Number: The customer's number to send the message to. It must be in international format with numbers only (e.g., 15551234567).
User Message: The message from the user that the agent needs to process.
Agent-Specific Settings:
Agent Type: Choose the agent's specialty (Support, Sales, etc.).
Conditional Fields: Fill in the fields that appear based on the agent type. This includes your Master Prompt, knowledge source URLs, calendar links, etc.
Pro Tip: Use dynamic values from your database to populate the Master Prompt, allowing you to change your agents' personalities without editing every workflow.
Handling the Response:
After the action runs, use the return values like Result of step X's AI Response Text to save the conversation to your database or Result of step X's Success to create conditional logic for error handling.
Editor link for Bubble Review Team:
https://bubble.io/page?id=alinedeolivgs-15786&test_plugin=1756476045846x351909629866803200_current&tab=Design&name=index&ai_generated=true