Quick overview
This workflow runs every weekday at 7 AM to pull financial data from Google Sheets, calculate KPIs, generate an executive briefing with OpenAI (GPT-4o-mini), save the report to Notion, and send it to Telegram, with a Slack alert on any workflow error.
How it works
- Runs on a weekday schedule trigger at 7 AM.
- Fetches the latest rows from five Google Sheets tabs: CashFlow, Revenue, Payroll, Subscriptions, and Expenses.
- Combines the sheet data and calculates key KPIs (totals, percentage changes, cash runway, and status labels).
- Sends the KPI summary to OpenAI (GPT-4o-mini) to generate a Telegram-formatted executive financial briefing.
- Saves the AI-generated briefing to a Notion database page and sends the same briefing to a Telegram chat.
- Checks whether revenue is down more than 10% and, if so, sends a separate critical alert message to Telegram.
- If any node fails during execution, posts an error alert to a Slack channel.
Setup
- Add Google Sheets OAuth2 credentials and replace the placeholder spreadsheet ID and sheet selections in all five Google Sheets nodes.
- Add an OpenAI API credential for the GPT-4o-mini model used by the AI agent.
- Add Notion credentials and set your Notion database ID where the CFO report pages are created.
- Add Telegram bot credentials and set the target chat ID for both Telegram messages.
- Add Slack OAuth2 credentials and choose the channel that should receive workflow error alerts.