Back to Templates

Send AI-powered Slack briefings with Google Workspace and Gemini

Created by

Created by: Ravi Patel || ravipatel7210
Ravi Patel

Last update

Last update 8 hours ago

Categories

Share


Quick overview

This workflow connects Slack with Google Workspace, Cal.com, OpenWeather, and Google Gemini to act as a Slack-based assistant for Gmail, Calendar, Docs, Sheets, Drive, and Contacts, and to post an automated morning briefing with today’s schedule, unread emails, upcoming bookings, and local weather.

How it works

  1. Triggers when a Slack event is received, extracts the user’s message and context, and uses a Google Gemini-powered agent with conversation memory to interpret the request.
  2. Depending on the user’s intent, the agent searches or sends Gmail messages, reads or creates Google Calendar events, creates or fetches Google Docs, reads or appends/updates Google Sheets rows, searches Google Drive, and looks up Google Contacts.
  3. For scheduling requests, the agent queries Cal.com for available slots and can create a Cal.com booking using the provided attendee and event details.
  4. Posts the agent’s final response back to Slack in the same channel and thread.
  5. Runs every weekday and Saturday morning on a cron schedule to prepare a daily briefing for the current day in the Asia/Kolkata timezone.
  6. Collects today’s Google Calendar events, up to 15 recent unread Gmail messages, upcoming Cal.com bookings, and current weather in Ahmedabad from OpenWeather.
  7. Summarizes the collected data, asks Google Gemini to generate a prioritized morning briefing, and posts both a concise briefing and a detailed breakdown to a configured Slack channel.

Setup

  1. Connect Slack OAuth2 credentials, configure Slack Event Subscriptions for the Slack Trigger in your Slack app, and ensure the workflow can post messages to your target channel.
  2. Add Google Workspace OAuth2 credentials for Gmail, Google Calendar, Google Docs, Google Sheets, Google Drive, and Google Contacts used by the assistant tools.
  3. Add a Google Gemini credential (or Google AI Studio/Vertex AI configuration as required by your n8n Gemini node) for both the assistant agent and the briefing agent.
  4. Add a Cal.com API key (HTTP Header Auth credential) and provide the Cal.com event type ID and booking details when requesting availability or creating bookings.
  5. Set the OPENWEATHER_API_KEY environment variable in n8n and update the OpenWeather city query if you want a location other than Ahmedabad.
  6. Replace REPLACE_WITH_SLACK_CHANNEL_ID in both morning-briefing Slack nodes with the channel ID where the briefing and detailed breakdown should be posted.