Pick the CRM source + confirm metrics
10 minThe script ships with HubSpot wiring out of the box. Salesforce and Pipedrive are supported via small swaps in get_pipeline_metrics(). Beyond CRM, the operator decides which financial and operational metrics live in weekly_metrics.json: revenue MTD, cash balance, burn rate, headcount, customer count, NPS, support tickets, anything they track weekly.
- HubSpot: open Settings, Integrations, Private Apps. Create an app with crm.objects.deals.read. Copy the token.
- Salesforce: get an OAuth access token. The Setup guide notes the SOQL swap in get_pipeline_metrics().
- Pipedrive: get an API key. The Setup guide notes the GET /api/v1/deals swap.
- Decide which metrics belong in weekly_metrics.json. Common: revenue_mtd, cash_balance, headcount, customer_count, notes. Add or remove fields based on what the operator actually tracks.
- HubSpot pipeline of 0 usually means deal.amount is blank or deal stages don't match closedwon/closedlost. Check Settings, CRM, Deal Stages and adjust the filter values.
- If closedate filter returns nothing, check property type via GET /crm/v3/properties/deals/closedate. If fieldType is date not datetime, switch the filter to week_start.strftime('%Y-%m-%d').