Back to Financial Reporting

Integration and API Spec

The reference during the build: every tool connection, auth scope, field mapping, and error-handling rule.

4 pagesPDF · Technical
FS-DOC-05Technical

Integration and API Spec

Financial Reporting Automation

[YourCompany.com] · Finance Department · Prepared by FullSpec · [Today's Date]

This document is the authoritative technical reference for every integration point in the Financial Reporting automation. It covers tool authentication, required API scopes, webhook and trigger setup, field mappings between agents, the credential store layout, and defined error handling behaviour for every failure scenario. The FullSpec team uses this specification to build, test, and maintain all connections. No external parties or third-party developers are involved.

01Tool inventory

Tool
Role in automation
Auth method
Min plan required
Used by agents
Xero
Accounting data source: P&L, Balance Sheet, Cash Flow
OAuth 2.0 (PKCE)
Xero Starter or above
Agent 1 (Data Fetch)
HubSpot
Revenue pipeline and closed-won data source
OAuth 2.0 (private app token)
HubSpot Starter CRM or above
Agent 1 (Data Fetch)
Google Sheets
Report template and calculation layer; variance logic reads and writes here
OAuth 2.0 (service account or user OAuth)
Google Workspace (any tier) or free Google account
Agents 1, 2 (Data Fetch, Variance Analysis)
Google Drive
PDF storage and stakeholder file access
OAuth 2.0 (shared with Sheets service account)
Google Workspace (any tier) or free Google account
Agent 3 (Distribution)
Slack
Report delivery notification and headline variance summary
OAuth 2.0 (Bot Token, Slack app)
Slack Free or above
Agent 3 (Distribution)
Automation platform
Orchestration layer: schedules runs, chains agents, manages credential store and retries
Internal (platform-managed)
Standard plan ($80/month)
All agents
Before you connect anything: all API connections must be validated against sandbox or test environments before production credentials are entered. For Xero, use a demo company. For HubSpot, use a sandbox portal. For Google, use a non-production Sheets file with mirrored structure. Production credentials must not be used for initial connection testing under any circumstances.

02Per-tool integration detail

Xero

Accounting data source. The Data Fetch Agent connects to Xero via OAuth 2.0 to retrieve P&L, Balance Sheet, and Cash Flow reports for the configured reporting period. All three report types are fetched in a single authenticated session per run.

Auth method
OAuth 2.0 with PKCE. A connected app must be registered in the Xero developer portal (https://developer.xero.com/myapps). The client_id and client_secret are stored in the credential store. Refresh tokens are long-lived and must be rotated when revoked.
Required scopes
openid profile email accounting.reports.read accounting.settings.read offline_access
Trigger / webhook setup
No inbound webhook required. The automation platform polls on a time-based schedule. Xero does not send a push event for report availability; the trigger is entirely schedule-driven (cron).
Required configuration
Xero Tenant ID (organisation ID) stored in credential store, not hardcoded. Report period start and end dates derived dynamically from the run schedule. Report type codes: ProfitAndLoss, BalanceSheet, CashSummary. These are passed as query parameters to /api.xro/2.0/Reports/{ReportType}.
Rate limits
Xero enforces a limit of 60 API calls per minute per app and 5,000 calls per day. At current volume (~4 report runs/month, 3 API calls each), the automation generates approximately 12 calls per month. Throttling is not required at this volume. A single retry with 30-second backoff is sufficient for transient 429 responses.
Constraints
The connected app must remain active in the Xero developer portal. OAuth tokens expire after 30 minutes; the platform must use the refresh token automatically. If the Xero organisation is on a trial plan, the API may return a 403 for certain report types. The Tenant ID must match the live organisation, not a demo company, in production.
// Endpoint examples
GET https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate={period_start}&toDate={period_end}
GET https://api.xero.com/api.xro/2.0/Reports/BalanceSheet?date={period_end}
GET https://api.xero.com/api.xro/2.0/Reports/CashSummary?fromDate={period_start}&toDate={period_end}
// Output shape (abbreviated)
{ "Reports": [{ "ReportName": "Profit and Loss", "Rows": [ { "RowType": "Section", "Title": "Income", "Rows": [ { "RowType": "Row", "Cells": [ { "Value": "Revenue" }, { "Value": "42500.00" } ] } ] } ] }] }
HubSpot

Revenue pipeline and closed-won data source. The Data Fetch Agent calls the HubSpot Deals API to retrieve closed-won revenue totals and open pipeline value for the reporting period, providing the sales-side figures that appear alongside recognised accounting revenue in the report.

Auth method
OAuth 2.0 private app token (Bearer token). A private app is created inside the HubSpot account under Settings > Integrations > Private Apps. The generated access token is stored in the credential store. Private app tokens do not expire unless manually revoked, but should be rotated every 90 days per the security schedule.
Required scopes
crm.objects.deals.read crm.schemas.deals.read sales-email-read
Trigger / webhook setup
No inbound webhook required. The automation platform queries HubSpot on schedule after the Xero fetch completes. No HubSpot workflow subscriptions are needed for this integration.
Required configuration
HubSpot portal ID stored in credential store. Pipeline ID for the target sales pipeline stored in credential store (not hardcoded). Deal stage IDs for 'Closed Won' and relevant open stages stored in credential store. Filter parameters for close date range are derived from the run schedule at runtime.
Rate limits
HubSpot enforces 100 requests per 10 seconds and 250,000 requests per day on Starter tier. At current volume the automation makes 1 to 2 API calls per report run (4 runs/month = 8 calls/month). Throttling is not required. A single retry with 15-second backoff handles transient 429 responses.
Constraints
The private app token must have been generated by a HubSpot user with Super Admin or Sales access. If deal properties are renamed in HubSpot by an end user, the field references in the automation will break silently. The FullSpec team must be notified before any HubSpot property rename occurs in production.
// Endpoint: fetch closed-won deals for period
POST https://api.hubapi.com/crm/v3/objects/deals/search
Authorization: Bearer {HUBSPOT_PRIVATE_APP_TOKEN}
Content-Type: application/json
// Request body
{ "filters": [ { "propertyName": "dealstage", "operator": "EQ", "value": "{CLOSED_WON_STAGE_ID}" }, { "propertyName": "closedate", "operator": "BETWEEN", "value": "{period_start_ms}", "highValue": "{period_end_ms}" } ], "properties": ["dealname", "amount", "closedate", "pipeline"], "limit": 100 }
// Output shape (abbreviated)
{ "results": [ { "id": "123456", "properties": { "dealname": "Acme Corp Renewal", "amount": "12500.00", "closedate": "2024-01-31" } } ], "total": 8 }
Google Sheets

Report template and calculation layer. The Data Fetch Agent writes source figures into fixed cell references. The Variance Analysis Agent then reads those values alongside budget figures and writes the commentary block into the designated summary section. Both agents share the same OAuth credential and operate on the same spreadsheet ID.

Auth method
OAuth 2.0 via a Google Cloud service account. The service account JSON key file is stored in the credential store (never committed to source control). The target spreadsheet must be shared with the service account email address at Editor level.
Required scopes
https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.file
Trigger / webhook setup
No inbound webhook. The Sheets integration is write-only for Agent 1 and read/write for Agent 2. Agent 2 fires after Agent 1 posts a success status flag to a designated control cell (e.g. Sheet: _control, Cell: B2 = 'POPULATED'). Agent 2 polls this cell value after Agent 1 completes; it does not rely on a timed delay alone.
Required configuration
Spreadsheet ID stored in credential store. Named ranges for each data section stored in the credential store or config table, not hardcoded: xero_pl_range, xero_bs_range, xero_cf_range, hubspot_pipeline_range, variance_commentary_cell, control_status_cell. Sheet names must not be renamed without updating the config. Variance threshold value (default: 10%) stored as a configurable environment variable VARIANCE_THRESHOLD_PCT.
Rate limits
Google Sheets API allows 300 requests per minute per project and 60 requests per minute per user. The automation makes approximately 15 to 20 write requests per report run (cell-range batches). Batching via batchUpdate is required to stay well within limits. At 4 runs/month, total monthly requests are under 100. Throttling is not required.
Constraints
Cell references and named ranges must be fixed. Any structural change to the report template (inserting or deleting rows, renaming sheets) will break the automation and requires a corresponding config update. The service account must retain Editor access; removing it will cause all write operations to fail with a 403. Array formulas in the template must not reference the cells the automation writes to, as this will cause a circular dependency error.
// Write figures to named range (Agent 1)
POST https://sheets.googleapis.com/v4/spreadsheets/{SPREADSHEET_ID}/values/{xero_pl_range}:append
// Batch update multiple ranges
POST https://sheets.googleapis.com/v4/spreadsheets/{SPREADSHEET_ID}/values:batchUpdate
// Read variance data (Agent 2)
GET https://sheets.googleapis.com/v4/spreadsheets/{SPREADSHEET_ID}/values/{variance_input_range}
// Write commentary (Agent 2)
PUT https://sheets.googleapis.com/v4/spreadsheets/{SPREADSHEET_ID}/values/{variance_commentary_cell}
// Set control flag after population complete
PUT https://sheets.googleapis.com/v4/spreadsheets/{SPREADSHEET_ID}/values/_control!B2
Integration and API SpecPage 1 of 3
FS-DOC-05Technical
Google Drive

PDF export destination and stakeholder file access layer. The Distribution Agent exports the completed Google Sheet as a PDF and saves it to a specified folder in Google Drive, named with the report period and type. The Slack notification includes the public or shared Drive link to this file.

Auth method
OAuth 2.0 via the same Google Cloud service account used for Sheets. No additional credentials are required if the service account already holds drive.file scope. The target Drive folder must be shared with the service account at Editor level.
Required scopes
https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.metadata.readonly
Trigger / webhook setup
No inbound webhook. The Drive export is triggered by the orchestration layer after the finance manager approval gate is passed (or after the review window lapses without rejection). The export is performed via the Google Drive export endpoint, which converts the Sheets file to PDF server-side.
Required configuration
Target Google Drive folder ID stored in credential store as GDRIVE_REPORT_FOLDER_ID. File naming convention defined as an environment variable: REPORT_FILENAME_PATTERN (e.g. '{report_type}_{period_label}_{YYYY-MM-DD}.pdf'). Sharing permissions for the output file (view-only link or restricted to specific users) configured in the credential store as GDRIVE_SHARE_MODE.
Rate limits
Google Drive API allows 1,000 requests per 100 seconds per user. The automation makes 1 to 2 Drive API calls per report run. At 4 runs/month the volume is negligible. Throttling is not required.
Constraints
The export endpoint converts the spreadsheet as rendered, including all visible sheets. If the report template contains sheets not intended for stakeholder distribution, they must be hidden before the export step fires. The folder ID must remain stable; if the Drive folder is moved or deleted, the export step will fail with a 404.
// Export Sheets file as PDF to Drive
GET https://www.googleapis.com/drive/v3/files/{SPREADSHEET_ID}/export?mimeType=application/pdf
// Upload PDF to target folder
POST https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart
// Metadata body
{ "name": "{REPORT_FILENAME}", "parents": ["{GDRIVE_REPORT_FOLDER_ID}"], "mimeType": "application/pdf" }
// Set file sharing permission
POST https://www.googleapis.com/drive/v3/files/{FILE_ID}/permissions
{ "role": "reader", "type": "anyone" }  // or 'domain' depending on GDRIVE_SHARE_MODE
Slack

Report delivery channel. The Distribution Agent posts a structured message to the configured finance Slack channel containing the Google Drive file link, report period label, and a plain-language summary of the key variance points generated by the Variance Analysis Agent.

Auth method
OAuth 2.0 Bot Token. A Slack app is created at api.slack.com/apps and installed to the target workspace. The bot token (xoxb-...) is stored in the credential store as SLACK_BOT_TOKEN. The app must be invited to the target channel before it can post.
Required scopes
chat:write chat:write.public files:write channels:read groups:read
Trigger / webhook setup
Outbound only. The automation posts via the Slack Web API (chat.postMessage). No incoming webhook or Slack event subscription is required for the current distribution use case. If an approval-via-Slack interaction is added in future, interactive components and the events API would need to be configured separately.
Required configuration
Target channel ID stored in credential store as SLACK_FINANCE_CHANNEL_ID (use channel ID not channel name, as names can change). Message template structure stored as an environment variable or inline block kit JSON template. The Slack app must be installed to the workspace and the bot invited to the channel before the first production run.
Rate limits
Slack enforces a Tier 3 rate limit of 50 requests per minute for chat.postMessage. The automation sends 1 message per report run. At 4 runs/month, throttling is not required. A single retry with 10-second backoff handles transient rate limit responses.
Constraints
The bot token must not be regenerated without updating the credential store immediately. If the target channel is archived or the bot is removed from it, the post will fail with a channel_not_found or not_in_channel error. The message payload must not exceed 3,000 characters for the text field; the variance commentary block must be truncated or linked externally if it exceeds this limit.
// Post report notification message
POST https://slack.com/api/chat.postMessage
Authorization: Bearer {SLACK_BOT_TOKEN}
Content-Type: application/json
// Request body
{ "channel": "{SLACK_FINANCE_CHANNEL_ID}", "text": "Financial report ready: {report_type} for {period_label}", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "*{report_type} Report - {period_label}*\n{variance_summary_text}" } }, { "type": "actions", "elements": [ { "type": "button", "text": { "type": "plain_text", "text": "Open Report" }, "url": "{gdrive_file_url}" } ] } ] }

