Global AI Network

Calendar Gap Finder AI Automation

Automatically discover free time between calendar events and get AI-powered recommendations for nearby activities based on weather, travel time, and your Notion preferences via Slack.

5+
Total Deployments
15 min
Setup Time
v1.0
Version

Need Help Getting Started? Our AI Specialists Will Set It Up For Free

1-Click Deployment 5-Min Setup Free Expert Support
Technology Partners

Required Integrations

This agent works seamlessly with these platforms to deliver powerful automation.

Google Calendar

Google Calendar

Create, read, update, and delete Google Calendar events

Notion

Notion

All-in-one workspace for content and collaboration with powerful database and pa...

OpenAI

OpenAI

Leverage OpenAI's powerful language models to generate text, answer questions, a...

Slack

Slack

Send messages, manage channels, and automate workflows in Slack workspaces

Step by Step

Setup Tutorial

mission-briefing.md

What This Agent Does

This intelligent Gap Time Concierge workflow transforms those awkward time gaps between meetings into productive, enjoyable micro-experiences. Every 30 minutes, it automatically checks your calendar for upcoming appointments, calculates available free time, retrieves weather conditions at your destination, and uses AI to suggest personalized activities—whether you have 20 minutes or 2 hours to spare. Instead of scrolling through your phone or arriving too early, you'll receive curated recommendations for nearby cafes, parks, coworking spaces, or activities perfectly matched to your preferences and the current weather.

Key benefits include:

  • Eliminates decision fatigue by automatically suggesting activities during unexpected free time
  • Saves 15-30 minutes per day that would otherwise be wasted on indecision or early arrivals
  • Maximizes productivity and wellness by matching activities to your mood, weather, and available time
  • Reduces stress through proactive planning rather than reactive scrambling

Perfect for: Busy professionals with back-to-back meetings, sales representatives traveling between appointments, consultants working across multiple client sites, or anyone who wants to make the most of their time between commitments.

Who Is It For

This workflow is designed for time-conscious professionals who:

  • Have variable schedules with meetings at different locations throughout the day
  • Want to optimize small pockets of free time (15 minutes to 2 hours) between commitments
  • Prefer personalized recommendations over generic search results
  • Use Google Calendar for scheduling and Slack for team communication
  • Track preferences, favorite locations, or personal goals in Notion
  • Value work-life balance and want to incorporate wellness activities into busy days

Whether you're a consultant, sales professional, freelancer, executive, or remote worker who hot-desks across the city, this agent acts as your personal time optimization assistant.

Required Integrations

Notion

Why it's needed: Stores your personal preferences, favorite activity types, dietary restrictions, work styles, and location preferences that inform the AI's recommendations.

Setup steps:

  1. Create a Notion account at notion.so if you don't already have one
  2. Set up a "User Preferences" database with properties like:
    • Activity Types (multi-select: Coffee, Exercise, Reading, Networking, etc.)
    • Dietary Preferences (text)
    • Work Style (select: Focused, Social, Flexible)
    • Favorite Locations (text)
  3. Create a Notion integration:
    • Go to Settings & Members → Connections → Develop or manage integrations
    • Click "New integration" and name it "TaskAGI Gap Time"
    • Copy the Internal Integration Token (starts with secret_)
  4. Share your database with the integration:
    • Open your User Preferences database
    • Click the "..." menu → Add connections → Select your integration
  5. In TaskAGI, navigate to Integrations → Add Integration → Notion
  6. Paste your Integration Token and save
  7. Copy your Database ID from the URL (the 32-character code after your workspace name and before the question mark)

Google Calendar

Why it's needed: Retrieves your upcoming calendar events to identify gaps in your schedule and destination locations.

Setup steps:

  1. Ensure you have a Google account with Google Calendar enabled
  2. In TaskAGI, go to Integrations → Add Integration → Google Calendar
  3. Click "Connect Google Account" which opens OAuth authorization
  4. Sign in to your Google account and grant permissions:
    • View events on all your calendars
    • View your calendars
  5. Select which calendar(s) to monitor (typically your primary calendar)
  6. The integration will automatically refresh tokens as needed
  7. Test the connection by clicking "Test Integration" in TaskAGI

Configuration tip: Ensure your calendar events include location information in the "Where" field for accurate travel time and weather calculations.

OpenAI

Why it's needed: Powers the AI recommendations engine that analyzes your preferences, available time, weather conditions, and nearby options to generate personalized activity suggestions.

Setup steps:

  1. Create an OpenAI account at platform.openai.com
  2. Add payment method:
    • Navigate to Settings → Billing
    • Add a credit card (API usage is pay-as-you-go)
    • Set up usage limits to control costs (recommended: $10-20/month for this workflow)
  3. Generate an API key:
    • Go to API Keys section
    • Click "Create new secret key"
    • Name it "TaskAGI Gap Time Concierge"
    • Copy the key immediately (starts with sk-) – you won't see it again
  4. In TaskAGI, navigate to Integrations → Add Integration → OpenAI
  5. Paste your API Key and save
  6. Select the model: This workflow uses gpt-4o-mini for cost-effective, fast responses

