Invoice & Payment Tracker
Track invoices via Stripe, alert on overdue payments, and automate payment reminders
š§ Ingredients
š APIs
invoice_data_status_amounts_due_dates_payment_history
š Alternatives:
send_payment_reminders_and_receipt_confirmations
š Alternatives:
track_ar_aging_and_payment_history
š Alternatives:
instant_alerts_for_payments_received_and_overdue_invoices
š Alternatives:
š Step-by-Step Build Guide
Connect to Stripe API and pull all open invoices
1. Connect to Stripe API and pull all open invoices
Connect to Stripe API and pull all open invoices Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding.
š§ Human Required
- ⢠## Connect the API 1. Sign up for the service if you don't have an account 2. Find the API settings in your account dashboard 3. Generate an API key or access token 4. Share the key with your agent when prompted š” Most services have a free tier that's sufficient to get started.
Daily
2. Daily: check for newly paid invoices ā send confirmation/thank you email and alert you
Send the compiled content via email using the configured email API.
Compose the email:
- To: {recipient_email}
- Subject: {subject_line}
- Body: Format as clean HTML with proper headings, bullet points, and styling.
Use inline CSS for compatibility. Keep it mobile-friendly (max-width: 600px).
Send via the configured email provider (SendGrid, Resend, or SES).
Verify the response indicates successful delivery (202 for SendGrid, 200 for Resend).
Log: timestamp, recipient, subject, and delivery status.
If send fails, retry once after 3 seconds. If it fails again, save the email content locally and alert the user.Track payment due dates
3. Track payment due dates ā flag invoices approaching due date (3 days before)
Track payment due dates ā flag invoices approaching due date (3 days before) Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding.
For overdue invoices
4. For overdue invoices: Day 1 past due (gentle reminder), Day 7 (follow-up), Day 14 (escalation)
For overdue invoices: Day 1 past due (gentle reminder), Day 7 (follow-up), Day 14 (escalation) Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding. ā ļø IMPORTANT: The next step (Step 5: "Log all invoices to Google Sheets") requires human action. Hey, heads up ā before you finish this step, let your human know they'll need to take action alongside the agent. Don't proceed to the next step until your human confirms they're ready.
Log all invoices to Google Sheets
5. Log all invoices to Google Sheets: customer, amount, date issued, date due, date paid, days outstanding
Log data to Google Sheets using the Sheets API.
POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}:append?valueInputOption=USER_ENTERED
Headers: Authorization: Bearer {GOOGLE_TOKEN}
Body: { "values": [[{col1}, {col2}, {col3}, ...]] }
Format dates as YYYY-MM-DD, times as HH:MM, numbers without formatting.
Append new rows ā don't overwrite existing data.
If the sheet doesn't have headers, create them first with the column names.
Verify the response shows updatedRows: 1.š§ Human Required
- ⢠## Set Up Google Sheets 1. Create a new Google Sheet (or use existing) 2. Share it with your agent's service account email 3. Note the spreadsheet ID from the URL 4. Your agent will create the headers and start logging š” The Sheet URL looks like: docs.google.com/spreadsheets/d/**{SPREADSHEET_ID}**/edit
Weekly
6. Weekly: AR summary ā total outstanding, overdue amount, aging breakdown (current, 30, 60, 90 days)
Weekly: AR summary ā total outstanding, overdue amount, aging breakdown (current, 30, 60, 90 days) Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding.
Monthly
7. Monthly: revenue report ā total collected, average days to payment, customers with best/worst payment habits
Compile the gathered data into a structured report. Format as clean Markdown with: - Title/date header - Executive summary (2-3 sentences) - Key metrics section with actual numbers - Detailed sections with bullet points - Action items or recommendations at the end Keep it scannable ā busy people read reports in 30 seconds. Use emoji sparingly for visual anchors (š metrics, ā wins, ā ļø concerns, š action items). Include data comparisons: "X this period vs Y last period (āZ%)" If any data source was unavailable, note it clearly: "ā ļø [Source] data unavailable ā excluded from this report."
š¤ Example Agent Prompt
Connect to Stripe API and pull all open invoices Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding.
Copy this prompt into your agent to get started.