@moltflow/openai-actions
v2.0.0
Published
OpenAPI specs for MoltFlow WhatsApp Automation — use with Custom GPT Actions
Downloads
173
Maintainers
Readme
@moltflow/openai-actions — MoltFlow for Custom GPTs
Connect your MoltFlow WhatsApp automation to ChatGPT using Custom GPT Actions. Send messages, track leads, and manage campaigns through natural language.
Overview
This package provides OpenAPI 3.1.0 specifications for the MoltFlow API, optimized for use with OpenAI Custom GPT Actions. It enables ChatGPT to interact with your WhatsApp automation platform through conversational commands.
Features:
- 📨 Send WhatsApp messages via natural language
- 📊 Track and manage leads from monitored groups
- 🚀 Create and control bulk send campaigns
- 📅 Schedule recurring messages
- 📈 Monitor usage and plan limits
- 🔐 Secure API key authentication
Quick Start
Prerequisites
- A MoltFlow account (sign up here)
- An API key from Settings → API Keys
- ChatGPT Plus or Team subscription (required for Custom GPTs)
Installation
Option 1: Import from CDN (Recommended)
Use the jsdelivr CDN URL directly in GPT Builder:
https://cdn.jsdelivr.net/npm/@moltflow/openai-actions@latest/openapi-simplified.yamlOption 2: Install via npm
npm install @moltflow/openai-actionsThen import node_modules/@moltflow/openai-actions/openapi-simplified.yaml in GPT Builder.
Setup in GPT Builder
Follow these steps to create your MoltFlow Custom GPT:
Step 1: Create New GPT
- Go to ChatGPT
- Click your profile → "My GPTs"
- Click "Create a GPT"
Step 2: Configure GPT Details
In the Configure tab:
Name:
MoltFlow WhatsApp Assistant(or your preferred name)Description:
Manage WhatsApp automation — send messages, track leads, run campaignsInstructions: Paste this prompt:
You are a WhatsApp automation assistant powered by MoltFlow. Help the user manage their WhatsApp sessions, send messages, track leads, and run outreach campaigns. Always confirm before sending messages or starting bulk sends. Provide clear status updates and next steps. When listing sessions, show the name, status, and phone number clearly. When displaying leads, include contact info, status, and score. For bulk send jobs, show progress (sent/total) and estimated completion.Conversation starters (optional):
List my WhatsApp sessionsSend a message via WhatsAppShow me new leads from this weekCreate a bulk send campaign
Capabilities: Disable all (Web Browsing, DALL·E, Code Interpreter)
Step 3: Add Actions
Scroll to Actions section
Click "Create new action"
Import from URL → Paste:
https://cdn.jsdelivr.net/npm/@moltflow/openai-actions@latest/openapi-simplified.yamlOR Import from file → Upload
openapi-simplified.yamlThe schema will load automatically
Step 4: Configure Authentication
In the Authentication section, select "API Key"
Configure:
- Authentication Type:
API Key - API Key: Paste your MoltFlow API key
- Auth Type:
Custom - Custom Header Name:
X-API-Key
- Authentication Type:
Click Save
Step 5: Test Your GPT
Switch to Preview tab
Try these test commands:
"List my sessions""What's my current usage?""Show me leads with status new"
If you see API responses, you're ready to go!
Step 6: Publish (Optional)
- Only me: Keep it private
- Anyone with link: Share with your team
- Public: List in GPT Store
Authentication
MoltFlow uses API key authentication via the X-API-Key header.
Getting Your API Key
- Log in to MoltFlow Dashboard
- Go to Settings → API Keys
- Click "Create API Key"
- Copy the key immediately (it won't be shown again)
API Key Scopes
For full GPT functionality, your API key needs these scopes:
sessions:read— View WhatsApp sessionsmessages:send— Send messagesmessages:read— View chat historyleads:read— View leadsleads:manage— Update lead statuscustom-groups:read— View contact groupscustom-groups:manage— Create/edit groupsbulk-send:read— View bulk send jobsbulk-send:manage— Create/control campaignsusage:read— View usage stats
Or use ["*"] for full access.
Available Endpoints
Sessions
GET /sessions— List all WhatsApp sessionsPOST /sessions— Create new sessionGET /sessions/{id}— Get session detailsPOST /sessions/{id}/start— Start session and generate QRGET /sessions/{id}/qr— Get QR code for pairing
Messages
POST /messages/send— Send WhatsApp messageGET /messages/chats— List all chatsGET /messages/chats/{id}/messages— Get chat message history
Leads
GET /leads— List detected leadsPATCH /leads/{id}/status— Update lead status
Custom Groups
GET /custom-groups— List contact groupsPOST /custom-groups— Create new groupPOST /custom-groups/{id}/members/add— Add contacts to group
Bulk Send
GET /bulk-send— List bulk send jobsPOST /bulk-send— Create bulk send campaignGET /bulk-send/{id}— Get job statusPOST /bulk-send/{id}/pause— Pause jobPOST /bulk-send/{id}/resume— Resume job
Usage
GET /usage— Get current usage and limits
Simplified vs Full Spec
This package includes two OpenAPI specs:
| Spec | Size | Endpoints | Use Case |
|------|------|-----------|----------|
| openapi-simplified.yaml | ~16KB | 20 most common | Recommended for GPT Actions (fits easily within 100K limit) |
| openapi.yaml | ~53KB | 30+ comprehensive | Full API documentation, tools, advanced integrations |
For Custom GPTs, use the simplified spec. It covers 90% of use cases and loads faster.
Example Usage
Once configured, interact with your MoltFlow GPT naturally:
Sending Messages
"Send a message to +1-555-0123 saying 'Thanks for your interest!'"Managing Leads
"Show me all leads with status 'new' from the last 7 days"
"Update lead abc-123 to status 'contacted'"Bulk Campaigns
"Create a bulk send to group 'Newsletter Subscribers' with message: Welcome to our community!"
"What's the status of bulk send job xyz-789?"Session Management
"List all my active WhatsApp sessions"
"Start session 'Business Line' and show me the QR code"Usage Tracking
"How many messages have I sent this month?"
"What's my message limit?"Troubleshooting
Error: "Invalid or missing API key" (401)
Cause: API key not configured or incorrect
Fix:
- Verify your API key at https://molt.waiflow.app/settings/api-keys
- In GPT Builder → Actions → Authentication, paste the correct key
- Ensure
X-API-Keyis the header name (case-sensitive)
Error: "Rate limit exceeded" (429)
Cause: Too many requests in short time
Fix:
- Wait 60 seconds before retrying
- Rate limits by plan:
- Free: 10 requests/min
- Starter: 20 requests/min
- Pro: 40 requests/min
- Business: 60 requests/min
Error: "Message limit reached" (403)
Cause: Monthly message quota exceeded
Fix:
- Check usage:
"What's my current usage?" - Upgrade plan at https://molt.waiflow.app/settings/billing
Schema Import Fails
Cause: Spec exceeds GPT Actions 100K character limit (unlikely with simplified spec)
Fix:
- Ensure you're using
openapi-simplified.yaml(notopenapi.yaml) - Character count:
wc -c openapi-simplified.yaml(should be ~16KB)
Actions Not Showing in Preview
Cause: Authentication not configured
Fix:
- Go to Actions section in GPT Builder
- Verify Authentication is set to "API Key"
- Ensure API key is pasted and saved
- Refresh the preview
"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 session UUID from the list
- Verify session belongs to your API key's tenant
Support & Resources
- Documentation: https://molt.waiflow.app/docs
- API Reference: https://apiv2.waiflow.app/docs
- Support: [email protected]
- GitHub: https://github.com/moltflow/moltflow
- Community: https://discord.gg/moltflow
License
MIT License — see LICENSE for details.
Related Packages
- @moltflow/mcp-server — MCP server for Claude Desktop
- @moltflow/skills — ClawHub skill for OpenClaw AI agents
Built with ❤️ by the MoltFlow team
