Skip to content
Guide

How to log TradingView alerts in Google Sheets with a webhook

Give TradingView a webhook URL, write the alert message as JSON with {{ticker}} and {{close}}, and add a row per alert to a Google Sheet. No Apps Script.

Updated

TradingView alerts can call a webhook URL when a condition fires. If you want a record of every alert, a Google Sheet is hard to beat: ticker, price, time and the strategy's action, one row each, ready to sort and chart. This guide gives TradingView a URL, shapes the alert message so each value is its own field, and adds a row per alert. No Apps Script, no server.

  1. Trigger

    When a webhook is received

    TradingView posts the alert message to this URL.
  2. Step 1

    Add row to Google Sheets

    Ticker Trigger → Ticker, Price Trigger → Price, Action Trigger → Action
The workflow you'll build: an alert in, a row out.

Before you start

  • A Foliot account and a Google account that can edit the spreadsheet.
  • A spreadsheet with headers in row 1, for example Time, Ticker, Price, Action, Interval, Received.
  • A TradingView account whose plan includes webhook notifications for alerts, with two-factor authentication turned on: TradingView only allows webhook alerts when 2FA is enabled (About webhooks, checked October 17, 2026).

Set it up

1. Create the workflow and copy the webhook URL

Create a new workflow and choose When a webhook is received. Copy the URL (https://usefoliot.com/api/hooks/…). It's HTTPS on port 443, which TradingView accepts (it only sends to ports 80 and 443). Keep the URL private: anyone with it can add rows.

2. Write the alert message as JSON

TradingView sends the alert's message as the request body. If the message is valid JSON it's sent as application/json; otherwise as plain text. JSON is what you want, because each value then becomes its own field. In the alert's Message box, use TradingView's placeholders (the full list):

{
  "ticker": "{{ticker}}",
  "exchange": "{{exchange}}",
  "price": {{close}},
  "time": "{{time}}",
  "interval": "{{interval}}",
  "action": "{{strategy.order.action}}"
}

Numbers like {{close}} go without quotes so they arrive as numbers; text placeholders go in quotes. {{strategy.order.action}} only has a value for strategy alerts; for an indicator alert, write a fixed word like "buy" instead, or leave it out. Then open the alert's Notifications tab, tick Webhook URL and paste the Foliot URL.

3. Send one test alert

While the workflow is off, requests are saved as sample data instead of running. Click Get sample data in Foliot and wait for the alert to fire, or send the same JSON yourself with curl to move on now. Each field shows as a chip: Trigger → Ticker, Trigger → Price, Trigger → Action.

4. Add the Google Sheets step

Click + and choose Add row to Google Sheets. Connect your Google account, paste the spreadsheet's link and click Load sheet (Google's picker gives Foliot access to that one file), choose the tab, and fill each column from the chips. Received can be Trigger → Received at, the moment the request arrived.

5. Test the step, then turn the workflow on

Test this step adds a real row. When it looks right, switch the workflow on. From then on each alert adds a row within a few seconds. Foliot answers 202 at once, well inside the three seconds TradingView waits before giving up on a webhook.

Useful variations

  • Only some alerts: a Filter such as “Only continue if Trigger → Action is buy”.
  • A Discord or Slack message too: add Post to Discord or Post to Slack after the row. See post to Discord.
  • Readable time: TradingView's {{time}} is an ISO time in UTC. A Format step can show it in your workflow's timezone, as “17 Oct 2026, 9:05 AM”.
  • Several alerts, one sheet: point every alert at the same URL and let the Ticker and Action columns tell them apart, or add a fixed "alert": "RSI oversold" field to each message.

Good to know

  • Each alert is one run: 500 runs a month on the free plan, 10,000 on Pro ($12 a month). A strategy that fires every few minutes adds up; check TradingView's alert log and Foliot's run history to see the rate.
  • Up to 60 requests a minute per workflow; bodies up to 256 KB.
  • Anything that looks like a formula (starting with =) is stored as text, so an alert can't run a formula in your sheet.
  • TradingView notes that webhook delivery can occasionally fail; its alert log has a “Webhook status” column. Foliot's run history shows every request that did arrive.
  • This logs alerts. Nothing here places trades, and it isn't trading advice.

Other ways to do it

  • Google Apps Script. A doPost web app that appends the row. Free and under your control; you maintain the code and get no retries or run history unless you build them.
  • Alert emails and a filter. TradingView can email alerts; a rule in your inbox keeps them in one folder. No sheet, but no setup.
  • Zapier or Make, with a webhook trigger and a Sheets action. See Foliot vs Zapier for the pricing difference.

Questions

Does the alert message have to be JSON?

No, but it helps. A JSON message arrives as separate fields you can put in separate columns. A plain-text message arrives as one field; a Format step can split it.

Which TradingView plan do I need?

One that includes webhook notifications for alerts (check TradingView's plan comparison), with two-factor authentication turned on, which TradingView requires for webhook alerts.

What if TradingView's request fails?

Foliot answers within TradingView's 3-second limit, and every request that arrives is in the run history. TradingView's own alert log has a Webhook status column for the ones that didn't.

Is it free?

Foliot's free plan includes 500 runs a month and 5 active workflows; each alert is one run. Pro is $12 a month for 10,000 runs.