πŸ“ˆ Detect Bitcoin price spikes and send Gemini-powered NewsAPI Gmail alerts

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

Description

Bitcoin Price Spike Detector with Gemini AI, NewsAPI & Gmail Alerts

This workflow monitors Bitcoin price changes every 30 minutes. If the price increases or decreases by 3% or more, it fetches recent Bitcoin-related news, summarizes it using AI (Google Gemini) and sends an email alert explaining the likely reason behind the price movement.

Quick Implementation Steps

  1. Set up a Schedule Trigger (default: every 30 minutes) in your n8n account.
  2. Configure CoinGecko API (already public, no key required).
  3. Ensure your Data Table (crypto_price_db) exists.
  4. Add your NewsAPI API key in HTTP Request node.
  5. Configure Google Gemini API credentials.
  6. Connect your Gmail account.
  7. Replace the email recipient with your own.
  8. Activate the workflow.

What It Does

This workflow continuously monitors Bitcoin price fluctuations by fetching the latest price from CoinGecko at regular intervals. Each new price is stored in a data table and compared with previous entries to detect significant changes.

When a price movement of Β±3% or more is detected, the workflow automatically triggers a secondary process. It fetches recent Bitcoin-related news articles using NewsAPI, filters and aggregates relevant descriptions and sends them to an AI agent powered by Google Gemini.

The AI agent generates a concise summary of the news and explains the likely reason behind the price movement. Finally, it sends a well-crafted email alert with insights, helping users stay informed and react quickly to market changes.

Who It’s For

Requirements

To use this workflow, you need:

How It Works & Set Up

1. Schedule Trigger

2. Fetch Bitcoin Price

3. Store Price in Data Table

4. Retrieve Recent Prices

5. Prepare Data

6. Detect Price Change

πŸ“ˆ Price Increase (β‰₯ 3%)

πŸ“‰ Price Decrease (β‰₯ 3%)

7. Fetch News

Setup NewsAPI

  1. Create account at https://newsapi.org/
  2. Generate API key
  3. Add it in HTTP Request node β†’ Headers

8. Filter & Aggregate News

9. AI Processing (Google Gemini)

Setup Gemini API

  1. Go to https://aistudio.google.com/welcome
  2. Generate API key
  3. Add credentials in n8n:

AI Task:

10. Send Email Alert

Important:

Replace: errorcommits@mailinator.com with your own email address.

How To Customize Nodes

Add-Ons (Enhancements)

Use Case Examples

  1. Crypto Trading Alerts
    Get instant insights when Bitcoin price moves significantly.

  2. Market Analysis Automation
    Automatically correlate price changes with real-world news.

  3. Portfolio Monitoring
    Track assets and receive alerts without manual checks.

  4. AI-Powered Financial Reports
    Generate automated summaries for decision-making.

  5. Research & Insights Tool
    Understand market sentiment quickly.

And many more use cases can be built on top of this workflow.

Troubleshooting Guide

IssuePossible CauseSolution
No email receivedGmail not configuredReconnect Gmail OAuth2 credentials
No news dataMissing NewsAPI keyAdd API key in HTTP Request headers
AI not respondingGemini API not configuredVerify Gemini credentials
Workflow not triggeringSchedule not activeActivate workflow
Incorrect price comparisonData table missing valuesEnsure table stores numeric USD values
Empty email contentNews descriptions missingCheck Code node output

Need Help?

If you need assistance setting up this workflow, customizing it or extending it with advanced features like multi-crypto tracking, dashboards or AI enhancements β€” we’re here to help.

Contact WeblineIndia for:

Let us help you turn automation into a competitive advantage.

πŸ”— Nodes Used

HTTP Request, Schedule Trigger, AI Agent, Google Gemini Chat Model, Data table

πŸ“₯ Import

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

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