> For the complete documentation index, see [llms.txt](https://docs.oxapay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oxapay.com/welcome-to-oxapay/integrations/n8n-automation/telegram-bot.md).

# Telegram Bot

This integration shows how to connect **OxaPay** with **Telegram** using **n8n workflows**. By combining OxaPay’s crypto payment APIs with Telegram automation in n8n, you can create a bot that generates payment requests, sends invoice links to customers, receives real-time payment status updates, and notifies users or admins when a transaction is completed.

<div data-with-frame="true"><figure><img src="/files/QKbYbp76OS4NOJe1vBiv" alt=""><figcaption></figcaption></figure></div>

### What can you build with OxaPay and Telegram on n8n?

* Generate crypto invoice links from Telegram commands
* Send payment links directly to users in private chats or groups
* Send automatic confirmation messages when a payment is paid
* Deliver digital products, activation keys, download links, or access credentials after successful payment
* Store payment records inside n8n Data Tables, Google Sheets, Airtable, Notion, or your own database

### Example Automation Scenarios <a href="#example-automation-scenarios" id="example-automation-scenarios"></a>

{% stepper %}
{% step %}

#### Scenario 1: Telegram Payment Bot

n8n receives the message through the Telegram Trigger node, extracts the amount and currency, creates an OxaPay invoice through the OxaPay node, and sends the generated payment URL back to the user in Telegram.
{% endstep %}

{% step %}

#### Scenario 2: Admin Alert System

Whenever a payment is created, paid, underpaid, expired, or refunded, n8n can send a message to a private Telegram admin group.
{% endstep %}

{% step %}

#### Scenario 3: Digital Product Delivery

After OxaPay confirms that the invoice status is paid, n8n can automatically send a digital product to the customer.
{% endstep %}
{% endstepper %}

### **Telegram Payment Bot with OxaPay** Workflow&#x20;

This n8n workflow connects the OxaPay node with the Telegram node to create a fully automated Telegram payment bot. Merchants can use the bot to generate OxaPay invoice links, white-label addresses, or static payment addresses directly from Telegram. The Webhook workflow listens for payment updates and sends real-time Telegram notifications when a payment is received, confirmed, or completed. You can download the n8n workflow file below:

{% file src="/files/tTSBlVXy5p0j4yDmI0hc" %}

#### Before starting, make sure you have:

* An active OxaPay account with API access
* A Telegram bot token created via BotFather
* A self-hosted n8n instance with access to community nodes

#### How to build and configure this Telegram payment bot using n8n?

1. Before importing or configuring the workflow, make sure the OxaPay Community node is installed in your n8n instance. You can install it from the n8n settings by going to Settings, opening Community nodes, selecting Install, entering the package name n8n-nodes-oxapay, and confirming the installation. After installation, the OxaPay node will be available in your n8n node list.

<div data-with-frame="true"><figure><img src="/files/auW2snCWrrxGF6XPDSP1" alt=""><figcaption></figcaption></figure></div>

2. To get started, open your n8n dashboard and create a new workflow by clicking “Create Workflow”.&#x20;

<div data-with-frame="true"><figure><img src="/files/qwcxTZz8tw14N98IlZWo" alt=""><figcaption></figcaption></figure></div>

3. In the top-right corner of the n8n workflow editor, click the three-dot menu, select “Import from File”, and upload the downloaded workflow JSON file.

<figure><img src="/files/iMUeLKtB6J6ZvwTuUQFx" alt=""><figcaption></figcaption></figure>

4. Now, open each node in the workflow one by one and complete the required setup steps, including connecting your OxaPay and Telegram credentials, checking the node parameters, and adjusting any values based on your use case.

<div data-with-frame="true"><figure><img src="/files/7Bv92lrpb2ECwe3rjm3j" alt=""><figcaption></figcaption></figure></div>

5. In the n8n Data Table section, create a new table by importing the provided CSV file. After importing the file, review each column, save the table and connect it to the related Data Table nodes in the workflow.

{% file src="/files/NQtMW3PczEMqVNJw7JqI" %}

<div data-with-frame="true"><figure><img src="/files/KuRpNvSxot41NerIOTQd" alt=""><figcaption></figcaption></figure></div>

6. Now, click Publish in the top-right corner. This will save and activate the workflow so it can start receiving Telegram events.

<div data-with-frame="true"><figure><img src="/files/6FO4Mkx0B5YmD5aLr7r4" alt=""><figcaption></figcaption></figure></div>

7. For real-time payment status notifications, create a separate n8n workflow and import the webhook workflow file below. This workflow will receive OxaPay payment updates and send automated Telegram notifications when a payment status changes.

{% file src="/files/EyEzOYjVVjOsMsac605W" %}

8. In this workflow, the Data Table node is used to store Telegram payment records. Before running the workflow, create a new Data Table in n8n by importing the provided CSV file below.

{% file src="/files/3Q2X5LhJg7HAB1s1HkpU" %}

9. Once all nodes are configured, copy the Production URL from the Webhook node in this workflow and add it as the Callback URL in all OxaPay nodes that create invoices or payment requests in the previous workflow. Finally, click Publish to save and activate the workflow.

### Conclusion and Next Steps

**With these two n8n workflows configured, your Telegram payment bot powered by OxaPay is ready to use:**

* The first workflow manages Telegram interactions and creates payment requests through the OxaPay node.
* The second workflow receives OxaPay payment updates through a webhook and sends automated Telegram notifications when a payment is updated or completed.

**You can extend this setup by adding:**

* Automatic delivery of digital products, license keys, invite links, or access credentials after successful payment
* Transaction logging in Google Sheets, Airtable, CRM platforms, or external databases
* Admin notifications for new payments, completed payments, and payment-related issues

By connecting OxaPay, Telegram, and n8n, you can create a flexible crypto payment automation system that works directly inside Telegram without building a custom backend.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oxapay.com/welcome-to-oxapay/integrations/n8n-automation/telegram-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
