πŸ“ˆ Scan multi-timeframe stock breakouts with Google Sheets, GPT-4.1 and Slack

⚑ 1 views Β· πŸ“ˆ Crypto Trading & Stock Market

Description

Quick overview

This workflow runs daily to scan a Google Sheets watchlist for active tickers, fetches daily and weekly OHLCV data via an HTTP API, uses OpenAI to summarize confirmed multi-timeframe breakouts, logs signals back to Google Sheets, and posts formatted alerts to a Slack channel.

How it works

  1. Runs every 24 hours on a schedule trigger.
  2. Reads the breakout watchlist from Google Sheets and keeps only symbols marked active.
  3. For each active symbol, requests daily OHLCV data from an HTTP endpoint and stores it alongside the symbol metadata.
  4. Requests weekly OHLCV data, normalizes daily/weekly series into a single structure, and calculates daily and weekly breakout direction using recent support/resistance and volume thresholds.
  5. Continues only when the workflow’s multi-timeframe confirmation flag indicates the daily and weekly signals are aligned.
  6. Sends the confirmed signal details to OpenAI to generate a JSON analysis (confidence, narrative, key confirmation, and risk note) and normalizes the response into a consistent format.
  7. Appends the confirmed breakout, metrics, and AI narrative to a Google Sheets log and posts a detailed alert message to Slack.

Setup

  1. Create or select a Google Sheets spreadsheet with a Watchlist sheet (including at least symbol and active columns) and a Breakout Signals sheet with the logging columns used by the append step.
  2. Add Google Sheets OAuth credentials and update the spreadsheet ID and sheet tabs in the read and append steps if you use a different document.
  3. Set the daily/weekly market data HTTP endpoint URL and ensure it returns OHLCV arrays with fields like high, low, close, and volume.
  4. Add an OpenAI API credential (LangChain OpenAI node) and optionally adjust the model and prompt to match your analysis requirements.
  5. Add Slack credentials, choose the destination channel, and update the channel selection if you want alerts posted elsewhere.

Additional info

Troubleshooting Guide

IssuePossible CauseSolution
No symbols are processedWatchlist records are inactiveSet active to true, 1, or yes
A watchlist symbol is ignoredSymbol field is emptyAdd a valid value to the symbol column
Daily breakout is not detectedLess than 21 daily records are availableProvide at least 21 daily OHLCV records
Weekly breakout is not detectedLess than 13 weekly records are availableProvide at least 13 weekly OHLCV records
Daily breakout never triggersClose does not exceed resistance or volume is below 1.5xVerify the OHLCV data and breakout parameters
Weekly breakout never triggersClose does not exceed support/resistance or volume is below 1.5xVerify weekly OHLCV data and configured threshold
HTTP Request failsDummy API URL is unavailableVerify the webhook URL and n8n endpoint
Market data is emptyAPI response does not contain the expected data structureVerify that the response contains data or body.data
Breakout data is incompleteOHLCV fields are missing or invalidVerify high, low, close, and volume values
AI analysis does not continueSignal did not pass the confirmation branchCheck the output of Check Multi Timeframe Confirmation
AI output is not parsedOpenAI returned an unexpected responseReview Normalize AI Analysis and the raw OpenAI response
AI confidence is zeroAI response was unavailable or did not contain a confidence scoreCheck OpenAI credentials and response structure
Google Sheets logging failsCredential or sheet configuration is incorrectVerify Google Sheets credentials, spreadsheet, sheet name, and columns
Slack notification is not receivedSlack credential or channel configuration is incorrectVerify Slack credentials and destination channel
Slack message contains N/A valuesRequired fields were not available upstreamInspect the output of Log Confirmed Breakout and previous nodes
Workflow runs but produces no alertsNo symbols passed the multi-timeframe confirmation logicReview daily and weekly signal outputs
Workflow runs only manuallyWorkflow is not activeActivate the workflow after testing

Important Configuration Notes

The workflow currently uses a dummy market-data API rather than a live financial-market data provider.

The configured endpoint is:

http://192.168.101.63:5678/webhook-test/dummy-market-data

Before using the workflow with live market data, replace this endpoint with an appropriate market-data service and update the HTTP Request and normalization logic according to that API’s response format.

The workflow should be tested with representative market data before being used for operational monitoring.

The workflow itself does not execute trades. It detects and analyzes breakout conditions and sends notifications.

Need help setting up or customizing this n8n workflow?

WeblineIndia can help with:

If you need a similar business automation workflow built or want to extend this breakout scanner for your specific process, WeblineIndia can help design, implement, test and customize the complete n8n automation.

πŸ”— Nodes Used

Google Sheets, HTTP Request, Slack, Schedule Trigger, OpenAI

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup