Automating Trade Alerts with N8N Starter and TradingView Webhooks
Step‑by‑step guide to set up automated trade alerts using TradingView webhooks and N8N Starter, including common pitfalls and how to avoid them.
LWA Store AI Editor
Editorial Team
Automating trade alerts with TradingView and N8N Starter is straightforward once you understand the exact steps and potential pitfalls. This guide walks you through creating a TradingView alert, exposing a webhook URL, and configuring N8N to act on that data.
1. Prepare TradingView Alerts
- Log in to TradingView Premium.
- Open the chart for the instrument you want to monitor.
- Click the alert icon (clock) and choose a condition (e.g., price crosses above 50‑EMA).
- In the alert dialog, select Webhook URL and paste the URL you’ll create in N8N (see step 3).
- Set the alert frequency (once per bar, once per session, etc.) and click Create.
- Verify the alert triggers by waiting for the condition or using the Test Alert button.
Common mistake: forgetting to enable the Webhook URL option; alerts will default to email only.
2. Set Up N8N Starter
- Purchase and download N8N Starter.
- Install Docker on your server or local machine.
- Run the following command to launch N8N:
docker run -it --rm -p 5678:5678 -v ~/.n8n:/root/.n8n n8nio/n8n:latest
- Open http://localhost:5678 and create an account.
- In the workflow editor, drag a Webhook node to the canvas.
- Set the HTTP Method to POST and copy the generated URL (e.g.,
http://localhost:5678/webhook-abc123). - Paste this URL into the TradingView alert’s webhook field.
Potential issue: if your machine reboots, the Docker container restarts and the webhook URL may change. Use a static IP or a reverse proxy to keep the URL stable.
3. Build a Simple Workflow
- After the Webhook node, add a HTTP Request node.
- Configure it to send a POST to your broker’s API or to a Telegram bot for notifications.
- Map the JSON payload from TradingView (e.g.,
$json.price) into the request body. - Activate the workflow and test by triggering the alert.
What can go wrong: broker APIs may require authentication tokens; missing headers will cause 401 errors.
4. Secure the Connection with a VPN
- Install Express VPN or Nord VPN on the server hosting N8N.
- Connect to a server in a country that allows unrestricted trading.
- Verify the public IP via whatismyipaddress.com to ensure it matches the VPN server.
Using a VPN adds a layer of privacy and can bypass regional restrictions on exchanges.
5. Monitor and Maintain
- In N8N, enable the Workflow Logging feature to capture errors.
- Set up email or SMS notifications for failed executions.
- Regularly update the broker API credentials and N8N Docker image.
- Re‑test alerts after any major change.
Remember that TradingView’s webhook payload is JSON; if you need custom formatting, use a Function node to transform it before sending to your broker.
For more advanced reporting, consider integrating Canva Pro to generate visual trade summaries, or use the related article for design tips. Also read this guide on the value of TradingView Premium for automation.


