Twitter / X
Connect your X (Twitter) account to Tavio for automated mention monitoring and AI-drafted reply suggestions using the X API v2.
How It Works
Unlike other channels, Twitter/X uses a draft-and-review flow rather than fully automated replies:
- Tavio monitors mentions of your X account
- Incoming mentions are stored as Twitter conversations
- The AI engine drafts a reply based on your knowledge base
- Your team reviews the draft in the dashboard before publishing
- Approved replies are posted via the X API
Prerequisites
- An X Developer account with a Project and App
- X API v2 access (Basic tier or higher)
- OAuth 1.0a credentials for tweet posting
Required Credentials
| api_key | X API Key (Consumer Key) |
| api_secret | X API Secret (Consumer Secret) |
| access_token | OAuth 1.0a Access Token |
| access_token_secret | OAuth 1.0a Access Token Secret |
| bearer_token | Bearer token for X API v2 read endpoints |
Webhook URL
Twitter Webhook
text
https://bankmind.aihookd.site/api/channels/twitterAuto-Reply Drafting
When a new mention is detected, Tavio:
- Stores the tweet in the twitter_conversations table
- Runs the tweet text through the AI pipeline with RAG context
- Generates a draft reply (limited to 280 characters for tweet constraints)
- Saves the draft for team review in the dashboard
Draft reply structure
json
{
"tweet_id": "1234567890",
"author_username": "customer_handle",
"tweet_text": "@YourBank why was I charged twice?",
"draft_reply": "We apologize for the inconvenience. Double charges are typically resolved within 24 hours. Please DM us your account details so we can investigate.",
"status": "pending_review",
"created_at": "2024-01-15T10:30:00Z"
}