03Field mappings between tools

The following tables define the exact field-level mappings for each agent handoff in the workflow. All field names are shown in monospace as they appear in the API response or sheet reference. These mappings must be implemented exactly as specified; any deviation requires a corresponding update to this document.

Handoff 1: Xero to Google Sheets (Data Fetch Agent, financial figures)

Source tool
Source field
Destination tool
Destination field
Xero
Reports[0].Rows[?(@.Title=='Income')].Rows[*].Cells[1].Value
Google Sheets
xero_pl_range!C{row} (Revenue rows)
Xero
Reports[0].Rows[?(@.Title=='Less Operating Expenses')].Rows[*].Cells[1].Value
Google Sheets
xero_pl_range!C{row} (Expense rows)
Xero
Reports[0].Rows[?(@.RowType=='SummaryRow')].Cells[1].Value (P&L net)
Google Sheets
xero_pl_range!C_net_total
Xero
Reports[0].Rows[*].Cells[1].Value (Balance Sheet assets)
Google Sheets
xero_bs_range!C{row}
Xero
Reports[0].Rows[*].Cells[1].Value (Balance Sheet liabilities)
Google Sheets
xero_bs_range!D{row}
Xero
Reports[0].Rows[*].Cells[1].Value (Cash inflows)
Google Sheets
xero_cf_range!C{row}
Xero
Reports[0].Rows[*].Cells[2].Value (Cash outflows)
Google Sheets
xero_cf_range!D{row}

