Productivity Tools
Productivity tools enable agents to manage calendars, interact with CRM systems, and handle scheduling workflows.
Google Calendar
calendar_list_events
List upcoming calendar events.
Calendar ID or “primary” for main calendar
Start time filter (ISO 8601 format, e.g., “2024-01-15T00:00:00Z”)
End time filter (ISO 8601 format)
Maximum events to return (1-2500)
Free text search terms to filter events
Account alias for multi-account support
All Events
Search Events
Response
from datetime import datetime, timedelta
now = datetime.utcnow()
week_later = now + timedelta( days = 7 )
result = calendar_list_events(
time_min = now.isoformat() + "Z" ,
time_max = week_later.isoformat() + "Z" ,
max_results = 50
)
for event in result[ "events" ]:
print ( f " { event[ 'summary' ] } " )
print ( f "Start: { event[ 'start' ] } " )
print ( f "End: { event[ 'end' ] } \n " )
calendar_get_event
Get details of a specific event.
result = calendar_get_event(
calendar_id = "primary" ,
event_id = "event123"
)
print ( f "Summary: { result[ 'summary' ] } " )
print ( f "Description: { result[ 'description' ] } " )
print ( f "Organizer: { result[ 'organizer' ][ 'email' ] } " )
for attendee in result[ 'attendees' ]:
print ( f " - { attendee[ 'email' ] } : { attendee[ 'responseStatus' ] } " )
calendar_create_event
Create a new calendar event.
List of attendee email addresses
Timezone (IANA format, e.g., “America/New_York”)
Simple Event
With Attendees
All-Day Event
result = calendar_create_event(
summary = "Project Review" ,
start_time = "2024-01-15T14:00:00" ,
end_time = "2024-01-15T15:00:00" ,
timezone = "America/New_York"
)
print ( f "Event created: { result[ 'event_id' ] } " )
print ( f "Link: { result[ 'html_link' ] } " )
calendar_update_event
Update an existing event.
result = calendar_update_event(
calendar_id = "primary" ,
event_id = "event123" ,
summary = "Updated Meeting Title" ,
start_time = "2024-01-15T15:00:00" ,
end_time = "2024-01-15T16:00:00" ,
timezone = "America/New_York"
)
calendar_delete_event
Delete a calendar event.
result = calendar_delete_event(
calendar_id = "primary" ,
event_id = "event123"
)
if result[ "success" ]:
print ( "Event deleted" )
calendar_check_availability
Check free/busy status for attendees.
List of email addresses to check
Start of time range (ISO 8601)
End of time range (ISO 8601)
result = calendar_check_availability(
attendees = [
"[email protected] " ,
"[email protected] "
],
time_min = "2024-01-15T09:00:00Z" ,
time_max = "2024-01-15T17:00:00Z" ,
timezone = "America/New_York"
)
for email, availability in result[ "calendars" ].items():
print ( f " { email } :" )
for busy_period in availability[ "busy" ]:
print ( f " Busy: { busy_period[ 'start' ] } - { busy_period[ 'end' ] } " )
Configuration
export GOOGLE_CALENDAR_ACCESS_TOKEN = your_oauth_token
Or connect via Hive OAuth at hive.adenhq.com
HubSpot CRM
Get contact details by ID or email.
result = hubspot_get_contact(
contact_id = "12345"
)
print ( f "Name: { result[ 'properties' ][ 'firstname' ] } { result[ 'properties' ][ 'lastname' ] } " )
print ( f "Email: { result[ 'properties' ][ 'email' ] } " )
print ( f "Company: { result[ 'properties' ][ 'company' ] } " )
Create a new contact.
result = hubspot_create_contact(
email = "[email protected] " ,
firstname = "John" ,
lastname = "Doe" ,
company = "Acme Corp" ,
phone = "555-1234"
)
print ( f "Contact created: { result[ 'id' ] } " )
Update an existing contact.
result = hubspot_update_contact(
contact_id = "12345" ,
properties = {
"lifecyclestage" : "customer" ,
"company" : "New Company Name"
}
)
Search for contacts.
result = hubspot_search_contacts(
query = "[email protected] " ,
limit = 10
)
for contact in result[ "results" ]:
print ( f " { contact[ 'properties' ][ 'email' ] } " )
hubspot_create_deal
Create a new deal.
result = hubspot_create_deal(
dealname = "Q1 Enterprise Deal" ,
amount = 50000 ,
pipeline = "default" ,
dealstage = "qualifiedtobuy" ,
closedate = "2024-03-31"
)
hubspot_create_note
Create a note attached to a contact.
result = hubspot_create_note(
note = "Discussed pricing for enterprise plan." ,
contact_id = "12345"
)
Configuration
export HUBSPOT_API_KEY = your_api_key
Get API key from HubSpot Settings > Integrations > Private Apps
Apollo.io
apollo_search_people
Search for prospects.
result = apollo_search_people(
query = "software engineer" ,
company = "Google" ,
location = "San Francisco" ,
limit = 20
)
for person in result[ "people" ]:
print ( f " { person[ 'name' ] } " )
print ( f "Title: { person[ 'title' ] } " )
print ( f "Email: { person[ 'email' ] } " )
print ( f "LinkedIn: { person[ 'linkedin_url' ] } \n " )
apollo_enrich_person
Enrich person data by email or LinkedIn URL.
result = apollo_enrich_person(
email = "[email protected] "
)
print ( f "Name: { result[ 'name' ] } " )
print ( f "Current Company: { result[ 'organization' ][ 'name' ] } " )
print ( f "Title: { result[ 'title' ] } " )
apollo_search_companies
Search for companies.
result = apollo_search_companies(
query = "AI startup" ,
location = "San Francisco" ,
employee_range = "11-50" ,
limit = 10
)
for company in result[ "companies" ]:
print ( f " { company[ 'name' ] } " )
print ( f "Industry: { company[ 'industry' ] } " )
print ( f "Employees: { company[ 'employee_count' ] } " )
Configuration
export APOLLO_API_KEY = your_api_key
Cal.com
calcom_list_bookings
List scheduled bookings.
result = calcom_list_bookings(
status = "upcoming" ,
limit = 20
)
for booking in result[ "bookings" ]:
print ( f " { booking[ 'title' ] } " )
print ( f "Time: { booking[ 'startTime' ] } " )
print ( f "Attendee: { booking[ 'attendees' ][ 0 ][ 'email' ] } " )
calcom_get_availability
Check availability for a date range.
result = calcom_get_availability(
start_date = "2024-01-15" ,
end_date = "2024-01-19" ,
event_type_id = "event123"
)
for slot in result[ "slots" ]:
print ( f "Available: { slot[ 'time' ] } " )
calcom_create_booking
Create a new booking.
result = calcom_create_booking(
event_type_id = "event123" ,
start_time = "2024-01-15T14:00:00Z" ,
attendee_email = "[email protected] " ,
attendee_name = "John Doe" ,
attendee_timezone = "America/New_York"
)
print ( f "Booking created: { result[ 'booking_uid' ] } " )
print ( f "Meeting link: { result[ 'meeting_url' ] } " )
Configuration
export CALCOM_API_KEY = your_api_key
Google Analytics
google_analytics_run_report
Run a Google Analytics 4 report.
List of dimensions to group by
result = google_analytics_run_report(
property_id = "123456789" ,
start_date = "2024-01-01" ,
end_date = "2024-01-31" ,
metrics = [ "sessions" , "activeUsers" , "conversions" ],
dimensions = [ "country" , "deviceCategory" ]
)
for row in result[ "rows" ]:
print ( f "Country: { row[ 'country' ] } " )
print ( f "Device: { row[ 'deviceCategory' ] } " )
print ( f "Sessions: { row[ 'sessions' ] } " )
print ( f "Active Users: { row[ 'activeUsers' ] } \n " )
Configuration
export GOOGLE_ANALYTICS_CREDENTIALS = path / to / service_account . json
Best Practices
Always specify timezone when creating events
Check availability before scheduling meetings
Use batch operations for multiple event updates
Include meeting links and descriptions
Set appropriate reminders
Validate email addresses before creating contacts
Check for duplicates before creating records
Use consistent naming conventions
Add notes for important interactions
Update lifecyclestage as contacts progress
Platform limits:
HubSpot : 100 requests/10 seconds
Apollo : 100 requests/minute
Google Calendar : 600 queries/minute/user
Implement backoff strategies for 429 errors.
result = calendar_create_event( ... )
if "error" in result:
if "token" in result[ "error" ].lower():
# Re-authenticate
elif "conflict" in result[ "error" ].lower():
# Handle scheduling conflict
else :
# Log and retry
Next Steps
Cloud APIs Google services and GitHub
Communication Email and messaging tools