# Confirm COD orders and recover carts with Telegram: n8n workflow

> Started by an incoming Telegram message, and works across Google Sheets, Slack and Telegram. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/confirm-cod-orders-and-recover-carts-with-telegram (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [E-commerce](https://millionrounds.com/workflows?category=E-commerce#library)

# Confirm COD orders and recover carts with Telegram

Started by an incoming Telegram message, and works across Google Sheets, Slack and Telegram. It hands the judgement calls to OpenAI. 33 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fconfirm-cod-orders-and-recover-carts-with-telegram)

**33 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**1** Loop or waits

**3** Services it connects to

## The flow

Starts it 5 Model 2 Logic 9 Service 17

The steps in the order they run, from what starts it.

- 1 **Listen for Button Replies** Telegram trigger *Starts it*
- 2 **Every 15 Minutes** Schedule trigger *Starts it*
- 3 **New Order Placed** Webhook *Starts it*
- 4 **Cart Abandoned** Webhook *Starts it*
- 5 **On Workflow Error** Error trigger *Starts it*
- 6 **Route Confirm vs Cancel** Switch *Logic*
- 7 **Get Pending Orders** Google Sheets *Service*
- 8 **Normalize Order Data** Set *Logic*
- 9 **Normalize Cart Data** Set *Logic*
- 10 **Slack – Post Workflow Error Alert** Slack *Service*
- 11 **Update Sheet, Confirmed** Google Sheets *Service*
- 12 **Update Sheet, Cancelled** Google Sheets *Service*
- 13 **Calculate Elapsed & Nudge Stage** Code *Logic*
- 14 **Log Order to Sheet** Google Sheets *Service*
- 15 **Log Abandoned Cart** Google Sheets *Service*
- 16 **Send Confirmation Thanks** Telegram *Service*
- 17 **Send Cancellation Ack** Telegram *Service*
- 18 **Filter, Due for Nudge Now** Filter *Logic*
- 19 **Filter, RTO Risk (2hr+)** Filter *Logic*
- 20 **Send Order Confirmation** Telegram *Service*
- 21 **Wait 30 Minutes** Wait *Logic*
- 22 **Notify Admin, Order Cancelled** Telegram *Service*
- 23 **Generate Nudge Message (AI)** Open Ai *Model*
- 24 **Notify Admin, RTO Risk** Telegram *Service*
- 25 **Check If Order Placed** Google Sheets *Service*
- 26 **Send Follow-Up Nudge** Telegram *Service*
- 27 **Mark RTO Risk in Sheet** Google Sheets *Service*
- 28 **Order Already Placed?** If *Logic*
- 29 **Update Nudge Count** Google Sheets *Service*
- 30 **Skip, Already Ordered** No Op *Logic*
- 31 **Generate Discount Message (AI)** Open Ai *Model*
- 32 **Send Discount Recovery** Telegram *Service*
- 33 **Update Cart, Recovery Sent** Google Sheets *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 33, with 2 branches, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets, Slack, Telegram
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Google Sheets, Slack and Telegram accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 33 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 33 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fconfirm-cod-orders-and-recover-carts-with-telegram)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also e-commerce, with the same services where possible, closest in size first.

- [**Manage your WooCommerce store with OpenAI** 32 steps · calls a model · Discord, Gmail](https://millionrounds.com/workflow/manage-your-woocommerce-store-with-openai)
- [**Process prescription orders and refills with Telegram** 32 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/process-prescription-orders-and-refills-with-telegram)
- [**Handle voice food orders with Google Sheets** 32 steps · Google Sheets](https://millionrounds.com/workflow/handle-voice-food-orders-with-google-sheets)
- [**Handle WhatsApp orders, FAQs, and tracking with OpenAI** 37 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/handle-whatsapp-orders-faqs-and-tracking-with-openai)
- [**Share Shopify New Products Across All Social Media Platforms** 29 steps · calls a model · Discord, Gmail](https://millionrounds.com/workflow/share-shopify-new-products-across-all-social-media-platforms)
- [**Generate UGC promo videos with OpenAI and Sora 2** 28 steps · calls a model · Telegram](https://millionrounds.com/workflow/generate-ugc-promo-videos-with-openai-and-sora-2)
