Guide
Build a Donation-Receipt Email Agent
An AI agent sends tax-compliant donation receipts the moment a gift lands, handles recurring donors, and routes anything unusual to your finance team.
Written by Hazik Director of Product Management
What is a donation-receipt agent?
A donation-receipt agent sends a donor the written acknowledgment they need for taxes the moment their gift clears, then handles the replies that follow. For US nonprofits this isn't a nicety: the IRS requires a written acknowledgment for any single contribution of $250 or more before the donor can claim a deduction. The agent makes sure every qualifying gift gets one, instantly and correctly.
The agent acknowledges and routes; it never moves money or edits the ledger. The gift is recorded in your payment and accounting systems, which trigger the agent. Keeping the ledger outside the agent's tool set means a donor reply can't prompt it into issuing a refund or changing an amount.
Why run donation receipts on an agent account?
Receipts and the replies they generate belong in one inbox. On an agent account, donations@yourcause.nylas.email sends every acknowledgment and catches every “can you re-send last year's receipt?” in one managed identity with a clean audit trail — the record an auditor or the donor asks for. The free tier covers up to 5 such inboxes.
The bigger win is idempotency. Donation webhooks retry, and a double-fired webhook must not send two receipts for one gift. Tagging each send with the gift ID and checking it first means the agent sends exactly one receipt per contribution, even when the webhook delivers the same event twice.
What must a tax-compliant receipt include?
A compliant acknowledgment is specific. Per IRS Publication 1771, it must name the organization, state the cash amount or describe non-cash property, give the date, and say whether the donor received any goods or services in return — and if so, their value. The agent fills these from the gift record, so every receipt carries the required elements.
# Send one tax-compliant receipt, tagged by gift ID for idempotency
nylas email send \
--to donor@example.com \
--subject "Your tax receipt from Helping Hands" \
--body "Helping Hands received your gift of $250.00 on 2026-06-14. No goods or services were provided in exchange." \
--metadata gift_id=GIFT-90217Get the goods-or-services line right, because it changes the donor's deductible amount. If a $250 gift came with a $40 tote bag, the receipt must say so and the donor deducts $210. The agent reads that detail from the gift record rather than guessing.
How does it handle recurring donors and edge cases?
Recurring donors get a receipt per gift and, optionally, one consolidated year-end statement. The agent groups a donor's gifts by tax year from your records and sends a single summary in January, so a monthly donor gets 12 receipts plus one annual total rather than a shoebox of emails.
Anything that isn't a clean acknowledgment routes to a human. A refund request, a disputed amount, a complaint, or a correction goes to finance with the gift record attached — the agent recognizes it's out of scope and hands it off rather than improvising a reply about money.
Next steps
- Send Transactional Email From an Agent Account — the DKIM-signed, rate-capped sending foundation receipts build on
- Build an Order-Status Reply Agent — the same record-driven reply pattern for ecommerce orders
- Getting Started with Agent Accounts — the workspace model behind the donations inbox
- Agent Rules and Policies — the send caps and outbound rules that contain the agent
- Full command reference — every
nylas emailsubcommand and flag