> ## 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.

# WhatsApp Integration

> Log entries and interact with Peanuts via WhatsApp

## What You'll Learn

<CardGroup cols={2}>
  <Card title="Connect WhatsApp" icon="link">
    Link your phone to your Peanuts account
  </Card>

  <Card title="Log Entries" icon="pen">
    Send text, voice, and photos to log data
  </Card>

  <Card title="Use Commands" icon="terminal">
    Master the command shortcuts
  </Card>

  <Card title="Create Helpers" icon="wand-magic-sparkles">
    Design new helpers via chat
  </Card>
</CardGroup>

## Prerequisites

* A Peanuts account (any tier)
* WhatsApp installed on your phone
* At least one helper created

## Why Use WhatsApp?

<AccordionGroup>
  <Accordion title="Always Available" icon="clock">
    WhatsApp is already on your phone. No app switching needed.
  </Accordion>

  <Accordion title="Quick Input" icon="bolt">
    Send a message in seconds. Perfect for capturing moments.
  </Accordion>

  <Accordion title="Voice Logging" icon="microphone">
    Send voice notes when typing isn't convenient.
  </Accordion>

  <Accordion title="Photo Capture" icon="camera">
    Snap receipts, documents, or anything visual.
  </Accordion>
</AccordionGroup>

## Connecting Your Account

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

  <Step title="Generate Linking Code">
    Tap **Connect WhatsApp** to get your 6-character code
  </Step>

  <Step title="Send the Code">
    Open WhatsApp, find the Peanuts number, and send your code
  </Step>

  <Step title="Confirmation">
    You'll receive a welcome message confirming the link
  </Step>
</Steps>

<Tip>
  Your phone number is now linked. All future messages route to your account automatically.
</Tip>

## Logging via WhatsApp

### Text Messages

Just send what you want to log:

```
Coffee $4.50
Ran 5km in 28 minutes
Team meeting with Alex, 1 hour
Weight 72.5kg
```

### The 4-Tier Matching System

Your messages go through intelligent routing:

| Tier         | How It Works                | Credits |
| ------------ | --------------------------- | ------- |
| **Affinity** | Learned from your patterns  | 0       |
| **Local**    | Keywords and field matching | 0       |
| **AI Parse** | Complex understanding       | 1       |
| **Fallback** | Saves to Shoebox            | 0       |

<Info>
  The system learns your patterns over time. "coffee 5" will automatically route to your expense tracker after a few uses.
</Info>

### Voice Notes

Send voice messages for hands-free logging:

1. Hold the microphone button in WhatsApp
2. Speak your entry naturally
3. Release to send

**Cost**: 8 credits for transcription, plus 0-1 for routing

**Example voice entries**:

* "Bought lunch at the cafe, twelve fifty"
* "Had a great workout, ran for thirty minutes"
* "Meeting with the design team, two hours"

### Photos

Send photos for Smart Scan:

| Photo Type | What Happens                   |
| ---------- | ------------------------------ |
| Receipt    | Extracts amount, vendor, items |
| Document   | Analyzes and saves content     |
| Product    | Identifies and categorizes     |
| Food       | Logs to meal tracker           |

**Cost**: 5 credits per image

<Tip>
  Include a caption for better routing: "receipt" or "for expenses"
</Tip>

## Commands Reference

| Command             | What It Does                       |
| ------------------- | ---------------------------------- |
| `help`              | Show the usage guide               |
| `settings`          | View plan, credits, timezone       |
| `credits`           | Quick credit balance check (free!) |
| `apps` or `helpers` | List your active helpers           |
| `undo`              | Delete your last entry             |
| `I'm in London`     | Set your timezone                  |

### Example Command Usage

```
You: credits
Bot: 💳 You have 47 credits remaining (Pro plan)

You: apps
Bot: 📱 Your helpers:
     • Expenses 💰
     • Workouts 🏃
     • Reading List 📚

You: undo
Bot: ✅ Deleted: "Coffee $4.50" from Expenses
```

