Quick Overview
This workflow runs every morning, reads a renewals register from Google Sheets, calculates time-to-expiry and notice deadlines, uses Google Gemini to draft a short owner briefing, then sends Gmail alerts based on urgency and posts urgent items to Slack while stamping the row to prevent repeat alerts.
How it works
- Runs daily at 08:00 on a schedule trigger.
- Reads the “Renewals” register from Google Sheets.
- Calculates days until expiry, computes the notice-period deadline, assigns an urgency stage (90/30/7-day windows), and skips items already alerted at the same stage.
- Uses Google Gemini to generate a concise renewal briefing with the decision required, deadline, next steps, and appropriate urgency.
- Sends the briefing to the item owner via Gmail with a subject line matching the urgency window.
- For urgent items, also posts key details to a selected Slack channel.
- Updates the Google Sheets row with the latest alert stage so the same reminder does not repeat.
Setup
- Connect credentials for Google Sheets, Google Gemini (PaLM) API, Gmail, and Slack.
- Create a Google Sheets workbook with a “Renewals” sheet and columns like Item, Type, Vendor, Expiry Date, Annual Cost, Owner (email), Notice Period Days, and Last Alert Stage.
- Select the target spreadsheet and “Renewals” sheet in both Google Sheets steps and map the update so it writes the current alert stage back to the correct row.
- Choose the Slack channel to notify for urgent renewals (for example, #operations).