Quick overview
This workflow runs daily or via an on-demand webhook to pull financial metrics, operational KPIs, and market quotes via HTTP APIs, then uses OpenAI to detect anomalies and generate an executive briefing that is POSTed to a dashboard endpoint and logged to Google Sheets.
How it works
- Runs on a daily schedule or receives a POST request via a webhook to start an executive briefing run with a configurable lookback period.
- Fetches financial metrics, operational KPIs, and market data in parallel from three HTTP API endpoints and continues even if one source fails.
- Merges and normalizes the three datasets into a single snapshot, marking missing sources as unavailable so downstream steps keep a consistent structure.
- Uses OpenAI to analyze the snapshot for anomalies, unusual trends, and data gaps, returning a severity-scored findings JSON.
- Uses OpenAI again to turn the anomaly findings and raw metrics into a structured executive briefing with a health score, risks, opportunities, and recommended actions.
- Formats a final JSON payload and delivers it by POSTing to your dashboard endpoint and appending a summary row to a Google Sheets tracker.
- If the run was triggered by the webhook, returns the full briefing JSON as the webhook response.
Setup
- Add OpenAI API credentials (GPT-4.1) for both OpenAI chat model steps.
- Configure HTTP Header Auth credentials and replace the YOUR_FINANCE_API and YOUR_OPERATIONS_API URLs with your internal finance and operations endpoints.
- Replace the market data URL placeholders (YOUR_MARKET_DATA_PROVIDER, YOUR_TICKER, and YOUR_MARKET_DATA_API_KEY) with your market data provider settings.
- Set YOUR_DASHBOARD_ENDPOINT_URL to the endpoint that accepts the briefing JSON via HTTP POST.
- Add Google Sheets OAuth2 credentials, replace YOUR_SHEET_ID, and ensure the ExecutiveBriefings sheet/tab exists with the expected columns for appended rows.
- Update the cron schedule (default 07:00 daily) and copy the webhook URL into any system that should request on-demand briefings.