> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peanutsapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Telegram Integration

> Log entries, ask questions, and manage helpers directly from Telegram

<Info>
  **Time:** 10 minutes | **Level:** Intermediate\
  **Prerequisites:** [Logging Like a Pro](/tutorials/beginner/logging-like-a-pro)
</Info>

## What You'll Learn

* Connect your Telegram account to Peanuts
* Log entries via text, voice, and photos in Telegram
* Use bot commands to manage helpers
* Forward messages to automatically log them
* Share helpers with Telegram groups

***

## Why Use Telegram with Peanuts?

<CardGroup cols={2}>
  <Card title="Always Available" icon="clock">
    Log from your existing chat app—no need to switch apps.
  </Card>

  <Card title="Quick Input" icon="bolt">
    Type or voice message like you're texting a friend.
  </Card>

  <Card title="Photo Logging" icon="camera">
    Send photos directly for Smart Scan extraction.
  </Card>

  <Card title="Group Sharing" icon="users">
    Collaborate with family or team in a Telegram group.
  </Card>
</CardGroup>

***

## Connecting Telegram

<Steps>
  <Step title="Open Settings">
    Go to **Settings → Integrations** in Peanuts.
  </Step>

  <Step title="Find Telegram">
    Tap **Telegram** in the integrations list.
  </Step>

  <Step title="Tap Connect">
    Tap **Connect Telegram** to start the connection process.
  </Step>

  <Step title="Open Telegram">
    You'll be redirected to Telegram (or shown a link to open).
  </Step>

  <Step title="Start the Bot">
    Tap **Start** in the Peanuts bot chat, or send `/start`.
  </Step>

  <Step title="Confirm Connection">
    The bot will confirm your account is linked. You're ready to go!
  </Step>
</Steps>

<Tip>
  After connecting, you'll see a connection status indicator on your Helpers list in Peanuts.
</Tip>

***

## Logging via Telegram

### Text Messages

Simply send a message describing your entry:

```
You: Spent $30 at Target on groceries

Peanuts Bot: ✅ Logged to Expense Tracker
             Amount: $30.00
             Category: Groceries
             Store: Target
```

Peanuts automatically routes your message to the right helper based on content.

### Voice Messages

Send a voice message in Telegram—it's transcribed and logged just like text:

1. Hold the microphone button in Telegram
2. Speak your entry naturally
3. Release to send
4. Peanuts transcribes and logs

<Note>
  Voice messages use 10 credits for transcription, same as in-app voice.
</Note>

### Photos

Send a photo with or without a caption:

```
You: [Photo of receipt]

Peanuts Bot: 📷 Processing receipt...
             ✅ Logged to Expense Tracker
             Amount: $47.32
             Store: Whole Foods
             Date: Today
```

Photos with receipts/documents are automatically Smart Scanned (5 credits).

***

## Bot Commands

Use these commands to manage your Peanuts experience in Telegram:

| Command           | What It Does                              |
| ----------------- | ----------------------------------------- |
| `/start`          | Activate the bot and connect your account |
| `/helpers`        | List all your helpers                     |
| `/switch [name]`  | Switch your active helper for logging     |
| `/ask [question]` | Ask Peanuts about your data               |
| `/stats`          | Quick stats for your active helper        |
| `/settings`       | Bot preferences and notification settings |
| `/help`           | Show all available commands               |

### Example: Switching Helpers

```
You: /switch workout

Peanuts Bot: ✅ Switched to Workout Tracker
             Now logging exercise entries.

You: Ran 5k in 28 minutes

Peanuts Bot: ✅ Logged to Workout Tracker
             Distance: 5 km
             Duration: 28 min
```

### Example: Asking Questions

```
You: /ask How much did I spend on food this week?

Peanuts Bot: 📊 Food spending this week: $127.50
             - Groceries: $85.00
             - Restaurants: $42.50
             
             That's 15% less than last week!
```

***

## Smart Routing

Peanuts automatically routes your messages to the most appropriate helper:

| You Send                           | Routed To         |
| ---------------------------------- | ----------------- |
| "Coffee \$4.50"                    | Expense Tracker   |
| "Ran 3 miles"                      | Workout Tracker   |
| "Finished reading Atomic Habits"   | Reading Log       |
| "Dentist appointment next Tuesday" | Calendar/Schedule |

If Peanuts isn't sure, it will ask you to clarify or use `/switch` to set a default.

<Tip>
  Mention your helper name explicitly for guaranteed routing: *"Log to expenses: lunch \$15"*
</Tip>

***

## Forwarding Messages

You can forward messages from other chats to log them:

<Steps>
  <Step title="Find the Message">
    In any Telegram chat, find a message you want to log (e.g., a receipt from a delivery service).
  </Step>

  <Step title="Forward to Peanuts">
    Long-press the message and tap **Forward** → select **Peanuts Bot**.
  </Step>

  <Step title="Confirm or Add Context">
    The bot will process the forwarded message. Add a note if needed.
  </Step>
</Steps>

This works great for:

* Email confirmations forwarded to Telegram
* Screenshots from other apps
* Messages with receipts or booking confirmations

***

## Group Sharing

Share a helper with a Telegram group for collaborative logging.

### Setting Up Group Logging

<Steps>
  <Step title="Add Bot to Group">
    Add the Peanuts bot to your Telegram group.
  </Step>

  <Step title="Link a Helper">
    In the group, send `/link` and select which helper to connect.
  </Step>

  <Step title="Start Logging">
    Any group member can now log entries. Each entry is attributed to who sent it.
  </Step>
</Steps>

### Group Commands

| Command       | What It Does                   |
| ------------- | ------------------------------ |
| `/link`       | Connect a helper to this group |
| `/unlink`     | Disconnect the helper          |
| `/groupstats` | Show group statistics          |
| `/who`        | Show who logged each entry     |

### Use Cases

<CardGroup cols={2}>
  <Card title="Family Expenses" icon="house">
    Everyone logs shared household expenses. See who spent what.
  </Card>

  <Card title="Team Mileage" icon="car">
    Sales team logs travel mileage in a shared tracker.
  </Card>

  <Card title="Group Fitness" icon="heart-pulse">
    Fitness buddies log workouts together with friendly competition.
  </Card>

  <Card title="Shared Shopping List" icon="basket-shopping">
    Family adds items; anyone can check them off when purchased.
  </Card>
</CardGroup>

***

## Notification Settings

Control what notifications you receive from the Peanuts bot:

Access via `/settings` in Telegram or **Settings → Integrations → Telegram** in the app:

* **Entry confirmations:** On/Off
* **Daily summaries:** Morning/Evening/Off
* **Reminders:** Enable helper reminders via Telegram
* **Group notifications:** All entries / Mentions only / Off

***

## Exercise

<Card title="Practice: Log from Telegram" icon="dumbbell">
  Set up and test Telegram integration:

  1. **Connect Telegram** (if not already connected)
     * Settings → Integrations → Telegram → Connect
  2. **Send a text entry**
     * Message the bot: *"Lunch today, \$12, grabbed a sandwich"*
     * Verify it appears in your expense tracker
  3. **Try a voice message**
     * Send a voice message: *"Coffee this morning, four dollars fifty"*
     * Check the transcription accuracy
  4. **Send a photo** (if you have a receipt)
     * Photo of any receipt
     * Verify Smart Scan extraction
  5. **Use a command**
     * Send `/helpers` to see your helpers list
     * Send `/ask How much did I spend today?`

  **Bonus:** Forward a confirmation email or message to the bot!
</Card>

***

## Key Takeaways

<Tip>
  **Remember:**

  * Connect once, log forever from Telegram
  * Messages auto-route to the right helper
  * Voice messages work just like in-app voice (10 credits)
  * Photos are Smart Scanned automatically (5 credits)
  * Use `/switch` to change your active helper
  * Groups enable collaborative logging with attribution
</Tip>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Bot not responding">
    * Make sure you've started the bot with `/start`
    * Check your internet connection
    * Try sending `/help` to test
  </Accordion>

  <Accordion title="Messages going to wrong helper">
    Use `/switch [helper name]` to explicitly set your default helper, or mention the helper name in your message.
  </Accordion>

  <Accordion title="Voice messages not transcribing">
    * Voice transcription requires credits
    * Check your credit balance in Settings → Usage
    * Ensure you have a Starter plan or higher
  </Accordion>

  <Accordion title="Can't add bot to group">
    * You need admin permissions in the group
    * The group must allow bots
    * Try removing and re-adding the bot
  </Accordion>

  <Accordion title="Disconnected from Telegram">
    Go to Settings → Integrations → Telegram and tap **Reconnect** to re-authorize.
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Sharing and Collaboration" href="/tutorials/intermediate/sharing-and-collaboration" icon="users">
    More ways to share and collaborate
  </Card>

  <Card title="Telegram Reference" href="/integrations/telegram" icon="book">
    Complete integration documentation
  </Card>
</CardGroup>