Handoff 2: HubSpot to Google Sheets (Data Fetch Agent, pipeline figures)

Source tool
Source field
Destination tool
Destination field
HubSpot
results[*].properties.amount (Closed Won, summed)
Google Sheets
hubspot_pipeline_range!C_closed_won_total
HubSpot
total (count of closed-won deals)
Google Sheets
hubspot_pipeline_range!C_closed_won_count
HubSpot
results[*].properties.amount (Open pipeline, summed)
Google Sheets
hubspot_pipeline_range!C_open_pipeline_value
HubSpot
results[*].properties.closedate (latest close date in period)
Google Sheets
hubspot_pipeline_range!C_last_close_date

Handoff 3: Google Sheets to Google Sheets (Variance Analysis Agent, commentary output)

Source tool
Source field
Destination tool
Destination field
Google Sheets
xero_pl_range!C{row} (actuals)
Google Sheets
variance_working_range!B{row} (actual column)
Google Sheets
budget_range!C{row} (budget figures)
Google Sheets
variance_working_range!C{row} (budget column)
Google Sheets
variance_working_range!D{row} (computed % variance)
Google Sheets
variance_flags_range!A{row} (flag if > VARIANCE_THRESHOLD_PCT)
Google Sheets
variance_flags_range!A{row} (flagged line item label + variance %)
Google Sheets
variance_commentary_cell (plain-text commentary block)

