Skip to content
UsecaseBoard
← All use cases
linkedinpdf-processing

Calculate sales KPIs from emailed PDFs before generating executive reports

At a glance

Hasnain Supra combined Gmail, JavaScript, and Groq to turn sales PDFs into a Slack summary and an HTML email report. This workflow is listed under pdf-processing, sales-reporting, structured-data.

Agents / tools
Gmail, JavaScript, Groq, Slack

Building a tool for these workflows? See weekly rates.

What they did

His pipeline triggers on an emailed sales PDF, extracts rows into structured sheet data, and calculates revenue, regional, channel, and hourly patterns in JavaScript. A model served through Groq then produces reports formatted separately for Slack and email.

How it went

Supra describes a working first version after parsing a 60-row PDF, normalizing time formats, and repeatedly refining both output prompts.

Worth knowing

A mismatch between node names broke downstream expressions. The model also produced unwanted Markdown until he added explicit format rules, templates, and length limits.

Save ideas in this browser. Upvotes count across the board.

Prompt excerpt

Reproduction outline (paraphrased): Extract the emailed PDF into structured rows, normalize times, calculate KPIs in code, and generate separate Slack and HTML email outputs with explicit formatting constraints.

Sponsored

CodeBuddy

Tencent Cloud AI coding assistant for IDE and CLI.

Try CodeBuddy ↗
Explore all →