Build · Intermediate · A weekend
Build a personal AI assistant for email, calendar and Telegram with open-source software
Message an assistant on Telegram, by text or voice, and it checks your email, books calendar slots and remembers what you tell it.
Instead of paying for Zapier, Make, ChatGPT Plus, Otter.ai, Mem0 Platform, Dropbox or Box.
What you'll build
A personal assistant you talk to in Telegram. Send a text or a voice note such as "what's in my inbox from the school?" or "put the dentist in on Thursday at 3", and it reads your mail, checks your calendar, makes the change and replies. It remembers your preferences, so you only explain them once. This is the job people build with Grok and n8n templates; here every part is open source and the model can be a free local one, or Grok or another hosted model through its API if you prefer.
Blueprint
Activepieces receives each Telegram message. Voice notes go to whisper.cpp for text. Ollama decides what to do and calls Activepieces actions for email and the Nextcloud calendar, while Mem0 stores and recalls what it learns about you.
- You A Telegram text or voice note Activepieces
- Activepieces The voice note audio whisper.cpp
- whisper.cpp The words as text Activepieces
- Activepieces Your message, to recall related memories Mem0 (open source)
- Activepieces Message, memories and the list of tools it may use Ollama
- Ollama A reply, or a tool call such as "create event" Activepieces
- Activepieces Calendar reads and new events Nextcloud Server
- Activepieces The answer in Telegram You
The repos
- 01 · Connect Telegram and mail Activepieces
Self-hostable no-code automation builder with 280+ TypeScript integrations ("pieces") that are also exposed as MCP servers.
- Setup
- Medium, install script or a single docker run with embedded database source
- Hardware
- Production sizing: app 1 vCPU / 1 GB per ten workers; each worker 0.5 vCPU / 1 GB; Postgres 2 vCPU / 4 GB; Redis 1 vCPU / 1 GB source
- Paid extras
- None required; enterprise licence and Activepieces Cloud are optional
- 02 · Think and decide Ollama
Local model runner that downloads and serves open LLMs (Gemma, Qwen, DeepSeek, gpt-oss and more) with a CLI and local API.
- Setup
- Easy; one-line install script or installer, then ollama run source
- Hardware
- Apple M-series or x86 (CPU only) on Mac; 4GB for Windows binary; RAM not stated source
- Paid extras
- None for local use; Ollama Cloud plans optional (Pro $20/month)
- 03 · Hear voice notes whisper.cpp
Dependency-free C/C++ port of OpenAI's Whisper speech recognition, running on CPU or GPU across desktop, mobile and the browser.
- Setup
- Hard; build from source with CMake, then download a ggml model source
- Hardware
- CPU fine; memory from ~273 MB (tiny) to ~3.9 GB (large) source
- Paid extras
- None required
- 04 · Remember you Mem0 (open source)
Open-source memory layer for AI assistants and agents, as a Python/Node library or a self-hosted server with dashboard.
- Setup
- Easy, pip install mem0ai (server via docker compose) source
- Hardware
- Not documented; depends on the LLM and embedding model you run source
- Paid extras
- Needs an LLM and embeddings (OpenAI by default); local models via Ollama are documented
- 05 · Calendar and files Nextcloud Server
Self-hosted file sync and share server with desktop and mobile clients, share links, file versions and an app store for calendar, contacts and more.
- Setup
- Medium; All-in-One Docker image, appliances, or manual PHP/web server/database install source
- Hardware
- At least 128 MB RAM per PHP process, 512 MB recommended source
- Paid extras
- None required; Nextcloud Enterprise (paid support) and hosted providers are optional
Step by step
Install commands change, so each step links to the repo's own docs for the exact commands.
-
Create a Telegram bot and an Activepieces flow
Make a bot with Telegram's BotFather and keep its token private. In Activepieces, start a flow with the Telegram Bot trigger so every message you send the bot starts a run. Reply with a fixed "got it" first to prove the loop works.
Uses Activepieces · its docs
-
Turn voice notes into text
Run whisper.cpp's server on the same machine. When the Telegram message has audio, have the flow download it and send it to whisper.cpp, then pass the text on as if you had typed it.
Uses whisper.cpp · its docs
-
Give it a memory
Run Mem0 self-hosted. Before each model call, search Mem0 for memories related to the message and add them to the prompt; after the reply, store any new fact you told it, such as "I don't take meetings before 10".
Uses Mem0 (open source) · its docs
-
Connect calendar and mail, one action at a time
Use your Nextcloud calendar (CalDAV) for events, and Activepieces' mail pieces for your inbox. Start with "list today's events" and "list unread mail", then add "create event". Keep "send email" behind a confirmation reply.
Uses Nextcloud Server · its docs
-
Test it for a week
Use it for real tasks and keep a note of every wrong answer. Most fixes are in the system prompt or in giving the model clearer tool descriptions, not a bigger model.
Watch out
Mail and calendar access is powerful: start read-only and add write actions one at a time. A Telegram bot is free, but messages pass through Telegram's servers. A hosted model such as Grok is billed per token.
Take it further
- Send a morning message with today's events and the three emails that need a reply.
- Forward receipts to it and file them with the receipt scanner build.
- Swap Ollama for Grok or another hosted model through its API if your machine is too slow.
Questions
Can I use Grok as the model?
Yes. Grok is available through xAI's paid API, and any step that calls Ollama can call it instead. You pay per token, and your messages go to xAI. Grok Bot, the app, is a different product with no documented API, so use the API.
Do I need n8n?
No. The popular Grok assistant template is built in n8n, which uses a fair-code licence. Activepieces is MIT licensed and does the same wiring here. If you already use n8n, the same steps apply.
Is it safe to let an AI read my email?
Run it on your own machine with a local model and nothing leaves your network except the Telegram messages. Give it read access first and make it ask before anything it sends.
Every repo here is open source, still maintained and checked against its own documentation. How we check →