You have MRR in a Sheet. Your investors want a summary email. That's currently two manual tasks. What if it was one function call?
After create_doc I have the whole Docs workflow. But the investor email is the real win — read the Sheet for MRR data, format it, send it. Three steps I do every Monday.
Read the Sheet, format the total, send the email. Three actions, one function. email_sheet_summary(sheet_id, recipient) — fetch the range, sum the MRR column, GMAIL_SEND_EMAIL. Your Monday investor update now runs itself:
rows = read_range(sheet_id, "Sheet1!A:D")
mrr_total = sum(float(row[2]) for row in rows[1:] if len(row) > 2 and row[2])
print(f"Total MRR: {mrr_total}")
body = f"Weekly MRR Summary — Total MRR: ${mrr_total:,.2f}, Rows: {len(rows)-1}"
send_email(recipient, "Weekly MRR Update", body)rows[1:] — that skips the header row? What if the Sheet doesn't have a header?
rows[1:] skips index 0 — the header row. If your Sheet starts with data on row 1, use rows[0:]. Always inspect your Sheet structure before building the loop. Here's the full function:
def email_sheet_summary(sheet_id: str, recipient: str) -> dict:
rows = read_range(sheet_id, "Sheet1!A:D")
mrr_total = sum(float(row[2]) for row in rows[1:] if len(row) > 2 and row[2])
body = f"Weekly MRR Summary\n\nTotal MRR: ${mrr_total:,.2f}\nCustomers: {len(rows)-1}"
result = send_email(recipient, "Weekly MRR Update", body)
print(f"Sent MRR summary to {recipient}")
return resultI could wire my whole Monday morning in this. Sheets reads the data, Python formats it, Gmail sends it. That's three hours back every week.
Three hours a week is 150 hours a year. That's a meaningful chunk of founder time.
First two-app chain. Sheets feeds Gmail. The pattern is: call action A, process the output, call action B with the result.
Use the safe-to-self pattern — pass your own email as recipient during all testing. The MRR total might be wrong on first run. Verify in your inbox before pointing it at investors.
The pattern: call action A, process output, call action B.
# A: read Sheet
rows = read_range(sheet_id, "Sheet1!A:D")
# process
body = format_summary(rows)
# B: send email
send_email(recipient, subject, body)Each function returns a Python object. Any function that takes that type as input can be chained next. There are no API-specific handshakes between steps — just Python data flowing through functions.
Always test with recipient = your_own_email first. Verify the MRR total is correct before pointing at real recipients.
You have MRR in a Sheet. Your investors want a summary email. That's currently two manual tasks. What if it was one function call?
After create_doc I have the whole Docs workflow. But the investor email is the real win — read the Sheet for MRR data, format it, send it. Three steps I do every Monday.
Read the Sheet, format the total, send the email. Three actions, one function. email_sheet_summary(sheet_id, recipient) — fetch the range, sum the MRR column, GMAIL_SEND_EMAIL. Your Monday investor update now runs itself:
rows = read_range(sheet_id, "Sheet1!A:D")
mrr_total = sum(float(row[2]) for row in rows[1:] if len(row) > 2 and row[2])
print(f"Total MRR: {mrr_total}")
body = f"Weekly MRR Summary — Total MRR: ${mrr_total:,.2f}, Rows: {len(rows)-1}"
send_email(recipient, "Weekly MRR Update", body)rows[1:] — that skips the header row? What if the Sheet doesn't have a header?
rows[1:] skips index 0 — the header row. If your Sheet starts with data on row 1, use rows[0:]. Always inspect your Sheet structure before building the loop. Here's the full function:
def email_sheet_summary(sheet_id: str, recipient: str) -> dict:
rows = read_range(sheet_id, "Sheet1!A:D")
mrr_total = sum(float(row[2]) for row in rows[1:] if len(row) > 2 and row[2])
body = f"Weekly MRR Summary\n\nTotal MRR: ${mrr_total:,.2f}\nCustomers: {len(rows)-1}"
result = send_email(recipient, "Weekly MRR Update", body)
print(f"Sent MRR summary to {recipient}")
return resultI could wire my whole Monday morning in this. Sheets reads the data, Python formats it, Gmail sends it. That's three hours back every week.
Three hours a week is 150 hours a year. That's a meaningful chunk of founder time.
First two-app chain. Sheets feeds Gmail. The pattern is: call action A, process the output, call action B with the result.
Use the safe-to-self pattern — pass your own email as recipient during all testing. The MRR total might be wrong on first run. Verify in your inbox before pointing it at investors.
The pattern: call action A, process output, call action B.
# A: read Sheet
rows = read_range(sheet_id, "Sheet1!A:D")
# process
body = format_summary(rows)
# B: send email
send_email(recipient, subject, body)Each function returns a Python object. Any function that takes that type as input can be chained next. There are no API-specific handshakes between steps — just Python data flowing through functions.
Always test with recipient = your_own_email first. Verify the MRR total is correct before pointing at real recipients.
Create a free account to get started. Paid plans unlock all tracks.