Handoff 4: Google Drive to Slack (Distribution Agent, file link delivery)

Source tool
Source field
Destination tool
Destination field
Google Drive
files[0].webViewLink (shareable file URL)
Slack
blocks[1].elements[0].url (button link)
Google Drive
files[0].name (filename with period label)
Slack
blocks[0].text.text (report title line)
Google Sheets
variance_commentary_cell (summary text, truncated to 800 chars)
Slack
blocks[0].text.text (variance summary body)
Integration and API SpecPage 2 of 3
FS-DOC-05Technical

04Build stack and orchestration

Orchestration layout
One workflow per agent (3 workflows total: Data Fetch, Variance Analysis, Distribution). Workflows are chained via completion events, not time delays. A shared credential store holds all API keys, tokens, IDs, and config values. No credentials appear in workflow logic nodes.
Agent 1 trigger: Data Fetch Agent
Schedule-based (cron). Fires at a configured time on the first working day after each reporting period closes (e.g. 06:00 on the first Monday of each month for the monthly P&L pack; 06:00 every Monday for the weekly flash report). No inbound webhook. Cron expression is stored as a configurable environment variable FETCH_CRON_EXPRESSION.
Agent 2 trigger: Variance Analysis Agent
Event-based poll. After Agent 1 completes, it writes 'POPULATED' to the control cell (_control!B2) in the report spreadsheet. Agent 2 polls this cell value immediately after Agent 1 posts its success event to the orchestration layer. Agent 2 does not fire on a time schedule; it is a downstream step in the Agent 1 workflow chain.
Agent 3 trigger: Distribution Agent
Approval gate event. The orchestration layer inserts a human-in-the-loop pause after Agent 2 completes. The finance manager is notified via a direct Slack message (separate from the final distribution message) with an approve or reject action. If no response is received within the configured review window (default: 4 business hours, stored as REVIEW_WINDOW_HOURS), the Distribution Agent fires automatically. An explicit rejection cancels the run and logs the outcome.
Signature validation
Not applicable for the current trigger mechanisms (all outbound API calls and cron-based triggers). If inbound webhooks are added in future (e.g. a Slack interactive component for the approval gate), Slack request signatures must be validated using the SLACK_SIGNING_SECRET before any payload is processed.
Credential store
All secrets and configuration IDs are stored in the automation platform's native encrypted credential store. No values are hardcoded in workflow nodes, scripts, or version-controlled files. See the code block below for the full credential store contents.
All values in angle brackets must be replaced with real values before the first production run. Never commit this file to version control.
// Credential store contents — Financial Reporting Automation
// Xero
XERO_CLIENT_ID              = '<registered app client ID>'
XERO_CLIENT_SECRET          = '<registered app client secret>'
XERO_TENANT_ID              = '<organisation/tenant ID from Xero>'
XERO_REFRESH_TOKEN          = '<long-lived OAuth refresh token>'

