See llms.txt for all machine-readable content.

Back to Templates

Send donor thank-you receipts and weekly digests with Google Sheets, DeepSeek, Gmail and Telegram

Last update

Last update a day ago

Categories

Share


Quick Overview

This workflow watches a Google Sheets donations log, validates new entries, uses DeepSeek (via the OpenAI API) to draft personalized thank-you emails with receipt details, and sends them via Gmail, while notifying the team in Telegram and emailing weekly donation digests.

How it works

  1. Triggers when a new row is added to the Google Sheets “Donations” worksheet (polled every minute).
  2. Normalizes the donation data by generating a donation ID, timestamp, and default values, then validates that donor name, donor email, and a positive amount are present.
  3. If the row is invalid, sends an alert to Telegram and emails a review notice via Gmail so the sheet can be corrected.
  4. If the row is valid, uses a LangChain agent with the DeepSeek chat model and a Google Sheets donor-history tool to generate a JSON thank-you email (tier, subject, body, and major-donor flag).
  5. Logs the generated message and donation details to the Google Sheets “ThankYouLog” worksheet and emails the thank-you (including receipt details) to the donor via Gmail.
  6. If the donation qualifies as major (AI-flagged or amount ≥ 1,000,000), posts a Telegram alert and emails the executive director via Gmail for personal outreach.
  7. Every Monday at 09:00, reads the “ThankYouLog” sheet, calculates weekly donation stats, generates a short AI digest, and sends it via Gmail and Telegram (or sends an all-clear if no donations were logged).

Setup

  1. Connect Google Sheets OAuth credentials for both the Google Sheets trigger and Google Sheets nodes, and set the spreadsheet ID and worksheet names (Donations, DonorHistory, ThankYouLog).
  2. Add an OpenAI API credential that can access the DeepSeek model configured in the workflow.
  3. Add a Gmail OAuth2 credential and update the recipient addresses used for donor emails and internal notifications.
  4. Add a Telegram bot credential and set the target chat ID for invalid-donation, major-donor, and weekly-digest messages.
  5. Ensure the Donations sheet includes donor_name, donor_email, amount, currency, campaign, gift_message, and source columns, and populate DonorHistory with donor records keyed by email.