AI Nodes
Add AI-generated responses to any workflow. Nodebase includes 7 AI provider nodes — OpenAI, Anthropic, Gemini, Groq, DeepSeek, Perplexity, and xAI. All share the same interface: a prompt, an optional system prompt, and an output with the response text and token usage.
Provider Comparison
| Node | Default Model | Best For | Variable Prefix |
|---|---|---|---|
| OpenAI | gpt-4o | General purpose, function calling, vision | {{openAI.content}} |
| Anthropic | claude-sonnet-4-5 | Long context, complex reasoning, document analysis | {{anthropic.content}} |
| Gemini | gemini-2.0-flash | Fast, multimodal (image + text) | {{gemini.content}} |
| Groq | llama-3.3-70b | Fastest inference — ideal for real-time chatbots | {{groq.content}} |
| DeepSeek | deepseek-chat | Cost-effective, strong at coding tasks | {{deepSeek.content}} |
| Perplexity | sonar-pro | Web search included — answers with citations | {{perplexity.content}} |
| xAI | grok-2-latest | Real-time knowledge, current events | {{xAI.content}} |
Common Configuration
All AI nodes share the same fields:
| Field | Required | Description | Supports Variables |
|---|---|---|---|
| Credential | Yes | API key for the selected provider | No |
| Model | Yes | Model name — see provider comparison table above | No |
| Prompt | Yes | The user message or question to send to the AI | Yes |
| System Prompt | No | Instructions that set the AI's behaviour and persona | Yes |
Output Variables
All AI nodes output the same structure (replace nodeName with the variable name configured for that node):
jsonOutput
{
"nodeName": {
"content": "Your order #SHP-001 has been dispatched and will arrive in 3-5 days.",
"model": "gpt-4o",
"usage": {
"prompt_tokens": 85,
"completion_tokens": 24,
"total_tokens": 109
}
}
}Setting Up Credentials
| Provider | API Key Location |
|---|---|
| OpenAI | platform.openai.com → API keys |
| Anthropic | console.anthropic.com → API Keys |
| Gemini | aistudio.google.com → Get API Key |
| Groq | console.groq.com → API Keys |
| DeepSeek | platform.deepseek.com → API Keys |
| Perplexity | www.perplexity.ai → Settings → API |
| xAI | console.x.ai → API Keys |
- Go to Settings → Credentials
- Click Add Credential
- Select the provider (e.g. OpenAI)
- Paste the API key
- Click Save
Complete Workflow Examples
WhatsApp AI Customer Support Bot
Use case: Automatically answer customer questions on WhatsApp using Groq for fast responses.
textWorkflow
WhatsApp Trigger (messageTypes: text)
→ Groq
model: llama-3.3-70b
systemPrompt: "You are a helpful customer support agent for Priya's Clothing Store.
Answer questions about orders, returns, and products.
Be concise — max 3 sentences."
prompt: "Customer message: {{whatsappTrigger.text}}
Customer name: {{whatsappTrigger.senderName}}"
→ WhatsApp — Send Message
to: {{whatsappTrigger.from}}
message: {{groq.content}}AI Order Confirmation Email
Use case: Generate a personalised, friendly order confirmation email using OpenAI.
textWorkflow
Razorpay Trigger (payment.captured)
→ OpenAI
model: gpt-4o-mini
systemPrompt: "You are a friendly email writer for an Indian D2C clothing brand.
Write warm, professional emails in English."
prompt: "Write an order confirmation email for:
Customer: {{razorpayTrigger.payload.payment.entity.notes.name}}
Amount: ₹{{razorpayTrigger.payload.payment.entity.amount}} (note: divide by 100)
Payment ID: {{razorpayTrigger.payload.payment.entity.id}}
Keep it under 100 words."
→ Gmail — Send Email
to: {{razorpayTrigger.payload.payment.entity.email}}
subject: "Your order is confirmed! 🎉"
body: {{openAI.content}}Market Research with Perplexity
Use case: Get up-to-date market data for a product category with web search included.
textWorkflow
Webhook Trigger (POST /research, body: { category })
→ Perplexity
model: sonar-pro
prompt: "What are the top 5 trending products in the {{body.category}} category
in India this month? Include prices and where to buy."
→ Slack — Send Message
channel: #market-research
text: "Research for {{body.category}}:
{{perplexity.content}}"Choosing the Right Provider
| Use Case | Recommended Provider | Reason |
|---|---|---|
| Real-time WhatsApp chatbot | Groq | Fastest inference — sub-second responses |
| Long document analysis | Anthropic | 200K context window, best at following instructions |
| Cost-sensitive bulk processing | DeepSeek | Cheapest per token, good quality |
| Research with current data | Perplexity | Built-in web search — no need for separate HTTP request |
| Image + text tasks | Gemini | Multimodal support with fast flash model |
| General purpose / function calling | OpenAI | Best ecosystem, most reliable, strong reasoning |
| Current events / news | xAI | Real-time knowledge cutoff |
Common Issues & Solutions
| Issue | Cause | Solution |
|---|---|---|
| 401 Unauthorized | Invalid or expired API key | Re-generate the API key from the provider dashboard and update the credential |
| 429 Rate Limit | Too many requests to the provider | Upgrade your provider plan or add a Wait node between AI calls |
| Response is cut off | Max tokens limit reached | Increase the max_tokens setting or shorten your prompt |
| Slow response in WhatsApp bot | Using a large model | Switch to Groq (llama-3.3-70b) for fastest response time |
Related Nodes
- WhatsApp Trigger — use AI to respond to incoming messages
- Gmail — send AI-generated email content
- Code — post-process AI output with custom JavaScript
- Set Variable — save AI response to a named variable for reuse