{"product_id":"n8n-finance-chatbot-answer-xero-queries-via-whatsapp-telegram","title":"n8n Finance Chatbot: Answer Xero Queries via WhatsApp \u0026 Telegram","description":"\u003ch3\u003eGet instant finance answers from Xero—right in WhatsApp \u0026amp; Telegram\u003c\/h3\u003e\n\u003cp\u003eThis n8n Finance Chatbot workflow receives WhatsApp (via a WAHA webhook) and Telegram messages, classifies your finance question with OpenAI, pulls \u003cstrong\u003eread-only\u003c\/strong\u003e data from Xero, and replies with a validated finance report. Optionally, the workflow can post the previous answer to \u003cstrong\u003eSlack\u003c\/strong\u003e after user confirmation.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIngests messages\u003c\/strong\u003e from WhatsApp (WAHA webhook with raw-body HMAC validation) and Telegram.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes and secures requests\u003c\/strong\u003e into a common format, loads deployment settings, and blocks users not on an allowlist.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eManages conversation state\u003c\/strong\u003e using the n8n Data Table \u003cem\u003e“Finance Bot Conversation State”\u003c\/em\u003e to decide whether to post to Slack, cancel, or treat the message as a new finance question.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eClassifies finance intent\u003c\/strong\u003e with OpenAI (e.g., accounts receivable, cash position, bills due this week, or unknown).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetches the right Xero data\u003c\/strong\u003e by resolving the correct Xero tenant from the connected Xero organisations and using \u003cstrong\u003eGET\u003c\/strong\u003e requests.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBuilds a canonical report and validates it\u003c\/strong\u003e by transforming the Xero response into text, asking OpenAI to format a concise reply, and verifying that numbers\/tokens were not altered (otherwise it falls back to canonical text).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends the reply\u003c\/strong\u003e back via WhatsApp or Telegram, and posts to \u003cstrong\u003eSlack\u003c\/strong\u003e only when the user confirms.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAsk, “What are my accounts receivable?” and receive an up-to-date answer from Xero in WhatsApp.\u003c\/li\u003e\n  \u003cli\u003eGet “cash position” summaries in Telegram for quick daily cash visibility.\u003c\/li\u003e\n  \u003cli\u003eCheck “bills due this week” without logging into Xero.\u003c\/li\u003e\n  \u003cli\u003eConfirm whether the workflow should post the prior finance answer to Slack for your team.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003en8n workflow with nodes including \u003cstrong\u003ewebhook\u003c\/strong\u003e, \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eswitch\u003c\/strong\u003e, and \u003cstrong\u003eslack\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eWhatsApp integration via \u003cstrong\u003eWAHA webhook\u003c\/strong\u003e (raw-body HMAC validation).\u003c\/li\u003e\n  \u003cli\u003eMessage classification and formatting with \u003cstrong\u003eOpenAI\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eRead-only data retrieval from \u003cstrong\u003eXero\u003c\/strong\u003e using \u003cstrong\u003eGET\u003c\/strong\u003e requests.\u003c\/li\u003e\n  \u003cli\u003eConversation persistence in n8n Data Table: \u003cem\u003e“Finance Bot Conversation State”\u003c\/em\u003e with columns like \u003cstrong\u003estateKey\u003c\/strong\u003e, \u003cstrong\u003euserId\u003c\/strong\u003e, \u003cstrong\u003echannel\u003c\/strong\u003e, \u003cstrong\u003echatId\u003c\/strong\u003e, \u003cstrong\u003elastIntent\u003c\/strong\u003e, \u003cstrong\u003elastRes\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46146236383411,"sku":"N8N-20274","price":25.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/bY_rZH71-RHJUGdVWDO0J_sXS0Fc6w.png?v=1790845340","url":"https:\/\/buyflowscripts.com\/products\/n8n-finance-chatbot-answer-xero-queries-via-whatsapp-telegram","provider":"N8N Commerce","version":"1.0","type":"link"}