detect_events_from_email
Analyze emails to identify calendar events by extracting dates, times, and contextual information for potential scheduling.
Instructions
Detect potential calendar events from an email.
This tool analyzes an email to identify potential calendar events
based on dates, times, and contextual clues.
Prerequisites:
- The user must be authenticated
- You need an email ID from list_emails() or search_emails()
Args:
email_id (str): The ID of the email to analyze for events
Returns:
Dict[str, Any]: The detected events including:
- success: Whether the operation was successful
- events: List of potential events with details
- email_link: Link to the original email
Example usage:
1. Get an email: email = get_email(email_id="...")
2. Detect events: events = detect_events_from_email(email_id="...")
3. Ask the user if they want to add the events to their calendar
4. Ask the user for any missing information (end time, location, description, attendees)
5. If confirmed, create the events using create_calendar_event()
Important:
- Always ask for user confirmation before creating calendar events
- Always ask for missing information like end time, location, description, and attendees
- Never use default values without user input
- Always include the event_link when discussing events with the user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| email_id | Yes |