You are helping me build the following AI agent workflow. ## Goal Telegram Stars Payment And Refund Workflow: Automates Telegram Stars invoicing, pre-checkout approvals, transaction logging in Google Sheets, and refunds via user ID. ## Specification - What it does: You receive instant Telegram Stars invoices directly in your chat without manual setup. This workflow automatically logs every transaction to Google Sheets for clear financial tracking and handles refunds instantly using your stored user ID. - Trigger: Triggered by an event (Event ยท on Telegram payment request) - Autonomy: Fully hands-off - Expected setup effort: under an hour - Tools/services involved: - Telegram: Invoice creation and refund processing - Google Sheets: Recording transaction logs - HTTP Request: API communication with Telegram ## Known pitfalls, handle each one explicitly in your implementation 1. Telegram requires valid currency codes for Star transactions so you must ensure your payload uses 'XTR' instead of standard ISO codes. 2. Invoice payloads have strict character limits for titles and descriptions so keep text concise to avoid API rejection errors. 3. Refund processing relies on unique charge IDs which expire after a certain period so store these immediately in Google Sheets upon payment. ## Reference implementation https://n8n.io/workflows/2461 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/telegram-stars-payment-and-refund-workflow/ via usecasesforagents.com