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

# Report Generator

> Generate automated reports and analytics with Lindy

<div style={{ display: 'flex', justifyContent: 'center', margin: '2rem 0' }}>
  <div className="video-card">
    <video src="https://mintcdn.com/lindyai/VHBHJwXMXFd-cbnu/lindy-brand-assets/cs_report_generator.mp4?fit=max&auto=format&n=VHBHJwXMXFd-cbnu&q=85&s=6b1b090b44a2dca9a158f9bc6b8aba4c" width="600" autoPlay muted loop playsInline style={{ display: 'block', width: '100%', borderRadius: '16px' }} data-path="lindy-brand-assets/cs_report_generator.mp4" />
  </div>
</div>

## Quick Overview

With this flow, your agent will:

* **Collect** all support emails from the past 24 h
* **Summarize** counts, response speed, and the top recurring topics
* **Quote** two or three customer lines for color ("it keeps timing out…")
* **Suggest** one focus area for tomorrow
* **Post** the digest straight to Slack—no spreadsheets, no code

Start from the [daily report generator template](https://chat.lindy.ai/home/?templateId=6875b7cd33d0972fe430f059) and customize.

## Building the Flow

### Step 1: Daily Trigger

Set up a recurring schedule to automatically generate reports at the same time each day for consistency.

<Frame>
  <img src="https://mintcdn.com/lindyai/QWdJNkViLsD1veyH/lindy-brand-assets/report-generator-trigger.png?fit=max&auto=format&n=QWdJNkViLsD1veyH&q=85&s=34b8f755a37f0931bb8d8d850a14f3e9" alt="Scheduler trigger" width="1812" height="754" data-path="lindy-brand-assets/report-generator-trigger.png" />
</Frame>

* Action: `On Recurring Schedule` → 9pm daily.

### Step 2: Pull Today's Support Emails

Collect all support communications from the past 24 hours to analyze recent customer interactions.

<Frame>
  <img src="https://mintcdn.com/lindyai/QWdJNkViLsD1veyH/lindy-brand-assets/report-generator-search-email.png?fit=max&auto=format&n=QWdJNkViLsD1veyH&q=85&s=4121646047c1452b962f387ddff3606b" alt="List emails" width="1782" height="898" data-path="lindy-brand-assets/report-generator-search-email.png" />
</Frame>

* Action: `Gmail – Search Emails` with query filter for sent within the past 24 hours
  * Make sure to increase `Max Results` to a higher number limit to fetch all tickets
* Optionally use other actions that align with your ticket management system

### Step 3: Summarize with AI

Process the collected emails to extract meaningful insights and patterns about customer experience.

<Frame>
  <img src="https://mintcdn.com/lindyai/vTETa6Bb9Fi7xfg7/lindy-brand-assets/generate-report-agent.png?fit=max&auto=format&n=vTETa6Bb9Fi7xfg7&q=85&s=3194db1ca8e8d6111d177cd46ffb374a" alt="AI agent summary" width="2326" height="1572" data-path="lindy-brand-assets/generate-report-agent.png" />
</Frame>

* We use an `AI Agent` since it will perform higher levels of reasoning. Example prompt:

```
You are "Support Digest Bot" who is highly observant and reads a LOT. 

You have emails in your context and you must throughly review them all.


Create a qualitative daily digest that emphasizes customer experience over metrics. Focus on patterns, sentiment, and actionable insights rather than counts and numbers.

Include:
• Overall flow assessment (busy/quiet, resolution quality)
• Response pattern observations (when fast/slow, any bottlenecks)
• Three main customer pain points based on sentiment and language
• Three brief customer quotes showing emotional impact
• One specific action for tomorrow

Keep responses conversational and insight-focused. Avoid exact counts, percentages, or time measurements. Use descriptive language like "most," "few," "quick," "delayed" instead of numbers.

Format as a brief, scannable digest with clear sections and emphasis on what matters most to the customer experience.

Create a qualitative daily digest that emphasizes customer experience over metrics. Focus on patterns, sentiment, and actionable insights rather than counts and numbers.

Include:
• Overall flow assessment (busy/quiet, resolution quality)
• Response pattern observations (when fast/slow, any bottlenecks)
• Three main customer pain points based on sentiment and language
• Three brief customer quotes showing emotional impact (anonymize names)
• One specific action for tomorrow

Keep responses conversational and insight-focused. Avoid exact counts, percentages, or time measurements. Use descriptive language like "most," "few," "quick," "delayed" instead of numbers.

Format as a brief, scannable digest with clear sections and emphasis on what matters most to the customer experience.

Your task is complete when you are done writing.
```

### Step 4: Post to Slack

Share the daily digest with your team to keep everyone informed about customer support trends.

<Frame>
  <img src="https://mintcdn.com/lindyai/vTETa6Bb9Fi7xfg7/lindy-brand-assets/generate-report-slack.png?fit=max&auto=format&n=vTETa6Bb9Fi7xfg7&q=85&s=2ec9a0e6a7ab7e059d72956bfd3b90a8" alt="Slack post" width="2230" height="1134" data-path="lindy-brand-assets/generate-report-slack.png" />
</Frame>

* Action: `Slack – Send Channel Message`
* Example channel: `#support-daily`
* Message body: formatted output from the AI Agent

### Step 5: Advanced Analysis (Optional)

Enhance the reporting with structured data analysis for quantitative insights.

Before qualitatively analyzing with AI, you can optionally use a `Run Code – Python` block to parse the structured output and calculate key metrics if your support system has tags or structured data.

<Frame>
  <img src="https://mintcdn.com/lindyai/vTETa6Bb9Fi7xfg7/lindy-brand-assets/generate-report-code.png?fit=max&auto=format&n=vTETa6Bb9Fi7xfg7&q=85&s=20db8650b376c16d0c3539e650be861f" alt="Slack post" width="1540" height="862" data-path="lindy-brand-assets/generate-report-code.png" />
</Frame>

## Best Practices

<AccordionGroup>
  <Accordion title="Tag Consistently">
    Clean tagging = better top-issue detection; revisit macros monthly.
  </Accordion>

  <Accordion title="Keep It Brief">
    Aim for one Slack post that is digestible for the team.
  </Accordion>

  <Accordion title="Iterate on Output">
    Actively read the digests andi iterate on the AI agent prompts.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Smart Support Agent" href="/use-cases/customer success/smart-support-agent" icon="envelope">
    Auto-reply to common support questions
  </Card>

  <Card title="Voice Support" href="/use-cases/customer success/voice-support" icon="phone">
    Handle support calls 24/7
  </Card>

  <Card title="Monitoring Your Agents" href="/testing/monitoring-your-agents" icon="magnifying-glass">
    Track agent performance metrics
  </Card>

  <Card title="Templates" href="/fundamentals/lindy-101/templates" icon="clipboard-list">
    Create reusable report templates
  </Card>
</CardGroup>
