code block

code block

test

June 16, 2026
code block
ďťż
"""Google Calendar activities for searching and creating events."""
ďťż
from __future__ import annotations
ďťż
from typing import Any
ďťż
import mistralai.workflows as workflows
from mistralai.workflows import Depends
from mistralai.workflows.plugins.mistralai.connectors import (
ToolCallClient,
connector,
)
ďťż
GOOGLE_CALENDAR_CONNECTOR = connector("google_calendar")
ďťż
@workflows.activity(name="gcal-search")
async def gcal_search(
calendar: str,
start: str | None,
end: str | None,
query: str | None,
google_calendar: ToolCallClient = Depends(GOOGLE_CALENDAR_CONNECTOR),
) -> dict[str, Any]:
"""Search Google Calendar for events matching the given time window and query.
ďťż
Args:
calendar: Calendar ID to search (e.g. 'primary').
start: RFC3339 lower bound for event start time (inclusive).
end: RFC3339 upper bound for event end time (exclusive).
query: Free-text search on event name/content/attendees.
"""
arguments: dict[str, Any] = {"calendar": calendar}
if start:
arguments["start"] = start
if end:
arguments["end"] = end
if query:
arguments["query"] = query
return await google_calendar.call_tool( # type: ignore[no-any-return]
tool_name="search_event",
arguments=arguments,
)
ďťż
ďťż
ďťż
Dive in

Related

Blog
code block
Feb 12th, 2025 • Views 10
Video test
Wistia Test
Jul 23rd, 2026 • Views 0
Blog
copy code
May 25th, 2026 • Views 5
Resources
res-test
Aug 17th, 2026 • Views 1
Blog
code block
Feb 12th, 2025 • Views 10
Blog
copy code
May 25th, 2026 • Views 5
Resources
res-test
Aug 17th, 2026 • Views 1
Video test
Wistia Test
Jul 23rd, 2026 • Views 0