Four days of chaining — Sheet digest, Calendar tasks, Doc-to-post, safe send. Your Monday morning still takes you forty minutes. What's the missing piece?
safe_send from Day 27 wraps Gmail. email_sheet_summary from Day 24 sends the digest. upcoming_to_tasks from Day 25 creates tasks. run_workflow calls all three in sequence and returns a summary dict — one function call for the whole morning.
Exactly. run_workflow(sheet_id, cal_id, list_id, recipient) calls each step in order, collects the results, and returns a structured outcome. Call email_sheet_summary first, then upcoming_to_tasks, then safe_send with a summary message — the output of each step feeds the next:
def run_workflow(sheet_id: str, cal_id: str, list_id: str, recipient: str) -> dict:
digest = email_sheet_summary(sheet_id, recipient)
tasks = upcoming_to_tasks(cal_id, list_id)
send_status = safe_send(
recipient,
"Weekly workflow complete",
f"Digest sent. {len(tasks)} deadline tasks created."
)
return {"digest": digest, "tasks_created": len(tasks), "send_status": send_status}If email_sheet_summary raises an unhandled exception, do upcoming_to_tasks and safe_send still run?
No — an unhandled exception in step one stops the whole function. email_sheet_summary wraps Gmail via safe_send internally on Day 27, so it returns a dict rather than raising. upcoming_to_tasks calls Composio actions that may raise on connection failure — for production robustness, wrap each step in its own try/except or use safe_send-style wrappers consistently.
So the capstone works because earlier days built the right wrappers. Day 27 wasn't just error handling — it was preparing the capstone to be resilient.
That's the architecture. And the full return dict tells you exactly what each step produced:
{"digest": {"id": ...}, "tasks_created": 3, "send_status": {"status": "sent"}}Inspect it after the run to see which steps succeeded. Each day's lesson is a module; the capstone composes them. If any module raises unexpectedly, the pipeline stops at that module — but the modules that return dicts keep the pipeline alive. The capstone returns a summary dict so you can inspect what succeeded even on a partial run.
One function call on Monday morning. Citations digest sent, deadline tasks created, confirmation sent. That's the entire research coordination routine I've been doing manually for two years.
Monday morning is now a one-liner. The rest of the morning is for research.
def run_workflow(sheet_id, cal_id, list_id, recipient):
digest = email_sheet_summary(sheet_id, recipient) # Step 1: digest email
tasks = upcoming_to_tasks(cal_id, list_id) # Step 2: deadline tasks
send_status = safe_send( # Step 3: confirmation
recipient,
"Weekly workflow complete",
f"Digest sent. {len(tasks)} deadline tasks created."
)
return {"digest": digest, "tasks_created": len(tasks), "send_status": send_status}| Step | Function | Apps |
|---|---|---|
| 1 | email_sheet_summary | Sheets + Gmail |
| 2 | upcoming_to_tasks | Calendar + Tasks |
| 3 | safe_send | Gmail (resilient) |
Steps that return dicts (not raise) keep the pipeline alive past partial failures. Wrap additional steps in try/except for production use.
Four days of chaining — Sheet digest, Calendar tasks, Doc-to-post, safe send. Your Monday morning still takes you forty minutes. What's the missing piece?
safe_send from Day 27 wraps Gmail. email_sheet_summary from Day 24 sends the digest. upcoming_to_tasks from Day 25 creates tasks. run_workflow calls all three in sequence and returns a summary dict — one function call for the whole morning.
Exactly. run_workflow(sheet_id, cal_id, list_id, recipient) calls each step in order, collects the results, and returns a structured outcome. Call email_sheet_summary first, then upcoming_to_tasks, then safe_send with a summary message — the output of each step feeds the next:
def run_workflow(sheet_id: str, cal_id: str, list_id: str, recipient: str) -> dict:
digest = email_sheet_summary(sheet_id, recipient)
tasks = upcoming_to_tasks(cal_id, list_id)
send_status = safe_send(
recipient,
"Weekly workflow complete",
f"Digest sent. {len(tasks)} deadline tasks created."
)
return {"digest": digest, "tasks_created": len(tasks), "send_status": send_status}If email_sheet_summary raises an unhandled exception, do upcoming_to_tasks and safe_send still run?
No — an unhandled exception in step one stops the whole function. email_sheet_summary wraps Gmail via safe_send internally on Day 27, so it returns a dict rather than raising. upcoming_to_tasks calls Composio actions that may raise on connection failure — for production robustness, wrap each step in its own try/except or use safe_send-style wrappers consistently.
So the capstone works because earlier days built the right wrappers. Day 27 wasn't just error handling — it was preparing the capstone to be resilient.
That's the architecture. And the full return dict tells you exactly what each step produced:
{"digest": {"id": ...}, "tasks_created": 3, "send_status": {"status": "sent"}}Inspect it after the run to see which steps succeeded. Each day's lesson is a module; the capstone composes them. If any module raises unexpectedly, the pipeline stops at that module — but the modules that return dicts keep the pipeline alive. The capstone returns a summary dict so you can inspect what succeeded even on a partial run.
One function call on Monday morning. Citations digest sent, deadline tasks created, confirmation sent. That's the entire research coordination routine I've been doing manually for two years.
Monday morning is now a one-liner. The rest of the morning is for research.
def run_workflow(sheet_id, cal_id, list_id, recipient):
digest = email_sheet_summary(sheet_id, recipient) # Step 1: digest email
tasks = upcoming_to_tasks(cal_id, list_id) # Step 2: deadline tasks
send_status = safe_send( # Step 3: confirmation
recipient,
"Weekly workflow complete",
f"Digest sent. {len(tasks)} deadline tasks created."
)
return {"digest": digest, "tasks_created": len(tasks), "send_status": send_status}| Step | Function | Apps |
|---|---|---|
| 1 | email_sheet_summary | Sheets + Gmail |
| 2 | upcoming_to_tasks | Calendar + Tasks |
| 3 | safe_send | Gmail (resilient) |
Steps that return dicts (not raise) keep the pipeline alive past partial failures. Wrap additional steps in try/except for production use.
Create a free account to get started. Paid plans unlock all tracks.