// HubSpot
HUBSPOT_PRIVATE_APP_TOKEN   = '<xoxb-style private app token>'
HUBSPOT_PORTAL_ID           = '<HubSpot account/portal ID>'
HUBSPOT_PIPELINE_ID         = '<target sales pipeline ID>'
HUBSPOT_CLOSED_WON_STAGE_ID = '<deal stage ID for Closed Won>'

// Google (shared service account)
GOOGLE_SERVICE_ACCOUNT_JSON = '<service account key JSON, base64-encoded>'
SPREADSHEET_ID              = '<Google Sheets report template file ID>'
GDRIVE_REPORT_FOLDER_ID     = '<target Drive folder ID for PDF exports>'
GDRIVE_SHARE_MODE           = 'anyone_reader | domain_reader | restricted'

// Slack
SLACK_BOT_TOKEN             = '<xoxb-... bot OAuth token>'
SLACK_FINANCE_CHANNEL_ID    = '<channel ID, not channel name>'
SLACK_SIGNING_SECRET        = '<app signing secret, for future webhook validation>'

// Named ranges (Google Sheets)
RANGE_XERO_PL               = 'PL_Data!B4:D60'
RANGE_XERO_BS               = 'BS_Data!B4:D40'
RANGE_XERO_CF               = 'CF_Data!B4:D30'
RANGE_HUBSPOT_PIPELINE      = 'Pipeline_Data!B4:D8'
RANGE_BUDGET                = 'Budget!B4:B60'
RANGE_VARIANCE_WORKING      = 'Variance_Working!A4:E60'
RANGE_VARIANCE_FLAGS        = 'Variance_Flags!A4:C60'
CELL_VARIANCE_COMMENTARY    = 'Summary!B22'
CELL_CONTROL_STATUS         = '_control!B2'

