Automated AI Stock Trading Bot: Alpaca & Google Sheets

AI-driven workflow automates buy/sell orders on Alpaca paper trading API using sentiment analysis, dynamically rebalances portfolio, and logs trades/performance to Google Sheets.

n8n
Automated AI Stock Trading Bot: Alpaca & Google Sheets

This n8n workflow transforms investment strategies into a fully automated AI trading bot. It integrates Alpaca's paper trading API for risk-free execution of buy and sell orders, pulling top-performing stocks from a companion sentiment analysis workflow. The bot intelligently sells underperforming positions based on waning sentiment and reallocates funds to high-potential stocks, ensuring dynamic portfolio rebalancing without manual intervention.

Key benefits include sentiment-driven decisions for data-backed trading, comprehensive logging of every transaction and daily equity changes in Google Sheets for easy auditing and performance tracking, and scheduled daily runs for hands-off operation. It's ideal for algorithmic traders, data-driven investors, and n8n users experimenting with AI in finance.

Use cases span testing trading strategies in paper mode, automating routine portfolio management, integrating AI insights with real trading actions, and building scalable financial automations. All processes are autonomous, secure, and fully auditable via Sheets exports.

$24.99
Last updated October 10, 2026
30-day money-back guarantee
Instant download
Lifetime updates included

New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.

Secure checkout powered by Stripe

Support

How to import this workflow into n8n

  1. 1Purchase or download the workflow to get the n8n workflow JSON file.
  2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
  3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
  4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

Related Other - Miscellaneous workflows

More from Tomas Fahmy

Need this deployed? We'll set it up for you.

Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.