## Creating Helpers via Chat

You can design and create helpers entirely through WhatsApp:

<Steps>
  <Step title="Describe What You Need">
    Send a message like "I need a tracker for my daily water intake"
  </Step>

  <Step title="Review the Design">
    Peanuts shows you a preview of the helper with fields and settings
  </Step>

  <Step title="Confirm Creation">
    Reply **yes**, **ok**, or **confirm** to create it
  </Step>

  <Step title="Start Using It">
    The helper is live! Start logging right away
  </Step>
</Steps>

**Example conversation**:

```
You: I need a helper for tracking my sleep
Bot: 🛏️ Here's a Sleep Tracker:
     - Duration (hours)
     - Quality (1-5 rating)  
     - Notes (optional)
     
     Reply "yes" to create it!

You: yes
Bot: ✅ Created! Try: "slept 7.5 hours, quality 4"
```

## Asking Questions

Ask anything about your data:

```
You: How much did I spend this week?
Bot: 📊 This week's spending: $142.50
     • Food: $67.00
     • Transport: $45.50
     • Other: $30.00

You: What was my longest run?
Bot: 🏃 Your longest run: 12km on Jan 15

You: Summarize my week
Bot: 📋 Weekly Summary:
     • 12 expense entries ($142.50 total)
     • 4 workouts (avg 35 min)
     • 3 books added to reading list
```

## Rate Limits

WhatsApp has tier-based limits to prevent abuse:

| Tier    | Messages/Hour | AI Ops/Day |
| ------- | ------------- | ---------- |
| Free    | 15            | 10         |
| Starter | 75            | 50         |
| Pro     | 300           | 200        |
| Team    | 750           | 500        |

<Warning>
  If you hit the limit, wait for the reset. Limits refresh hourly (messages) and daily (AI ops).
</Warning>

## Exercise: Try It Yourself

<Steps>
  <Step title="Connect WhatsApp">
    Link your phone via Settings → Integrations → WhatsApp
  </Step>

  <Step title="Log a Text Entry">
    Send a simple entry like "Coffee \$4"
  </Step>

  <Step title="Check Your Credits">
    Send "credits" to see your balance
  </Step>

  <Step title="Send a Voice Note">
    Record "I had a 30 minute walk today"
  </Step>

  <Step title="Ask a Question">
    Try "What did I log today?"
  </Step>
</Steps>

## Key Takeaways

<CardGroup cols={2}>
  <Card title="Zero-Credit Logging" icon="coins">
    Affinity and local matching are free after patterns are learned
  </Card>

  <Card title="Voice is Powerful" icon="microphone">
    8 credits for transcription, but saves time on complex entries
  </Card>

  <Card title="Create Anywhere" icon="wand-magic-sparkles">
    Design new helpers through natural conversation
  </Card>

  <Card title="Quick Commands" icon="bolt">
    "credits", "undo", "apps" for instant actions
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Bot isn't responding">
    1. Check your phone is linked in Settings → WhatsApp
    2. Verify you haven't exceeded rate limits
    3. Try disconnecting and reconnecting
  </Accordion>

  <Accordion title="Entries going to wrong helper">
    Be more specific in your message, or use a prefix like "expenses: coffee \$5"
  </Accordion>

  <Accordion title="Voice notes not transcribing">
    Ensure you have enough credits (8 required). Check "credits" command.
  </Accordion>

  <Accordion title="Rate limit reached">
    Wait for the hourly/daily reset, or upgrade your plan for higher limits.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Smart Scan Mastery" href="/tutorials/intermediate/smart-scan-mastery" icon="camera">
    Learn advanced photo analysis techniques
  </Card>

  <Card title="Voice & Hands-Free" href="/tutorials/intermediate/voice-and-hands-free" icon="microphone">
    Master voice input across all platforms
  </Card>
</CardGroup>
