Beta Table Webhook Guide
This guide will walk you through in a detailed manner on how to webhook data from the Beta Table V2 Indicator on TV straight into google sheets. Please find attached a document explaining webhooks, Beta Table Indicator & a copy of the google sheets webhook template. If you have any issues or queries whatsoever feel free to send me a DM. Please don't ask the guides to fix any issues they are extremely busy with grading
About Webhooks: https://www.tradingview.com/support/solutions/43000529348-about-webhooks/
Indicator: https://www.tradingview.com/script/Fz8PaiEn-MC-Beta-Table-Dual-Bench-V2/
Template: https://docs.google.com/spreadsheets/d/10AZKAqpDbgn6HH6jnW26jE7TVGOjngrbDB5dzlx919g/edit?usp=sharing
Step 1
Make a copy of the Beta Webhook Guide
Step 2
The first step of the webhook process is to create a script on google sheets that the TradingView webhook alert will be sent to. Click on the extensions drop down and press “Apps script”
Step 3
Once your on the apps script page click on the plus next to files and press script
Step 4
When you have pressed on script, paste the script found below and save. Remember to change the highlighted part of the script to the name of your sheet and cell you want the data to be updated into. When using the Beta Webhook Template the sheet name will be “Sheet 1” unless you have renamed it and the cell must be set to B5
function doPost(e) {
try {
// Get the raw message from the request
var message = e.postData.contents;
// Access the target spreadsheet and sheet
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('Sheet1');
// Ensure the sheet exists
if (!sheet) {
throw new Error("Sheet 'Sheet1");
}
// Always set the value of chosen cel to the alert string
sheet.getRange("B5").setValue(message);
// Return a response indicating success
return ContentService.createTextOutput("Received data: " + message).setMimeType(ContentService.MimeType.TEXT);
} catch (error) {
// Log any errors
console.error("Error processing webhook:", error);
// Return a response indicating failure
return ContentService.createTextOutput("Error processing webhook: " + error.message).setMimeType(ContentService.MimeType.TEXT);
}
}
Step 5
Once the script is written in and saved, press on the Deploy dropdown and click on “New deployment”
Step 6
This will then pop up on the screen, press the Settings dropdown and then click on “Web app”
Step 7
Write a description for the webhook, e.g “Webhook 1” , “Beta Webhook”
Execute as yourself this should read “Me(your email address)”
Who has access will be changed to anyone
Once you have changed the description go ahead and deploy the webhook
Step 8
You will then need to authorise access to the web app. Press Authorise access, select your google account and then press advanced. Now click on “Go to Untitled project(unsafe)”, this will then take you to another tab which you will need to press “allow”
Step 9
The web app will now be authorised and a new tab will open up, this is the information about your web app. Press done
Step 10
Now open Beta Table V2 on TradingView and change the chart to 1 min. This is so you're not waiting a full day to see if you've made any mistakes on sheets (alert will trigger on bar close). Add an alert to the indicator. Change the Alert name, the settings for the alert should look the same as down below. Don't press create just yet
Step 11
Go back onto google sheets and into apps script. You now have to copy the webhook URL. Press on “Manage Deployments” to again find your webhook URL you have created
Step 12
One you have pressed Manage Deployments copy the webhook URL to clipboard and go back onto TradingView
Step 13
Enable Webhook URL (you will need to go through an authentication process to use webhooks on TV this is easy and can be done in settings). Once finished the authentication process paste your webhook url and create the alert
Step 14
If you have followed the instructions correctly your Webhook template should be getting sent a payload on each bar close. Now delete the alert and create the alert again on the 1 day chart.
Congratulations, now your beta results are automated. If you have any problems feel free to send me a dm
Michael_MC