# Payment processing and order tracking with YooKassa: n8n workflow

> Started by another system calling it, and works across Google Sheets. 39 steps, 9 branches: large, and worth reading before you trust it with anything live.

Source: https://millionrounds.com/workflow/payment-processing-and-order-tracking-with-yookassa (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Money admin](https://millionrounds.com/workflows?category=Money+admin#library)

# Payment processing and order tracking with YooKassa

Started by another system calling it, and works across Google Sheets. 39 steps, 9 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpayment-processing-and-order-tracking-with-yookassa)

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

**9** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 18 Logic 12 Service 9

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

- 1 **Get products** Webhook *Starts it*
- 2 **Payment** Webhook *Starts it*
- 3 **Status** Webhook *Starts it*
- 4 **Handle YooKassa webhook** Webhook *Starts it*
- 5 **Get products_1** Google Sheets *Service*
- 6 **Check request values** If *Logic*
- 7 **Check request values_1** If *Logic*
- 8 **Handle Events** Switch *Logic*
- 9 **Sorting by price** Sort *Logic*
- 10 **Handle Error (get product)** Respond To Webhook *Starts it*
- 11 **Email validation** If *Logic*
- 12 **Handle Error** Respond To Webhook *Starts it*
- 13 **YooKassa Request Status** Http Request *Service*
- 14 **Handle Error (check request)** Respond To Webhook *Starts it*
- 15 **Validation metadata** If *Logic*
- 16 **Validation metadata_** If *Logic*
- 17 **Respond Products** Respond To Webhook *Starts it*
- 18 **Get product_id** Set *Logic*
- 19 **Respond status** Respond To Webhook *Starts it*
- 20 **Handle Error status** Respond To Webhook *Starts it*
- 21 **Get Order** Google Sheets *Service*
- 22 **Handle Error webhook** Respond To Webhook *Starts it*
- 23 **Get transaction** Google Sheets *Service*
- 24 **Get Product** Google Sheets *Service*
- 25 **Check Order** If *Logic*
- 26 **Check if transaction exists** If *Logic*
- 27 **Check product_id** If *Logic*
- 28 **Handle Error (get product)_1** Respond To Webhook *Starts it*
- 29 **Save Transaction** Google Sheets *Service*
- 30 **Update refund status** Google Sheets *Service*
- 31 **Idempotence Key Generation** Code *Logic*
- 32 **Handle Error (product_id)** Respond To Webhook *Starts it*
- 33 **Respond payment event** Respond To Webhook *Starts it*
- 34 **Respond refund event** Respond To Webhook *Starts it*
- 35 **YooKassa Request** Http Request *Service*
- 36 **Save Order** Google Sheets *Service*
- 37 **Handle Error (yookassa)** Respond To Webhook *Starts it*
- 38 **Respond Payment** Respond To Webhook *Starts it*
- 39 **Handle Error (save order)** Respond To Webhook *Starts it*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 39, with 9 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Google Sheets account. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 39 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 39 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%2Fpayment-processing-and-order-tracking-with-yookassa)
- **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)

## Workflows like it

Also money admin, with the same services where possible, closest in size first.

- [**Gmail invoice reader with Ollama** 40 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/gmail-invoice-reader-with-ollama)
- [**Quotes to viral videos with Gemini and ElevenLabs** 37 steps · calls a model · Google Cloud Storage, Google Sheets](https://millionrounds.com/workflow/quotes-to-viral-videos-with-gemini-and-elevenlabs)
- [**AI-powered invoice processing automation with Google Sheets** 44 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/ai-powered-invoice-processing-automation-with-google-sheets)
- [**Invoice verification and validation with Gmail and Drive** 34 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/invoice-verification-and-validation-with-gmail-and-drive)
- [**AI-powered receipt and expense tracker with Telegram** 45 steps · calls a model · Google Sheets, Redis](https://millionrounds.com/workflow/ai-powered-receipt-and-expense-tracker-with-telegram)
- [**Credit card payment reminder & tracking-for Taiwan banks** 31 steps · Gmail, Google Calendar](https://millionrounds.com/workflow/credit-card-payment-reminder-and-tracking-for-taiwan-banks)