// Config
FETCH_CRON_EXPRESSION       = '0 6 * * 1'  // Every Monday 06:00 UTC (weekly flash)
FETCH_CRON_MONTHLY          = '0 6 1 * *'  // First of month 06:00 UTC (monthly pack)
VARIANCE_THRESHOLD_PCT      = '10'         // Percentage, integer, no symbol
REVIEW_WINDOW_HOURS         = '4'          // Business hours before auto-approve
REPORT_FILENAME_PATTERN     = '{report_type}_{period_label}_{run_date}.pdf'
Token rotation schedule: XERO_REFRESH_TOKEN should be monitored for revocation events and refreshed immediately if the Xero connected app is modified. HUBSPOT_PRIVATE_APP_TOKEN must be rotated every 90 days. GOOGLE_SERVICE_ACCOUNT_JSON key should be rotated every 180 days. SLACK_BOT_TOKEN is valid until manually revoked; rotate on any suspected compromise. All rotations must be applied to the credential store before the old token is revoked to avoid a gap in service.

05Error handling and retry logic

Every integration point has a defined failure behaviour. Unhandled exceptions must never fail silently. All errors must be logged to the automation platform's run log with the timestamp, agent name, integration name, HTTP status code or error type, and the raw error message. Where a human fallback is required, a Slack alert must be sent to the SLACK_FINANCE_CHANNEL_ID (or a designated ops channel) immediately.