Cost estimate: With 30-minute checks and typical usage, expect $3-8/month in API costs.

Slack

Why it's needed: Delivers your personalized activity recommendations directly to you via Slack message, ensuring you see suggestions in real-time.

Setup steps:

  1. Ensure you have Slack workspace access (or create a free workspace at slack.com)
  2. In TaskAGI, go to Integrations → Add Integration → Slack
  3. Click "Connect Slack Workspace" to begin OAuth flow
  4. Select your workspace and authorize TaskAGI
  5. Grant permissions:
    • Send messages as TaskAGI
    • View basic workspace information
    • Access public channels
  6. Choose notification destination:
    • Direct message to yourself (recommended for privacy)
    • Specific channel (e.g., #personal-assistant)
  7. Copy your User ID or Channel ID for workflow configuration
    • Find your User ID: Click your profile → More → Copy member ID
    • Find Channel ID: Right-click channel → View channel details → Copy ID

Configuration Steps

1. Schedule Trigger Configuration

The Schedule (Every 30 min) node initiates the workflow automatically.

  • Set Interval to 30 and Unit to minutes
  • Timezone: Select your local timezone for accurate scheduling
  • Active hours (optional): Configure to run only during work hours (e.g., 7 AM - 8 PM) to avoid unnecessary checks

2. Configuration Node Setup

The Configuration node stores key settings used throughout the workflow.

Add these configuration values:

{
  "lookAheadMinutes": 120,
  "minimumGapMinutes": 15,
  "travelBufferMinutes": 10,
  "searchRadius": 2000,
  "weatherApiKey": "YOUR_OPENWEATHER_API_KEY",
  "googleMapsApiKey": "YOUR_GOOGLE_MAPS_API_KEY"
}

Parameter explanations:

  • lookAheadMinutes: How far ahead to check for next appointment (120 = 2 hours)
  • minimumGapMinutes: Smallest gap worth suggesting activities for (15 minutes minimum)
  • travelBufferMinutes: Extra time buffer for getting to next location
  • searchRadius: Search area in meters around your current/next location (2000m = 2km)

API Keys needed:

  • OpenWeather API: Sign up free at openweathermap.org/api (2.5 API, free tier includes 1000 calls/day)
  • Google Maps API: Enable at console.cloud.google.com (Distance Matrix API and Places API)

3. Get User Preferences Configuration

Configure the Get User Preferences Notion node:

  • Database ID: Paste your User Preferences database ID from Notion
  • Filter (optional): Add filter to retrieve only your preferences if database is shared
  • Properties to retrieve: Select all relevant properties (Activity Types, Dietary Preferences, etc.)

4. Get Next Calendar Event Configuration

Configure the Get Next Calendar Event Google Calendar node:

  • Calendar ID: Use primary for your main calendar or specific calendar ID
  • Time Min: Use expression {{new Date().toISOString()}} for current time
  • Time Max: Use expression {{new Date(Date.now() + $node["Configuration"].json.lookAheadMinutes * 60000).toISOString()}}
  • Max Results: 1 (we only need the next event)
  • Order By: startTime
  • Single Events: true (expand recurring events)

5. Weather and Travel Time Configuration

Get Weather at Destination HTTP Request node:

  • Method: GET
  • URL: https://api.openweathermap.org/data/2.5/weather?lat={{$node["Get Next Calendar Event"].json.location.lat}}&lon={{$node["Get Next Calendar Event"].json.location.lon}}&appid={{$node["Configuration"].json.weatherApiKey}}&units=metric
  • Authentication: None (API key in URL)

Get Travel Time HTTP Request node:

  • Method: GET
  • URL: https://maps.googleapis.com/maps/api/distancematrix/json?origins={{$node["Get Next Calendar Event"].json.location.lat}},{{$node["Get Next Calendar Event"].json.location.lon}}&destinations={{$node["Get Next Calendar Event"].json.location.lat}},{{$node["Get Next Calendar Event"].json.location.lon}}&key={{$node["Configuration"].json.googleMapsApiKey}}

6. Calculate Gap Time Function

Configure the Calculate Gap Time function node with this code:

const now = new Date();
const nextEventStart = new Date($node["Get Next Calendar Event"].json.start.dateTime);
const travelMinutes = $node["Get Travel Time"].json.rows[0].elements[0].duration.value / 60;
const bufferMinutes = $node["Configuration"].json.travelBufferMinutes;

const availableMinutes = (nextEventStart - now) / 60000 - travelMinutes - bufferMinutes;

return {
  json: {
    availableMinutes: Math.floor(availableMinutes),
    nextEventTime: nextEventStart.toISOString(),
    travelMinutes: Math.floor(travelMinutes),
    hasGap: availableMinutes >= $node["Configuration"].json.minimumGapMinutes
  }
};

7. Conditional Logic Configuration

Has Sufficient Gap Time? condition node:

  • Condition Type: Boolean
  • Value 1: {{$node["Calculate Gap Time"].json.hasGap}}
  • Operation: equals
  • Value 2: true

8. Weather Routing Switch

Route by Weather switch node:

Configure cases:

  • Case 1 (Sunny/Clear): {{$node["Get Weather at Destination"].json.weather[0].main}} equals Clear
  • Case 2 (Rainy): {{$node["Get Weather at Destination"].json.weather[0].main}} equals Rain
  • Default: Routes to indoor search for all other conditions

9. Location Search Configuration

Search Indoor Spots and Search Outdoor Spots HTTP Request nodes:

  • Method: GET
  • URL: https://maps.googleapis.com/maps/api/place/nearbysearch/json?location={{$node["Get Next Calendar Event"].json.location.lat}},{{$node["Get Next Calendar Event"].json.location.lon}}&radius={{$node["Configuration"].json.searchRadius}}&type=cafe|library|coworking_space&key={{$node["Configuration"].json.googleMapsApiKey}}
  • Adjust type parameter for outdoor spots: park|gym|walking_area

10. AI Recommendations Configuration

AI Recommendations OpenAI node:

  • Model: gpt-4o-mini
  • Prompt:
You are a "Gap Time Concierge" assistant.

Based on the following information, suggest 2-3 specific activities the user can do:

Available Time: {{$node["Calculate Gap Time"].json.availableMinutes}} minutes
Weather: {{$node["Get Weather at Destination"].json.weather[0].description}}, {{$node["Get Weather at Destination"].json.main.temp}}°C
User Preferences: {{$node["Get User Preferences"].json.activityTypes}}
Nearby Options: {{$node["Search Indoor Spots"].json.results}}

Provide concise, actionable recommendations with:
1. Activity name and location
2. Estimated time needed
3. Why it matches their preferences

Format as a friendly Slack message.
  • Temperature: 0.7 (balanced creativity)
  • Max Tokens: 300

11. Slack Notification Configuration

Send Slack Notification node:

  • Channel/User: Your User ID or Channel ID from integration setup
  • Message: {{$node["AI Recommendations"].json.choices[0].message.content}}
  • Username: Gap Time Concierge (optional)
  • Icon: :clock3: (optional emoji)

Testing Your Agent

Initial Test Run

  1. Activate the workflow using the toggle in the top-right corner
  2. Manually trigger a test execution by clicking "Execute Workflow" button
  3. Monitor execution in the workflow canvas – nodes will highlight green (success) or red (error)

Verification Checklist

Step 1 - Configuration Node:

  • ✅ All API keys are present and correctly formatted
  • ✅ Time parameters make sense for your schedule

Step 2 - Notion Integration:

  • ✅ User preferences are retrieved successfully
  • ✅ Data structure matches your database schema
  • ✅ At least one preference record exists

Step 3 - Calendar Integration:

  • ✅ Next calendar event is retrieved
  • ✅ Event includes location information
  • ✅ Start time is in the future

Step 4 - Weather & Travel:

  • ✅ Weather data returns valid temperature and conditions
  • ✅ Travel time is calculated in minutes
  • ✅ Coordinates are accurate

Step 5 - Gap Calculation:

  • ✅ Available minutes is calculated correctly
  • ✅ Boolean hasGap reflects whether gap exceeds minimum

Step 6 - Conditional Routing:

  • ✅ If no gap, workflow stops at "No Gap Time - Stop" node
  • ✅ If gap exists, continues to weather routing

Step 7 - Location Search:

  • ✅ Places API returns nearby venues
  • ✅ Results include names, addresses, and ratings

Step 8 - AI Generation:

  • ✅ OpenAI returns formatted recommendations
  • ✅ Suggestions are relevant to available time and weather
  • ✅ Message is conversational and actionable

Step 9 - Slack Delivery:

  • ✅ Message appears in your Slack channel/DM
  • ✅ Formatting is readable
  • ✅ Recommendations are specific and useful

Expected Results

Successful execution with gap time:

  • Slack message received within 10-15 seconds
  • 2-3 specific activity recommendations
  • Each includes location name, time estimate, and reasoning
  • Recommendations match weather conditions and preferences

Successful execution without gap time:

  • Workflow stops at conditional node
  • No Slack message sent (avoiding notification fatigue)
  • Execution log shows "false_path" taken

Troubleshooting

Common Configuration Issues

Problem: "Database not found" error in Notion node

Solution:

  • Verify database ID is correct (32-character alphanumeric string)
  • Ensure integration is connected to the specific database (check Connections in database settings)
  • Confirm integration token has not expired

Problem: "No events found" in Google Calendar node

Solution:

  • Check that lookAheadMinutes provides sufficient time window
  • Verify calendar has upcoming events with location data
  • Ensure correct calendar ID is specified (try primary if unsure)
  • Confirm timezone settings match your actual timezone

Problem: Weather API returns 401 Unauthorized

Solution:

  • Verify OpenWeather API key is active (check dashboard at openweathermap.org)
  • Ensure you're using the correct API endpoint (2.5, not 3.0 for free tier)
  • Check that API key is properly inserted in Configuration node
  • Wait 10-15 minutes after creating new API key