You can create calendar events with create_event. What's the follow-up step you always miss — the task you need to add after every demo booking?
After create_event the event exists. But I also need a task reminding me to send prep materials 24 hours before. I add it to Google Tasks manually, then forget it.
Google Tasks is the same pattern as Calendar — list first, query second. GOOGLETASKS_LIST_TASK_LISTS shows you all your task lists. GOOGLETASKS_LIST_TASKS with a list ID shows the tasks inside. The list ID is what you pass to INSERT_TASK on Day 14:
lists_result = toolset.execute_action(Action.GOOGLETASKS_LIST_TASK_LISTS, {})
task_lists = lists_result.get("items", [])
for tl in task_lists:
print(tl.get("title"), tl.get("id"))Two actions for one function? LIST_TASK_LISTS then LIST_TASKS? Why not just LIST_ALL_TASKS?
Tasks are organised into lists — 'My Tasks', 'Work', 'Investor Follow-ups'. You choose the list, then query its tasks. Same pattern as Calendar: list calendars → find events. Here's the full function:
def list_tasks(list_id: str) -> list:
lists_result = toolset.execute_action(Action.GOOGLETASKS_LIST_TASK_LISTS, {})
tasks_result = toolset.execute_action(Action.GOOGLETASKS_LIST_TASKS, {"tasklist": list_id})
tasks = tasks_result.get("items", [])
print(f"Found {len(tasks)} tasks in list {list_id}")
return tasksSo I list the task lists to get the ID, then list tasks in that list. Same list-then-detail shape as Calendar. The pattern is the same across apps.
That's the core insight of Composio — every app has the same two-step: list what exists, then query or write to a specific item. The shapes differ; the thinking is identical.
Three apps now — Gmail, Calendar, Tasks. Each one followed the same API pattern. My brain is building a template.
The items key in Tasks responses is different from calendars in Calendar and messages in Gmail. Always check the specific key for each action — .get('items', []) for Tasks, .get('calendars', []) for Calendar, .get('messages', []) for Gmail.
Google Tasks uses two actions:
GOOGLETASKS_LIST_TASK_LISTS → all task lists (use items key)GOOGLETASKS_LIST_TASKS with {"tasklist": list_id} → tasks in that listThe list-then-query pattern here mirrors Calendar — always discover IDs before querying them.
| App | Response key |
|---|---|
| Gmail | messages |
| Calendar | calendars / events |
| Tasks | items |
The response key differs per app. Never assume messages — check the specific app's key.
You can create calendar events with create_event. What's the follow-up step you always miss — the task you need to add after every demo booking?
After create_event the event exists. But I also need a task reminding me to send prep materials 24 hours before. I add it to Google Tasks manually, then forget it.
Google Tasks is the same pattern as Calendar — list first, query second. GOOGLETASKS_LIST_TASK_LISTS shows you all your task lists. GOOGLETASKS_LIST_TASKS with a list ID shows the tasks inside. The list ID is what you pass to INSERT_TASK on Day 14:
lists_result = toolset.execute_action(Action.GOOGLETASKS_LIST_TASK_LISTS, {})
task_lists = lists_result.get("items", [])
for tl in task_lists:
print(tl.get("title"), tl.get("id"))Two actions for one function? LIST_TASK_LISTS then LIST_TASKS? Why not just LIST_ALL_TASKS?
Tasks are organised into lists — 'My Tasks', 'Work', 'Investor Follow-ups'. You choose the list, then query its tasks. Same pattern as Calendar: list calendars → find events. Here's the full function:
def list_tasks(list_id: str) -> list:
lists_result = toolset.execute_action(Action.GOOGLETASKS_LIST_TASK_LISTS, {})
tasks_result = toolset.execute_action(Action.GOOGLETASKS_LIST_TASKS, {"tasklist": list_id})
tasks = tasks_result.get("items", [])
print(f"Found {len(tasks)} tasks in list {list_id}")
return tasksSo I list the task lists to get the ID, then list tasks in that list. Same list-then-detail shape as Calendar. The pattern is the same across apps.
That's the core insight of Composio — every app has the same two-step: list what exists, then query or write to a specific item. The shapes differ; the thinking is identical.
Three apps now — Gmail, Calendar, Tasks. Each one followed the same API pattern. My brain is building a template.
The items key in Tasks responses is different from calendars in Calendar and messages in Gmail. Always check the specific key for each action — .get('items', []) for Tasks, .get('calendars', []) for Calendar, .get('messages', []) for Gmail.
Google Tasks uses two actions:
GOOGLETASKS_LIST_TASK_LISTS → all task lists (use items key)GOOGLETASKS_LIST_TASKS with {"tasklist": list_id} → tasks in that listThe list-then-query pattern here mirrors Calendar — always discover IDs before querying them.
| App | Response key |
|---|---|
| Gmail | messages |
| Calendar | calendars / events |
| Tasks | items |
The response key differs per app. Never assume messages — check the specific app's key.
Create a free account to get started. Paid plans unlock all tracks.