← Back

Weekly Digest

AI-powered weekly M&A industry reports for portfolio companies. Pulls company data from HubSpot, researches industry news via Perplexity, and delivers a formatted email digest.

System Architecture
+--------------+ +--------------+ +--------------+ | HubSpot | | Perplexity | | SMTP | | CRM | | AI | | Server | +------+-------+ +------+-------+ +------+-------+ | | | v v v +----------------------------------------------------+ | WEEKLY DIGEST | | | | 1. Fetch Companies --> 2. Group by Industry | | | | | | v v | | 3. Research News --> 4. Generate Report | | | | | | v v | | 5. Filter Empty --> 6. Send Email | +----------------------------------------------------+ SCHEDULE: Weekly (manual trigger) DEPLOY: Render
Data Flow
+------------------+ | HubSpot | | Company List | +--------+---------+ | v +------------------+ +------------------------------+ | Group by | | INDUSTRIES | | Industry ---|---+| +-- Manufacturing (12) | +------------------+ | +-- Distribution (8) | | +-- Healthcare (5) | | +-- Technology (3) | +--------------+---------------+ | +-----------+-----------+ | For Each Industry | +-----------+-----------+ | v +------------------------------+ | PERPLEXITY QUERY | | | | "Find recent M&A news in | | {industry} with focus on | | lower middle market and | | PE-backed companies. | | | | Also check for news on: | | {company_1}, {company_2}" | +--------------+---------------+ | v +------------------------------+ | MARKDOWN REPORT | | | | ## Industry News | | - [Deal Title] - Source | | * Brief summary | | | | ## Company-Specific News | | - [News Title] - Source | | * Summary mentioning co. | +--------------+---------------+ | v +------------------------------+ | EMAIL DELIVERY | | | | To: Deal team dist. list | | Subject: Weekly M&A Digest | | Body: HTML-formatted report | +------------------------------+
Process Steps
01

Fetch Company Data

Query HubSpot API for all companies in the portfolio tracking list. Extract company name, industry classification, and any relevant metadata.

02

Group by Industry

Organize companies into industry buckets. Skip "Unknown" industries. This determines how many Perplexity queries will be made.

03

Research M&A News

For each industry, query Perplexity with sonar-pro-online model. Request both general industry M&A activity and news specific to tracked companies. Rate limited with 3-second delays.

04

Generate Report

Compile responses into structured markdown. Each industry section includes tracked companies and any relevant news found. Filter out sections with no news to keep the report focused.

05

Deliver via Email

Convert markdown to HTML and send via SMTP. Distribution list configured via environment variables. Report also saved locally as industry_report.md.

Output Format
+--------------------------------------------------+ | WEEKLY M&A INDUSTRY DIGEST | +--------------------------------------------------+ | | | ## Manufacturing | | Companies: Acme Corp, Beta Industries, ... | | | | ### Recent News | | | | ## Industry News | | - PE Firm Acquires Midwest Mfg - PE Hub 12/28 | | * $150M deal for components maker | | | | ## Company-Specific News | | - Acme Corp Expansion - Trade Pub 12/26 | | * New facility, +40% production capacity | | | | ---------------------------------------------- | | | | ## Distribution | | Companies: Delta Logistics, Echo Supply, ... | | ... | | | +--------------------------------------------------+

Stack

Python HubSpot API Perplexity API SMTP Markdown Render
Weekly manual trigger or scheduled cron