To install the Python package dependencies you have to type pip install -r requirements.txt into the command prompt which already cd into the project directory.
- A ngrok account.
- A pipedream account or any other workflow
- Docker Desktop (optional) - If you want to use the Docker version. automation service.
- Make a copy of the
config.example.toml. - Rename the copied file to
config.toml. - Open
config.tomlwith any text editor you like. - Set
mode_traditionaltofalse. - Copy your ngrok authtoken and fill in
ngrok_auth_token.
- (Optional) Set
ngrok_api_server_auth_keyto a fixed API key if you want to use the same key every time. Leave it empty to auto-generate a new key on each startup. - Fill in
webhook_urlswith your webhook service URLs.
Note
It is a good idea to test your signal or the program using a webhook test service such as webhook.site instead of using your production webhook.
- Save the config file.
- Open the command prompt and cd into the project directory.
- Type
pip install -r requirements.txtto install the Python package dependencies. - Type
python main.pyto start the program.
- Open the command prompt and cd into the project directory.
- Type
docker-compose buildto build the docker image. - Type
docker-compose upto start the program. (You can close the command prompt after finishing next step.)
Warning
Your config.toml will be copied directly into the docker image. Meaning that you WILL expose your secrets to the public if you push/share the docker image to the public/others. (You should not do that.)
Note
To view the program logs, simply click the name of the tradingview-free-webhook-alerts container. (You have to do this to get the API KEY and ngrok URL.)
Note
You have to run the docker-compose build & docker-compose up command if you updated the config.toml.
- Copy the "API KEY" and "ngrok URL" from the command prompt and paste them somewhere for later use.

- Keep the program running in the background.
⚠️ Every time you start the program, you will get a new API KEY and ngrok URL. You need to update the webhook service with the new API KEY and ngrok URL.
Setting up pipedream
- Login to pipedream and create a new workflow.
- Select
New Emailsas the trigger.
- Copy the email address given by pipedream and paste it into the
Email-to-SMSfield in your TradingView account. (You can follow this instruction to change theEmail-to-SMSemail address.) - In order to find out the
Email-to-SMSupdate verification code, you need to click the event dropdown menu below the given email address and select the verification email.
- Find your verification code under
steps.trigger -> event -> body -> textand paste it back into theEmail-to-SMSfield. - Click the "Continue" button.
- Select
HTTP / Webhook.
- Select
Send any HTTP Request.
- Change the HTTP request method to
POST. - Paste the ngrok URL into the "URL" field and add
/apito the end of the URL.
- Add a new header field with the name
X-API-KEYand paste the API KEY into the value field. - Go to the "Body" tab.
- Change the "Content Type" to
application/json. - Copy and paste the following KEY and VALUE pairs.
| KEY | VALUE |
|---|---|
from |
{{steps.trigger.event.headers.from.value[0].address}} |
subject |
{{steps.trigger.event.headers.subject}} |
content |
{{steps.trigger.event.body.text}} |
receive_datetime |
{{steps.trigger.context.ts}} |
(order is not important)
- Click the "Test" button.
- If you see the message "Success", you can click the "Deploy" button.
- You are done! Now you can test your TradingView alert.
- An IMAP available email account (eg.Hotmail, Outlook, Gmail, etc.)
You must finish the following steps before using the program.
- Make a copy of the
config.example.toml. - Rename the copied file to
config.toml. - Open
config.tomlwith any text editor you like. - Fill in
email_addressandlogin_passwordwith your email and password. - Fill in
imap_server_addressandimap_server_portwith your email server and port. (For example, if you are using Hotmail, it will beoutlook.office365.comand993, Gmail will beimap.gmail.comand993.) - Fill in
webhook_urlswith your webhook service URLs. - Save the config file.
You can adjust other settings on your own.
Note
It is a good idea to test your signal or the program using a webhook test service such as webhook.site instead of using your production webhook.
You must finish the following steps before using the program.
- Enable
2-Step Verificationon your Gmail account. - Create an App Password for the program to use. (Please read through this article for more information.) It is recommended to choose
Other (Custom name)as the app in order to make it easier to identify in the future. - Fill in
email_addressandlogin_passwordwith your email and the app password. - Enable IMAP in your email account. (Please read through this article for more information.)
You are good to go!
- Enable IMAP in your email account.
- Create a new alert as usual. (Fill in the
Condition,OptionsandExpiration timefields.) - Enable
Send email-to-SMS/Send emailand other action you want inAlert actions. If you want another email address that is different from your TradingView account, you should enableSend email-to-SMSinstead ofSend email. - Fill in the
Alert nameand your webhook message inMessage. - Save the alert.
- Open the command prompt and cd into the project directory.
- Run
python main.pyin the command prompt.
- Open the Docker Desktop
- Click to the "Containers" tab.
- Click the "Run" button. (Inside the "Actions" column)
Warning
If you are using ngrok version (Local / Docker), you will get a new API KEY and ngrok URL every time you start the program. You need to update the webhook service with the new API KEY and ngrok URL.









