Quick overview
This workflow runs weekly to audit SaaS seats listed in Google Sheets, fetches last-activity data from Google Workspace, Slack, Zoom, or a generic usage API, uses OpenAI (gpt-4o-mini) to decide whether seats are unused, and cancels seats directly or after Slack approval while logging outcomes.
How it works
- Runs on a weekly schedule trigger.
- Reads the subscription seat inventory from a Google Sheets “Subscriptions” tab and processes seats one by one.
- For each seat, calls the relevant usage endpoint (Google Workspace Admin API, Slack API, Zoom API, or a custom SaaS API) to retrieve recent activity details.
- Normalizes the returned usage data into a consistent format and sends it to OpenAI (gpt-4o-mini) to classify the seat as unused or active with a recommended action.
- Cancels unused low-cost seats immediately, and posts unused high-cost seats to Slack for approval before proceeding.
- Logs each decision (kept, cancelled, or rejected) to a Google Sheets “Audit Log” tab.
- After all seats are processed, posts a completion summary to Slack and sends a Slack alert if the workflow errors.
Setup
- Add Google Sheets OAuth2 credentials, create a spreadsheet with “Subscriptions” and “Audit Log” tabs, and replace YOUR_GOOGLE_SHEET_ID in all Google Sheets nodes.
- Add an OpenAI API credential for the GPT-4o-mini assessment step.
- Add Slack OAuth2 credentials and set the target channel for approval requests, summaries, and failure alerts (replace YOUR_SLACK_CHANNEL_ID where used).
- Configure authentication and any required fields for the platform usage calls (Google Workspace Admin, Slack, Zoom, and your generic SaaS usage endpoint URL).
- Configure authentication for the cancellation HTTP request (header auth) and adjust the “high-cost” threshold value (default is $50/month per seat) to match your policy.