webrarium logo

A Telegram bot for tracking Nova Poshta parcels: how it works

How to build a Telegram bot that answers "where's my parcel?" on its own: the Nova Poshta API, finding orders by phone number, arrival notifications and common integration mistakes.

4 min readAI & chatbots
  • Telegram
  • Нова пошта
  • Shopify
A Telegram bot for tracking Nova Poshta parcels: how it works

"Where's my parcel?" is the most frequent question in any online store. A manager opens the order, copies the tracking number, pastes it on the Nova Poshta website and copies the status back into the chat. Two or three minutes per request, dozens of times a day. A Telegram bot integrated with Nova Poshta, Ukraine's largest delivery service, does it in a second. Here's how it works under the hood.

How a Telegram bot works with the Nova Poshta API

The flow in its simplest form:

  1. The customer sends the bot a tracking number, an order number or a phone number.
  2. The bot finds the tracking number, either directly or through the order in the store (Shopify, WooCommerce, CRM).
  3. The bot requests the status from the Nova Poshta API.
  4. The bot replies in plain language: where the parcel is, when it will arrive and how many days of free storage are left.

Step 2 is the most important. Customers almost never remember their tracking number, but they always know their phone number.

Requesting a shipment status through the Nova Poshta API

The Nova Poshta API takes JSON requests at a single endpoint, specifying the model and method. For a parcel's status, you use the document tracking model:

{
  "apiKey": "YOUR_KEY",
  "modelName": "TrackingDocument",
  "calledMethod": "getStatusDocuments",
  "methodProperties": {
    "Documents": [
      { "DocumentNumber": "20450000000000", "Phone": "380670000000" }
    ]
  }
}

What's worth knowing from practice:

  • A phone number in the request unlocks extended data. Without it, only the basic status comes back.
  • You can check several tracking numbers in one request, which saves limits when the bot checks all active shipments.
  • The response has a numeric status code and text. Build the bot's logic on the code, not the text, because the text can change.
  • Dates and branches come back in separate fields; the bot uses them to compose a human reply instead of showing the raw status.

Finding an order by phone: integrating with the store

For the bot to find a parcel by phone number, it needs access to orders:

  • Shopify: search orders by the customer's phone through the Admin API and take the tracking number from the fulfilment's tracking field.
  • WooCommerce: through the REST API and the meta field where the delivery plugin stores the tracking number.
  • CRM (KeyCRM, SalesDrive, Bitrix24 and others): through their APIs.

If your shipments are created automatically on payment, as in our Shopify → Nova Poshta integrations, the number is written to the order immediately and the bot always has fresh data.

Parcel arrival notifications

The most valuable feature is the bot messaging first, without waiting for a question:

  • "Your parcel has shipped, tracking number 2045…, estimated arrival Thursday";
  • "Your parcel has arrived at branch #12. Free storage until Saturday";
  • "Your parcel has been waiting for 4 days. Tomorrow is the last day of free storage".

That last message noticeably reduces returns from uncollected parcels, and for stores with cash on delivery that's money straight back.

Technically, the bot checks all active shipments on a schedule and compares the status with the previous one. Remember Telegram's limitation: a bot can only message people who pressed "Start". So put the bot link on the "Thank you for your order" page and in the confirmation SMS or email.

AI or buttons: how the bot understands the customer

  • The button version: "Track parcel" → "Enter your phone" → status. Reliable and cheap.
  • The AI version: the customer writes however they like ("I ordered a dress on Monday, where is it?"), and the bot extracts the phone number, finds the order and replies. It also answers related questions: exchanges, returns, storage terms.

For a store with dozens of requests a day, we usually recommend the AI version with suggestion buttons, so the customer can either tap or type.

Common Nova Poshta integration mistakes

  1. The API key in the frontend. The key must live only on the server.
  2. Polling every tracking number with a separate request every 5 minutes. Use batch requests and a sensible interval, or you'll hit the limits.
  3. Logic built on the status text. The text changes; use the codes.
  4. No outage handling. The API sometimes doesn't respond; the bot should show the last known status and retry later.
  5. The bot doesn't know about returns and redirects. These are separate statuses and need their own replies.

Summary

A Telegram bot for Nova Poshta is one of the fastest-paying bots for an online store: it closes the most frequent question, reduces uncollected parcels and works around the clock. The keys to success are finding orders by phone through the store integration and proactive notifications. If your shipments are still created by hand, start by automating them; the bot is added on top in a matter of days.

FAQ

Where do I get a Nova Poshta API key?

In the Nova Poshta business account, under security settings, where the API key is generated. The key is tied to your contract, so keep it only on the bot's server, never in code customers can see.

Can you look up someone else's parcel status by tracking number?

The basic status, yes. Full information (recipient name, address and so on) is returned only together with the sender's or recipient's phone number. That's why the bot asks the customer for their phone or takes it from the store order.

How does the bot know a parcel has arrived without the customer asking?

The bot checks the statuses of active shipments on a schedule (for example, every hour) and, when the status changes to "arrived at branch", messages the customer itself. A bot can only message people who have pressed "Start" before, so give the bot link right after checkout.

What if the Nova Poshta API doesn't respond?

Build it into the logic: retry the request with a pause, show the customer the last known status with a timestamp and don't crash with an error. API outages happen, and the bot should survive them without the customer noticing.

Does this work for Ukrposhta or Meest?

Yes, the logic is the same: these carriers have tracking APIs too. The bot detects the carrier from the number format or the order data and calls the right API.