ReferenceFeatures
TurfAI Platform — Feature Reference
Synced from the TurfAI source on 2026-06-21.
Last Updated: February 25, 2026
1. Visual Workflow Builder
Design automation workflows on a drag-and-drop canvas powered by React Flow.
- Drag-and-drop node canvas with auto-layout
- Searchable node palette with 13+ task types
- Dynamic configuration panel — forms adapt to each task type
- Real-time workflow validation before execution
- Execution timeline — step-by-step view of past runs with inputs/outputs per node
- Workflow status lifecycle: draft, active, archived
- Ownership model: system workflows (shared) and user workflows (private)
- Clone system workflows to create personal copies via instantiation
2. Triggers
Four ways to start a workflow.
Webhook Triggers
- Accept POST requests with JSON or multipart/form-data
- File upload support with configurable max size and MIME type filters
- Auto-generated curl sample code from webhook schema
- Secret key authentication with timing-safe comparison
- Per-webhook event type tagging
- Trigger count and last-triggered timestamp
Scheduled Triggers
- Cron expression scheduling (daily, weekly, custom)
- Timezone-aware execution
- Manual trigger on demand
- Pause / resume toggle
- Skip-if-running guard to prevent overlapping executions
- Next-run prediction display
Event Sources (Pub/Sub)
- Google Drive folder watching — trigger on file upload/change
- Event subscriptions — bind workflows to event sources with filters
- Event type filtering and custom criteria
- Event logs with processing status
- Automatic watch renewal for Drive API
- Event volume statistics
Manual Execution
- Run any workflow with custom JSON inputs from the UI or API
3. AI & Document Processing Tasks
Document Classification
- Categorize documents by type, sentiment, or topic
- Multi-classification with confidence scores
- Custom category definitions
Data Extraction
- Extract structured fields (names, dates, amounts) from documents
- Prompt-based extraction using the prompt library
- Define output JSON schema for consistent results
- Confidence scoring per field
LLM Text Generation
- Free-form AI text generation with any prompt
- Model selection: Vertex AI, OpenAI, Anthropic
- Reference saved prompts or write inline
- Structured JSON or plain text output
Summarization
- Generate executive summaries of documents
- Summary types: brief, detailed, bullet-point
- Configurable maximum word count
Combined Classification & Extraction
- Classify then extract in a single task node
- Conditional extraction based on classification result
OCR Text Extraction
- Extract text from scanned PDFs and images
- Automatic language detection
- Integrated into ingestion workflows
4. Integration Tasks
Google Drive
- Fetch files by ID or search by name
- Import Drive files into Document Management System
- Automatic upload to Google Cloud Storage
- Metadata preservation (name, type, size)
- Uses user's OAuth permissions
Email (SMTP)
- Send emails with HTML body templates
- Dynamic
{{variable}}substitution in to, subject, and body - Multiple recipients (to, CC, BCC)
- Custom sender address
- Delivery status in execution logs
Gmail
- Read messages from connected Gmail account
- Reply to specific messages with thread preservation
- Label filtering
- Attachment access
REST API
- HTTP methods: GET, POST, PUT, PATCH, DELETE
- Template variables in URL, headers, and body
- Custom headers (Authorization, Content-Type, etc.)
- JSONPath output mapping to extract specific fields as workflow variables
- Configurable timeout
Document Generation
- Create DOCX files from templates with data merge
- Variable substitution from workflow context
- Generated files available for download or email attachment
Web Scraping (Metadata Extraction)
- Fetch and extract content from web pages by URL
- HTML-to-markdown conversion
- Open Graph metadata extraction
- Used in chatbot URL ingestion workflow
5. Control Flow
Decision Nodes
- Conditional branching with true/false paths
- Operators:
==,!=,>,<,>=,<=,in,contains,matches(regex) - JSONPath references to previous task outputs
- Custom edge labels for true/false paths
- Paths can converge downstream
Wait / Poll Tasks
- Poll an endpoint until a condition is met
- Configurable poll interval and timeout
- Success/failure value matching
- Elapsed time tracking
For-Each Loops
- Iterate over arrays with per-item task execution
- Accumulator to collect results across iterations
- Current item accessible via template variables
6. Variable System
Input/Output Mapping
{{variable_name}}syntax throughout all task configs- Input mapping — resolve variables from workflow context before execution
- Output mapping — extract fields from task results using JSONPath
- Webhook payloads auto-generate variables from form fields
- File uploads produce:
{field}_document_id,{field}_file_url,{field}_mime_type
Built-in Context Variables
{{user_id}}— workflow owner{{execution_id}}— current execution{{DMS_URL}}— backend base URL- All webhook form fields available by name
7. Knowledge Base & RAG
Document Indexing
- Enable RAG on any document to index for semantic search
- Async processing with status tracking (queued → processing → completed)
- Force reprocess option for re-indexing
- Chunk count and embedding model metadata
- Collection-scoped indexing
Semantic Search (RAG Query)
- Natural language queries across indexed documents
- Top-K results with similarity scoring
- AI-synthesized answers with source citations
- Reranking option for improved relevance
- Configurable similarity threshold
Conversation Sessions
- Persistent multi-turn chat with session IDs
- Session listing with pagination
- Session history loading
- Session deletion
- Title updates for organization
Document Collections
- Group documents into named collections
- Add/remove documents from collections
- Collection metadata (name, description)
8. Conversational Chatbot
Chat Interface (Authenticated)
- Full-page chat at
/chatwith three-panel layout - Left sidebar: session list with create/delete
- Center: message thread with
ChatMessagecomponent - Right panel: source documents for current response
- Suggestion prompts for empty state
- Optional chatbot scope via
?chatbot=<id>query parameter
Sidebar Chat
- Floating button (bottom-right) opens slide-out chat sheet
- Same
useChatSessionhook as full page - Available on every authenticated page
Chatbot Management
- Create named chatbots with unique slugs
- Per-chatbot API key (
cb_prefix, 48 hex chars) - Branding: primary color, logo URL
- Welcome message configuration
- Allowed origins for CORS (empty = allow all)
- Rate limiting: configurable requests per minute per API key
- Active/inactive toggle
- Query count and last query timestamp
- Settings page with 5 tabs: General, Branding, Security, Embed, Knowledge Base
Public Chat API
GET /api/chatbots/:slug/config— public, returns branding and welcome messagePOST /api/chatbots/:slug/chat— authenticated viaX-Chatbot-Keyheader- Queries execute against chatbot owner's indexed documents
- In-memory rate limiting per API key
- CORS preflight handling for cross-origin requests
Embeddable Widget
- Standalone JavaScript widget for any website
- Shadow DOM for CSS isolation from host page
- Floating button opens 380x560px chat overlay
- Session persistence in
localStoragekeyed by chatbot slug - Loads branding from public config endpoint
- Source citation badges on responses
- "Powered by TurfAI" footer
- Build:
npx vite build --mode widget→dist/widget.js - Embed:
<script src=".../widget.js" data-chatbot="slug" data-api="https://..."></script> - Programmatic:
window.TurfAIChat.init({ chatbotSlug, apiUrl })
KB Assembly View
- Table of all knowledge base sources (documents + URLs)
- Source type badges: "Document" vs "Web URL"
- Status indicators: Indexed, Processing, Pending, Failed
- Reindex action per source
- Summary bar: total sources, document count, URL count, indexed count
- Embedded in chatbot settings Knowledge Base tab
9. Workflow Templates
Ten pre-built templates covering common use cases.
| Template | Slug | Description |
|---|---|---|
| KYC Aadhaar Extraction | — | Upload ID → Extract details → Email results |
| Document Type Routing | — | Upload → Classify → Route → Extract → Email |
| Job Application (F1) | f1-job-application | Resume → Extract → Match JD → Email HR & HM |
| New Hire Welcome (F2) | f2-new-hire-welcome | Employee data → Generate welcome → Multi-recipient email |
| HR Policy Ingestion (F4-A) | f4a-policy-ingestion | Policy upload → RAG index → Confirmation |
| Employee Q&A (F4-B) | f4b-employee-qa | Question → RAG query → Email answer |
| Performance Reviews (S1) | s1-performance-reviews | Scheduled → Fetch data → Loop → Personalized emails |
| KB Ingestion (Documents) | chatbot-ingestion | Upload → OCR decision → RAG index → Email |
| KB Ingestion (URLs) | chatbot-url-ingestion | URL → Scrape → LLM cleanup → RAG index → Email |
| KB Chat Query | chatbot-query | Question → RAG query → LLM format → Response |
- Template preview shows workflow structure before instantiation
- Filter by category, difficulty, tags
- Chatbot templates auto-create a Chatbot instance on instantiation
10. Prompt Management
Prompt Library
- Create, edit, delete reusable AI prompts
- System prompts (shared) vs user prompts (private)
- Title, description, category, tags metadata
- Permission-based visibility
- Search and filter by name/category/tags
- Generate RTIO structure from document + classification result
Prompt Lab (Interactive Testing)
- Test extraction prompts against real documents
- Output schema builder for structured JSON results
- Switch between Vertex AI, OpenAI, Anthropic models
- AI-powered prompt enhancement (RTIO polishing)
- Save tested prompts directly to the library
11. Document Management
Upload & Storage
- Direct file upload with title, description, tags
- Google Cloud Storage backend
- Format support: PDF, DOCX, TXT, images, Excel
- Auto-conversion: Excel → Markdown
- OCR for scanned documents and images
Document Operations
- List with pagination and filters
- View document details with metadata
- Download original file
- Edit metadata (title, description, tags)
- Delete documents
- Signed URL generation for temporary access
RAG Integration
- Enable/disable RAG indexing per document
- RAG status polling (queued, processing, completed, failed)
- Chunk count and embedding model info
- Force reprocess
12. Analytics & Monitoring
Dashboard
- Token usage with USD cost estimate
- Jobs executed count
- Storage usage vs quota (progress bar)
- Recent activity timeline
- System health check
Workflow Analytics
- Per-workflow execution count and success rate
- Average execution time
- Recent errors with details
- Custom time periods: 24h, 7d, 30d
Execution Tracking
- Real-time execution status
- Step-by-step timeline with inputs/outputs
- Node-level status: active, skipped, failed, completed
- Error details and stack traces
- Resume paused workflows with correlation tokens
13. Authentication & Integrations
User Authentication
- Email/password login
- JWT token management with auto-refresh
- Protected routes with
ProtectedRoutewrapper - 401 interceptor with auto-redirect to login
Google OAuth 2.0
- Connect Google account for Drive and Gmail access
- OAuth authorization URL generation
- Connection status check
- Revoke access (disconnect)
- Automatic token refresh
Integration Catalog
- Browse available integrations
- Connect user-specific integrations with credentials
- CRUD operations on user integrations
14. User Interface
Navigation
- Collapsible sidebar with grouped menu sections
- Groups: Overview, Documents, AI Processing, Prompts, Knowledge Base, Automation, System
- Breadcrumb navigation with route name mapping
- Active route highlighting
UI Component Library
- 49 shadcn/ui components (Radix UI primitives + Tailwind CSS)
- Consistent design language across all pages
- Toast notifications (Sonner) for feedback
- Responsive layout with sidebar provider
Feedback System
- In-app feedback dialog
- Accessible from sidebar footer
15. Technology Stack
Frontend
- React 18.3.1 + TypeScript 5.6
- Vite 6.0 (dev server + build)
- React Flow 11.11.4 (workflow canvas)
- TanStack Query 5.83.0 (server state)
- Tailwind CSS 3.4 + shadcn/ui
- Axios 1.7 (HTTP client)
- React Router DOM 6.30 (routing)
- Sonner (toast notifications)
Backend
- Strapi 5.10.3 (Node.js CMS)
- PostgreSQL (database)
- Redis (job queues)
- Python FastAPI (Job Router :8000, Processors :8001, LLM Service :9090, RAG Query :8003)
- Google Cloud Storage (file storage)
- Vector DB (RAG embeddings)
- Nodemailer (SMTP email)
- node-cron (scheduling)
External Services
- Google Cloud: Drive API, Gmail API, Storage, Vision, Vertex AI
- LLM Providers: Vertex AI, OpenAI, Anthropic
16. API Surface
22 API domain objects in the frontend client (src/lib/api.ts):
| API Object | Domain |
|---|---|
authApi | Login and authentication |
documentsApi | Document CRUD, RAG enable/disable, download |
promptsApi | Prompt library CRUD, permissions, RTIO generation |
collectionsApi | Document collection management |
activitiesApi | Workflow CRUD, instantiation, execution |
executionsApi | Workflow execution management, timeline, resume |
workflowBuilderApi | Task types, LLM models, validation |
analyticsApi | Workflow metrics, errors, overview |
dashboardApi | Dashboard stats, activity, health |
chatApi | RAG query, conversation session CRUD |
chatbotApi | Chatbot CRUD, key regeneration, public config |
usersApi | User profile, usage statistics |
googleOAuthApi | OAuth authorization, status, revoke |
googleDriveApi | File listing, search, import, metadata, path |
integrationsApi | Integration catalog |
userIntegrationsApi | User integration connections |
webhooksApi | Webhook CRUD, secret regeneration |
schedulesApi | Schedule CRUD, trigger, pause/resume, stats |
workflowTemplateApi | Template listing, preview, instantiation |
promptLabApi | Prompt testing, RTIO enhancement |
eventSourcesApi | Event source CRUD, stats, logs, watch renewal |
eventSubscriptionsApi | Event subscription CRUD |