Integration
Scenario
Required behaviour
Xero API
401 Unauthorized (expired or revoked token)
Attempt one token refresh using XERO_REFRESH_TOKEN. If refresh succeeds, retry the request immediately. If refresh fails, halt the run, log the error, and send a Slack alert to the ops channel: 'Xero authentication failed. Manual token re-authorisation required.' Do not proceed to the Sheets write step.
Xero API
429 Too Many Requests (rate limit hit)
Wait 30 seconds, then retry the failed request up to 3 times with exponential backoff (30s, 60s, 120s). If all retries fail, halt the run and send a Slack alert. Log the rate limit hit and retry count.
Xero API
Report data missing or empty response for a report type
If the API returns an empty Rows array or a 200 with no usable data, do not write blank values to the sheet. Halt the run, log the specific report type that returned empty, and send a Slack alert: 'Xero returned no data for {report_type} for period {period_label}. Check Xero connectivity and period settings.'
HubSpot API
401 Unauthorized (invalid or revoked private app token)
Halt the run immediately. Log the error. Send a Slack alert: 'HubSpot authentication failed. Rotate HUBSPOT_PRIVATE_APP_TOKEN and update the credential store.' Do not proceed to the Sheets write step.
HubSpot API
429 Too Many Requests
Wait 15 seconds, retry up to 3 times with exponential backoff (15s, 30s, 60s). If all retries fail, halt the run and alert. Log the pipeline ID and filter parameters used in the failed request.
Google Sheets API
403 Forbidden (service account lost Editor access)
Halt the run. Log the spreadsheet ID and the specific range operation that failed. Send a Slack alert: 'Google Sheets write failed. Service account may have lost access to spreadsheet {SPREADSHEET_ID}. Check sharing permissions.' Do not write partial data.
Google Sheets API
Write partial failure (some ranges written, others not)
If a batchUpdate partially fails, roll back by clearing all ranges written in the current run using a clear operation, then halt and alert. Partial data in the report template is worse than no data. Log which ranges succeeded and which failed.
Google Sheets API
Control cell not updated by Agent 1 within 5 minutes
Agent 2 polls the control cell for up to 5 minutes after Agent 1 signals completion. If the cell value is not 'POPULATED' within this window, Agent 2 halts and sends a Slack alert: 'Variance Analysis Agent could not confirm sheet population. Agent 1 may have failed silently. Check run log.'
Google Drive API
404 Not Found (target folder deleted or moved)
Halt the Distribution Agent. Log the folder ID. Send a Slack alert: 'Google Drive export failed. Folder {GDRIVE_REPORT_FOLDER_ID} not found. Update GDRIVE_REPORT_FOLDER_ID in the credential store.' Do not attempt to create a new folder automatically.
Google Drive API
PDF export returns an empty or zero-byte file
Do not upload the file to Drive. Halt and alert: 'PDF export produced an empty file for {report_type} {period_label}. Check the Sheets template for hidden errors before retrying.' Log the file size returned.
Slack API
channel_not_found or not_in_channel error
Halt the Slack post step. Log the channel ID used. Send a fallback alert to the platform's internal error log and attempt to post to a hardcoded fallback channel ID (SLACK_FALLBACK_CHANNEL_ID stored in credential store) with the message: 'Distribution post failed for {report_type}. Finance channel unreachable. Manual distribution required.' Do not silently drop the notification.
Approval gate
Finance manager does not respond within REVIEW_WINDOW_HOURS
Auto-approve after the review window lapses. Log the auto-approval with timestamp. Include a note in the Slack distribution message: 'Auto-approved after review window. No response was recorded.' If the finance manager had previously rejected a run within the same cycle, the auto-approve must not override that rejection: check for a rejection flag before auto-approving.
All error alerts sent to Slack must include: the agent name, the integration that failed, the error code or message, the report type and period label for the current run, and a link to the run log in the automation platform. This ensures the finance manager or ops lead has enough context to act without needing to log in to the platform first. Contact the FullSpec team at support@gofullspec.com for any escalation beyond the defined retry behaviour.
Integration and API SpecPage 3 of 3

More documents for this process

Every document generated for Financial Reporting.

Launch Plan
Operations · Owner
View
ROI and Business Case
Finance · Owner
View
Process Runbook / SOP
Operations · Owner
View
Developer Handover Pack
Technical · Developer
View
Test and QA Plan
Quality · Developer
View