Imagine managing your entire WhatsApp business from ChatGPT conversations. "Send a follow-up to yesterday's leads." "Show me active campaigns." "What's my message usage this month?" ChatGPT handles it — no dashboard switching, no context loss, just natural language commands.
Custom GPT Actions bridge ChatGPT and MoltFlow's API. One 10-minute setup connects ChatGPT to your WhatsApp automation platform. Send messages, track leads, run campaigns, monitor usage — all from ChatGPT's interface.
This guide walks you through creating a Custom GPT with full MoltFlow integration. By the end, you'll have a conversational WhatsApp command center powered by OpenAI's GPT-4.
What You'll Need
Before starting, make sure you have:
- A MoltFlow account — API keys are available on all plans (Free, Growth, Business). Sign up here if you don't have an account yet.
- A MoltFlow API key — Create one at Dashboard > Settings > API Keys. We'll add this to your Custom GPT in Step 4.
- ChatGPT Plus or Team subscription — Custom GPTs require a paid ChatGPT plan. The free tier doesn't support GPT Actions. Upgrade here if needed.
No coding required. Everything happens through ChatGPT's visual GPT Builder interface.
Why ChatGPT + MoltFlow?
Custom GPT Actions turn ChatGPT into a powerful API client. Instead of learning MoltFlow's dashboard or remembering REST endpoints, you just talk to ChatGPT:
- Natural language commands — "Send a bulk message to my Newsletter group" instead of clicking through forms
- Conversational workflows — Multi-step operations in a single chat thread (create group, add contacts, send message)
- Context retention — ChatGPT remembers session IDs, lead statuses, and campaign details across your conversation
- Multi-tasking — Check usage while composing a message while reviewing leads
Example use cases:
- Sales teams checking lead status between calls without leaving ChatGPT
- Support managers sending bulk updates to customer groups on the fly
- Marketers monitoring campaign performance through conversational queries
- Executives getting usage reports and session status with zero dashboard friction
Step 1: Prerequisites and API Key Setup
First, we'll create a MoltFlow API key with the scopes your Custom GPT needs.
Create your API key:
- Log in to MoltFlow Dashboard
- Navigate to Settings in the left sidebar
- Click API Keys
- Click "Create API Key"
- Give it a descriptive name:
ChatGPT Custom GPT - Choose your scopes:
For full functionality, select these scopes:
sessions:read— View WhatsApp sessions and their statusmessages:send— Send messages via ChatGPT commandsmessages:read— View chat history and message logsleads:read— Query leads from monitored groupsleads:write— Update lead status and pipeline stagescustom-groups:read— List contact groups for bulk messagingcustom-groups:manage— Create and edit groupsmessages:write— Create bulk send campaigns and scheduled messagesusage:read— Check message limits and plan usage
Select the scopes that match the actions you need (see the scope list above).
- Click Create
- Copy the API key immediately — it's only shown once
Store the key securely. You'll paste it into GPT Builder in Step 4.
Important: API keys require explicit scopes. Only grant the permissions your integration actually needs — this follows the principle of least privilege.
Step 2: Create a New Custom GPT
Now we'll create the Custom GPT in ChatGPT.
- Go to ChatGPT
- Click your profile icon in the bottom-left corner
- Select "My GPTs"
- Click "Create a GPT" in the top-right
You'll see the GPT Builder with two tabs: Create (conversational setup) and Configure (manual setup).
Switch to the Configure tab for manual control.
Configure your GPT details:
-
Name:
MoltFlow WhatsApp Assistant(or your preferred name) -
Description:
Manage WhatsApp automation — send messages, track leads, run campaigns, and monitor usage through natural conversation. -
Instructions: Paste this system prompt:
You are a WhatsApp automation assistant powered by MoltFlow. Help the user manage their WhatsApp sessions, send messages, track leads, and run bulk outreach campaigns.
Key behaviors:
- Always confirm before sending messages or starting bulk sends
- Provide clear status updates with message counts, session states, and next steps
- When listing sessions, show name, status (working/stopped), and phone number
- When displaying leads, include contact name, status, lead score, and source group
- For bulk send jobs, show progress (sent/total) and estimated completion time
- Use conversational, professional language — not overly technical
If the user asks to do something that requires information not yet provided (like a session ID), politely ask for it before making the API call.
When operations succeed, confirm the action and offer logical next steps. When errors occur, explain what happened and suggest solutions.- Conversation starters: Add these (optional but recommended):
List my WhatsApp sessionsSend a message via WhatsAppShow me new leads from this weekWhat's my current message usage?
These appear as quick-start buttons when users open your GPT.
- Capabilities: Disable all checkboxes (Web Browsing, DALL-E Image Generation, Code Interpreter)
Your GPT only needs API access — no web search or image generation required.
- Leave other settings at defaults
Don't save yet. We'll add Actions in the next step.
Step 3: Import the MoltFlow OpenAPI Spec
Now we'll connect your GPT to MoltFlow's API by importing the OpenAPI specification.
Add Actions to your GPT:
- Scroll down to the Actions section in the Configure tab
- Click "Create new action"
You'll see a schema editor.
- Click "Import from URL" at the top
- Paste this URL:
https://cdn.jsdelivr.net/npm/@moltflow/openai-actions@latest/openapi-simplified.yaml- Click Import
ChatGPT will fetch the OpenAPI spec and load it automatically. This takes about 5 seconds.
What just happened:
The @moltflow/openai-actions package contains an OpenAPI 3.1.0 specification optimized for Custom GPT Actions. It defines 20 endpoints across 6 domains (sessions, messages, leads, groups, bulk send, usage) with clear descriptions, parameter schemas, and response examples.
Simplified vs Full Spec:
MoltFlow provides two OpenAPI specs:
| Spec | Size | Endpoints | Use Case |
|---|---|---|---|
openapi-simplified.yaml | ~16KB | 20 most common | Recommended for Custom GPTs (fits GPT Actions 100K limit easily) |
openapi.yaml | ~53KB | 30+ comprehensive | Full API documentation for developers |
The simplified spec covers 90% of use cases. For advanced workflows (webhooks, scheduled messages, group monitoring), use the full spec or combine with MoltFlow's REST API.
- Review the imported actions
After import, you'll see a list of available actions with names like listSessions, sendMessage, listLeads, etc. These are the endpoints your GPT can call.
Don't modify the schema unless you know what you're doing. The spec is optimized for GPT Actions.
Step 4: Configure API Key Authentication
Now we'll add authentication so your GPT can call MoltFlow's API securely.
Set up authentication:
-
In the Actions section, scroll down to Authentication
-
Click "Authentication" dropdown and select "API Key"
-
Configure the API key settings:
- Authentication Type:
API Key - API Key: Paste your MoltFlow API key from Step 1
- Auth Type:
Custom - Custom Header Name:
X-API-Key
- Authentication Type:
Important: The header name must be exactly X-API-Key (case-sensitive). MoltFlow's API uses custom header authentication, not Bearer tokens.
- Click Save in the top-right corner
Your Custom GPT is now fully configured and ready to test.
Step 5: Test Your GPT with Sample Commands
Before publishing, thoroughly test your GPT to ensure it works correctly.
Switch to Preview mode:
- Click the Preview button in the top bar (or switch to the left pane)
You'll see a chat interface with your new GPT.
Test basic commands:
Try these in order:
1. List sessions:
"List my sessions"Expected response: A formatted list of your WhatsApp sessions showing names, status (working/stopped/qr_code), and phone numbers. If you have no sessions, the GPT will tell you to create one first.
2. Check usage:
"What's my current usage?"Expected response: Current billing period usage stats — messages sent, messages remaining, plan limits. This confirms the GPT can read your account data.
3. View leads:
"Show me leads with status new"Expected response: A list of leads with status "new", including contact name, phone, lead score, source group, and capture date. If you have no leads, the GPT will say so.
4. Send a test message (optional):
"Send a message to +1-555-0123 saying Hello from ChatGPT!"Replace +1-555-0123 with your own phone number for testing. The GPT will ask you to confirm the session to use, then send the message.
Important: Test sending only to your own number first. Don't spam customers during testing.
What to look for:
- Responses should be formatted clearly (not raw JSON)
- The GPT should confirm actions before executing (especially sends)
- Error messages should be helpful (e.g., "Session not found — list sessions first")
- The GPT should remember context (if you list sessions, it can reference them in follow-ups)
Test edge cases:
- Unknown session: "Send a message using session xyz-fake" — should error gracefully
- Missing parameters: "Send a message" (without phone or content) — should ask for missing info
- Rate limit: Send 10+ rapid commands — should handle 429 errors if you exceed limits
If tests pass, your GPT is ready.
Step 6: Customize and Publish Your GPT
Now that your GPT works, you can customize it further and decide how to share it.
Customization ideas:
1. Tailor the system prompt for your workflow:
If you primarily use MoltFlow for lead management, add to Instructions:
Focus on lead-related queries. When the user asks about leads, proactively offer to filter by status, date range, or source group.If you run bulk campaigns frequently:
When the user creates a bulk send, always confirm the message content, recipient count, and session before executing. Suggest previewing the message first.2. Add custom conversation starters:
Replace generic starters with your actual workflows:
Show me leads from "NYC Events" group this weekSend a bulk message to my Newsletter groupCheck if my Business Line session is working
3. Create multiple GPTs for different use cases:
- Sales GPT — Scoped API key with
leads:*, focused on lead tracking - Support GPT — Scoped key with
messages:send,messages:read, focused on customer communication - Analytics GPT — Scoped key with
usage:read,sessions:read, focused on reporting
Publish your GPT:
-
Click Save in the top-right corner
-
Choose a sharing option:
- Only me — Private, only you can use it (recommended for personal use)
- Anyone with the link — Share with your team via a secret URL (good for team collaboration)
- Public — Listed in the GPT Store (use only if building a public tool)
-
Click Confirm
For team use, choose "Anyone with the link" and share the URL with teammates. Each user will use their own ChatGPT account, but all commands will use your MoltFlow API key.
Important: If you share your GPT, you're sharing access to your MoltFlow account via the embedded API key. Only share with trusted users or create scoped keys with limited permissions.
Available Actions
Here's a quick reference of what your GPT can do:
Sessions (5 endpoints)
GET /sessions— List all WhatsApp sessions with connection statusPOST /sessions— Create a new session (stopped state)GET /sessions/{id}— Get detailed session infoPOST /sessions/{id}/start— Start a session and generate QR codeGET /sessions/{id}/qr— Get QR code for linking
Messages (3 endpoints)
POST /messages/send— Send a WhatsApp message to a phone numberGET /messages/chats— List all chats for a sessionGET /messages/chats/{id}/messages— Get message history for a chat
Leads (2 endpoints)
GET /leads— List leads detected from monitored groupsPATCH /leads/{id}/status— Update lead status in pipeline
Custom Groups (3 endpoints)
GET /custom-groups— List contact groups for bulk messagingPOST /custom-groups— Create a new custom groupPOST /custom-groups/{id}/members/add— Add contacts to a group
Bulk Send (5 endpoints)
GET /bulk-send— List bulk send campaigns with statusPOST /bulk-send— Create a bulk messaging campaignGET /bulk-send/{id}— Get detailed job status and progressPOST /bulk-send/{id}/pause— Pause an active campaignPOST /bulk-send/{id}/resume— Resume a paused campaign
Usage (1 endpoint)
GET /usage— Get current billing period usage and plan limits
Troubleshooting
Error: "Invalid or missing API key" (401)
Cause: API key not configured correctly or expired.
Fix:
- Verify your API key is still active at Settings > API Keys
- In GPT Builder, go to Configure > Actions > Authentication
- Ensure
X-API-Keyis the header name (case-sensitive) - Re-paste the API key and save
- Test again in Preview
Error: "Rate limit exceeded" (429)
Cause: Too many requests in a short time window.
Fix:
Wait 60 seconds before retrying. Rate limits by plan:
- Free: 10 requests/min
- Starter: 20 requests/min
- Growth: 40 requests/min
- Business: 60 requests/min
For higher limits, upgrade your plan.
Error: "Message limit reached" (403)
Cause: You've exceeded your monthly message quota.
Fix:
- Check current usage: Ask your GPT "What's my current usage?"
- Upgrade plan if needed: View pricing
- Wait until next billing cycle for quota reset
Schema Import Fails
Cause: OpenAPI spec exceeds GPT Actions 100K character limit (unlikely with simplified spec).
Fix:
Ensure you're using the simplified spec URL:
https://cdn.jsdelivr.net/npm/@moltflow/openai-actions@latest/openapi-simplified.yamlNot the full spec (openapi.yaml).
Character count: The simplified spec is ~16KB, well under the 100K limit.
Actions Not Showing in Preview
Cause: Authentication not configured or not saved.
Fix:
- In Configure tab, go to Actions section
- Verify Authentication is set to "API Key"
- Ensure API key is pasted and saved
- Click Save at the top-right
- Refresh the Preview pane
"Session not found" errors
Cause: Session ID doesn't exist or belongs to another tenant.
Fix:
List sessions first: "Show me my sessions"
Use the correct UUID from the list when referencing sessions.
Verify the session belongs to your API key's tenant (you can't access other users' sessions).
What's Next
Now that you've connected ChatGPT to MoltFlow, explore these related integrations:
- Connect Claude to MoltFlow via MCP Server — Give Claude Desktop full WhatsApp API access with 25 tools
- Connect OpenClaw Bot to MoltFlow — Native AI integration for automatic WhatsApp replies
- Build a WhatsApp Support Bot — Combine AI with knowledge base for 24/7 customer service
- Connect MoltFlow to n8n — Integrate WhatsApp with 500+ apps via no-code workflows
ChatGPT + MoltFlow turns natural language into WhatsApp automation. Use it for ad-hoc operations, team collaboration, or as a conversational alternative to the dashboard.
Ready to build more integrations? Check out MoltFlow's full REST API documentation for advanced workflows.
Need help? Contact support via the dashboard chat or email us at [email protected]. We typically respond within 2-4 hours.