Back to Templates

Manage Schedule & Contacts with Telegram Bot using GPT-4o-mini & Google Services

Created by

Created by: Ronnie Craig || ronnie-craig-2025

Ronnie Craig

Last update

Last update a day ago

Share


AI Personal Assistant Telegram Bot Template

Description

Transform your Telegram into a powerful AI-powered personal assistant that manages your calendar, sends daily schedules, searches the web, and accesses your contacts - all through simple text messages.

What This Template Does

This workflow creates an intelligent Telegram bot that serves as your personal assistant, capable of:

  • Daily Schedule Management: Automatically checks your Google Calendar and emails you a formatted daily schedule summary
  • Intelligent Conversations: Uses OpenAI GPT-4o-mini with conversation memory for natural interactions
  • Web Research: Searches Wikipedia and the web using SerpAPI for any questions you have
  • Contact Management: Accesses your Google Sheets contact database to find email addresses and information
  • Email Automation: Sends emails on your behalf using Gmail integration
  • Calendar Integration: Reads and manages your Google Calendar events

Target Users

  • Busy Professionals who need quick access to their schedule and want to automate daily planning
  • Small Business Owners who want an AI assistant for managing contacts and communications
  • Personal Productivity Enthusiasts who want to streamline their daily workflow
  • Anyone who prefers text-based interaction over switching between multiple apps

Key Features

Multi-Tool AI Agent: Combines Wikipedia, web search, calendar, email, and contacts in one interface
Conversation Memory: Remembers context across multiple interactions
Automatic Daily Scheduling: Proactive daily schedule emails
Contact Intelligence: Automatically finds contact information before sending emails
Telegram Integration: Works through the familiar Telegram interface

Use Cases

  • "What's on my schedule today?" → Receives formatted email with daily agenda
  • "Send an email to John about the meeting" → Finds John's email and sends message
  • "What's the weather in Paris?" → Gets current weather information via web search
  • "Tell me about quantum computing" → Provides Wikipedia information
  • "Schedule a meeting with Sarah tomorrow at 2 PM" → Creates calendar event

Prerequisites

Before setting up this template, you'll need accounts and API access for:

  • Telegram Bot (free via @BotFather)
  • OpenAI API (paid service)
  • Google Calendar API (free)
  • Gmail API (free)
  • Google Sheets API (free)
  • SerpAPI (freemium web search)

Setup Instructions

1. Create Telegram Bot

  1. Message @BotFather on Telegram
  2. Use /newbot command and follow instructions
  3. Save your bot token for later

2. Set Up Google APIs

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable Google Calendar, Gmail, and Sheets APIs
  4. Create OAuth2 credentials
  5. Download credentials JSON file

3. Get API Keys

  1. OpenAI: Visit platform.openai.com, create API key
  2. SerpAPI: Sign up at serpapi.com, get API key

4. Configure Credentials in n8n

  1. Add Telegram Bot credentials using your bot token
  2. Set up Google OAuth2 for Calendar, Gmail, and Sheets
  3. Add OpenAI API credentials
  4. Add SerpAPI credentials

5. Customize the Workflow

  1. Update Calendar ID: Replace [email protected] with your calendar
  2. Set Google Sheets ID: Replace the sheet ID with your contacts spreadsheet
  3. Modify System Message: Update the AI agent's instructions to match your preferences
  4. Adjust Memory Settings: Configure conversation memory window as needed

6. Test the Setup

  1. Activate the workflow
  2. Message your Telegram bot
  3. Verify all integrations are working

Customization Options

  • Change AI Model: Switch between OpenAI models (GPT-3.5, GPT-4, etc.)
  • Adjust Memory: Modify conversation memory window length
  • Add More Tools: Integrate additional services like Notion, Slack, or weather APIs
  • Modify Schedule: Change when daily schedule emails are sent
  • Customize Responses: Update the system message to change assistant personality

Important Notes

  • Privacy: This bot has access to your calendar, contacts, and email - ensure proper security
  • API Costs: OpenAI and SerpAPI usage will incur costs based on usage
  • Rate Limits: Be aware of API rate limits for each service
  • Security: Use environment variables for sensitive credentials

Troubleshooting

  • Bot not responding: Check Telegram credentials and webhook configuration
  • Calendar access issues: Verify Google Calendar API permissions
  • Email not sending: Confirm Gmail API scopes include send permissions
  • Memory not working: Check that session keys are properly configured

Support

For issues with this template, check:

  1. n8n Community Forum
  2. Individual API service documentation
  3. Google Cloud Console for API errors
  4. OpenAI usage dashboard for model issues