Home / Documentation / Use Cases / File Watcher for Automated Processing
Resources · Documentation · Examples

Use Case 9: File Watcher for Automated Processing

Automatically process files when they are added to specific folders using AI agents.

Automation Last Updated: May 2026 WebPal 4.2+

Scenario

Every time a PDF report is placed in the "Incoming Reports" folder, the system should extract key data and save a summary.

Setup (with AgentCreator)

  1. Chat with the AgentCreator agent:
I need an agent called "ReportProcessor" that:
- Triggers when a new PDF is added to the "/Shared/Incoming Reports" folder
- Reads the PDF document
- Extracts key financial figures (revenue, costs, net income)
- Creates a summary document in the "/Shared/Processed Reports" folder
- Named as "[Original filename] - Summary.md"
- Sends me a toast notification when done
  1. AgentCreator asks clarifying questions about format preferences and any specific data to extract.
  2. AgentCreator writes the agent class and configures the trigger.
  3. The agent is immediately active.

Operation

  1. A team member uploads a PDF to "Incoming Reports".
  2. The FileChanged event fires (with action: created and name_glob: *.pdf filter matching).
  3. ReportProcessor runs automatically:
    • Reads the PDF
    • Extracts financial data
    • Creates the summary Markdown file in "Processed Reports"
    • Sends a toast notification: "✓ Processed: Q1 Revenue Report - Summary.md saved"

Result

Fully automated report processing without manual intervention.