- OpenClaw: A local-first, open-source AI agent framework that connects to messaging platforms like Telegram, WhatsApp, Slack, and Discord. It runs on your own machine and acts as a persistent, autonomous AI assistant.
- Dappier: A platform that connects LLMs and agentic AI agents to real-time, rights-cleared data from trusted sources. It delivers verified, prompt-ready information across domains like web search, finance, news, sports, and more.
- Telegram Bot API: Telegramβs official interface for building bots. OpenClaw connects to it automatically during setup β no server or webhook configuration required.
Live Demo
Before building your own, try the finished result. Chat with @amaan_assistant_bot on Telegram to see exactly what youβll be building in this guide β powered by OpenClaw and Dappier.Step 1 β Create Your Telegram Bot with BotFather
Before running the installer, youβll need a Telegram bot token. BotFather is Telegramβs official tool for creating and managing bots.- Open Telegram and search for @BotFather (verify the handle is exactly
@BotFather). - Send
/newbotto start the creation flow. - Enter a display name for your bot (e.g.
Dappier Assistant). - Enter a username β it must end with
_bot(e.g.dappier_assistant_bot). - BotFather will confirm creation and send you a bot token that looks like:
Tip: While in BotFather, optionally run /setprivacy β Disable if you plan
to add your bot to group chats. This allows the bot to see all group messages, not just
those that mention it directly.
Step 2 β Run the OpenClaw Installer
Run this single command in your terminal. It installs Node.js (if needed), installs OpenClaw globally, and immediately launches the interactive onboarding wizard:Windows users: use the PowerShell equivalent:The installer handles the following automatically:
- Detects your OS (macOS, Linux, or WSL)
- Installs Homebrew on macOS if needed
- Installs Node.js 22+ if not already present
- Installs OpenClaw globally via npm
- Launches
openclaw onboardβ the interactive setup wizard
Step 3 β Complete the Onboarding Wizard
Once the installer finishes, theopenclaw onboard wizard launches automatically in
your terminal. It guides you through three setup areas in sequence.
3a β Choose your AI model
The wizard will ask you to select an LLM provider and enter your API key. OpenClaw supports Anthropic Claude, OpenAI GPT, DeepSeek, and others. Select your preferred provider and paste your API key when prompted. For the best experience, Anthropic Claude Opus or Sonnet is recommended.3b β Connect your Telegram channel
When the wizard asks which messaging channel to connect, select Telegram (Bot API). Paste the bot token you received from BotFather in Step 1. The wizard will then ask how to handle incoming DMs:| Option | Description |
|---|---|
pairing | New users must send a pairing code you approve (recommended) |
allowlist | Only specific user IDs you list can message the bot |
open | Anyone can message the bot β no restrictions |
pairing for a personal assistant. The gateway will start automatically.
3b.1 β Approve your pairing code
Once the gateway is running, you need to authorize yourself as a trusted user. This is a one-time step.- Open Telegram and search for your bot by its username (e.g.
@dappier_assistant_bot). - Send any message β for example
/start. - The bot will reply with a pairing code that looks like:
- Back in your terminal, approve the code:
- You will see a confirmation in your terminal and the bot will reply in Telegram confirming access is granted. You can now chat with your bot freely.
Note: Pairing codes expire after 1 hour. If yours expired, simply send another message to the bot to trigger a new code, then approve it again.Want to skip pairing for future users? Switch to allowlist mode in
~/.openclaw/openclaw.json and add your numeric Telegram user ID:
@userinfobot on Telegram β it will reply instantly
with your ID. Then run openclaw restart for the change to take effect.
3c β Install skills from ClawHub
The wizard will prompt you to install skills from ClawHub. When it does, search for and install the Dappier skill:Step 4 β Set Your Dappier API Key
Generate a free API key from your Dappier API dashboard. You can provide it in one of two ways: Option 1 β Export in your shell (current session only):~/.openclaw/.env:
dappier-search β without needing to
export it each session.
Step 5 β Set the Tools Profile
The Dappier skill executes Node.js scripts on your local machine. Ensure your tools profile is set tofull in ~/.openclaw/openclaw.json so all scripts run without restriction:
Step 6 β Test Your Bot in Telegram
Open Telegram, find your bot by username, and send it a message. Try these examples to confirm each Dappier tool is working: Real-time web search:Troubleshooting
Bot does not respond:- Confirm the gateway is running:
openclaw gateway - Check logs in real time:
openclaw logs --follow - Verify your
botTokenis correct in~/.openclaw/openclaw.json
access not configured message:
Your Telegram account is not yet authorized. During onboarding, the wizard walks you
through approving your own pairing code. If you missed this step, run:
Pairing codes expire after 1 hour. Re-send a message to your bot to trigger a new code.Dappier skill not found or not running:
- Confirm installation:
clawhub list - Reinstall:
clawhub install dappier-search - Confirm
DAPPIER_API_KEYis set:echo $DAPPIER_API_KEY
setMyCommands failed error:
Outbound DNS or HTTPS to api.telegram.org is blocked. Check your firewall or network
settings. On VPS hosts, you may need to route Telegram API calls through a proxy:
/setprivacy in BotFather and select Disable, then remove and re-add the bot
to the group. This is required for the bot to receive messages it is not directly
mentioned in.
Conclusion
You now have a fully working Telegram AI bot powered by OpenClaw and Dappier β set up with a single command and a guided onboarding wizard. Your bot can answer real-time questions across finance, sports, news, academia, and more directly inside Telegram, grounded in live, verified data. From here you can:- Add more skills from ClawHub to extend your botβs capabilities
- Add your bot to group chats by adding it to a Telegram group and configuring
channels.telegram.groupsin~/.openclaw/openclaw.json - Enable streaming replies with
channels.telegram.streaming: "partial"for a live, typing-style response experience in chat

