# Automated range trading with Uniswap V3 and Telegram: n8n workflow

> Started by a clock, and works across Telegram. 37 steps, 6 branches: large, and worth reading before you trust it with anything live.

Source: https://millionrounds.com/workflow/automated-range-trading-with-uniswap-v3-and-telegram (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Automated range trading with Uniswap V3 and Telegram

Started by a clock, and works across Telegram. 37 steps, 6 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomated-range-trading-with-uniswap-v3-and-telegram)

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

**6** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 2 Logic 10 Service 25

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

- 1 **Schedule Trigger** Schedule trigger *Starts it*
- 2 **When clicking ‘Execute workflow’** Manual trigger *Starts it*
- 3 **Swap Configs** Code *Logic*
- 4 **List wallets** One Shot *Service*
- 5 **Fetch Pool TWA Observations** One Shot *Service*
- 6 **If** If *Logic*
- 7 **Calculate TWAP** Code *Logic*
- 8 **Get Wallet ID** Code *Logic*
- 9 **Create wallet** One Shot *Service*
- 10 **Get Last Trade Type** One Shot *Service*
- 11 **Assure WETH Methods** One Shot *Service*
- 12 **Assure SwapRouter02 Methods** One Shot *Service*
- 13 **Assure USDC Methods** One Shot *Service*
- 14 **Assure ETH/USDC Pool Methods** One Shot *Service*
- 15 **Assure QuoterV2 Methods** One Shot *Service*
- 16 **Parse Last Trade** Code *Logic*
- 17 **Buy, Sell or Hold** Switch *Logic*
- 18 **Don't Repeat Sells** If *Logic*
- 19 **Don't Repeat Buys** If *Logic*
- 20 **Get Sell Qoute** One Shot *Service*
- 21 **Get Buy Qoute** One Shot *Service*
- 22 **Confirm Sell** Telegram *Service*
- 23 **Confirm Buy** Telegram *Service*
- 24 **Sell or Cancel?** If *Logic*
- 25 **Buy or Cancel?** If *Logic*
- 26 **Give Approval to Router (Sell)** One Shot Synch *Service*
- 27 **Sell Cancelled** Telegram *Service*
- 28 **Give Approval to Router (Buy)** One Shot Synch *Service*
- 29 **Purchase Cancelled** Telegram *Service*
- 30 **Sell ETH** One Shot Synch *Service*
- 31 **Sell Failure Notification** Telegram *Service*
- 32 **Buy ETH** One Shot Synch *Service*
- 33 **Buy Failure Notification** Telegram *Service*
- 34 **Check New Funds** One Shot *Service*
- 35 **Check Remaining Funds** One Shot *Service*
- 36 **Success Details (Sell)** Telegram *Service*
- 37 **Success Details (Buy)** Telegram *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 37, with 6 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Telegram
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

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

What starts it?

It starts on a clock.

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 37 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 37 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%2Fautomated-range-trading-with-uniswap-v3-and-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.

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

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Telegram giveaways among channel subscribers with Postgres** 37 steps · Postgres, Telegram](https://millionrounds.com/workflow/telegram-giveaways-among-channel-subscribers-with-postgres)
- [**Automated BTC & ETH market analysis alerts for Discord & Telegram** 37 steps · calls a model · Discord, RSS](https://millionrounds.com/workflow/automated-btc-and-eth-market-analysis-alerts-for-discord-and)
- [**Manage on-campus event attendance with Google Sheets** 35 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/manage-on-campus-event-attendance-with-google-sheets)
- [**Onboard frontline workers with Telegram and DeepSeek** 35 steps · Notion, Telegram](https://millionrounds.com/workflow/onboard-frontline-workers-with-telegram-and-deepseek)
- [**Manage Supabase database records with Telegram** 34 steps · Supabase, Telegram](https://millionrounds.com/workflow/manage-supabase-database-records-with-telegram)
- [**Create and optimize B2B LinkedIn AI posts with Groq** 34 steps · calls a model · LinkedIn, Telegram](https://millionrounds.com/workflow/create-and-optimize-b2b-linkedin-ai-posts-with-groq)
