AI-Driven Gold Market Analysis and Prediction Engine - n8n Workflow

Automate gold market predictions using an n8n workflow. This powerful n8n template integrates FRED, NewsAPI, and Perplexity Sonar-Pro AI to generate expert financial reports and publish them instantly via WordPress and Slack.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Financial analysts and researchers requiring automated market intelligence.

  • Users running financial news blogs or market monitoring dashboards.

  • Developers interested in complex, scheduled data aggregation and AI-driven predictive n8n templates.

  • Organizations seeking to implement advanced, data-driven strategies using the n8n automation platform.

Overview

Keeping up with the complex factors influencing gold prices—such as inflation, interest rates, and global news sentiment—is challenging. This expert n8n workflow solves this by creating a fully autonomous financial intelligence system. It runs every six hours using a dedicated n8n trigger, simultaneously gathering current gold prices (MetalPriceAPI), relevant financial news (NewsAPI), and key macroeconomic indicators (FRED data) like CPI, Fed Funds Rate, and unemployment figures.

The collected data is structured and fed into an advanced AI Agent, powered by the high-performance OpenRouter n8n node using the Perplexity Sonar-Pro model. This AI acts as a senior financial analyst, generating a comprehensive report detailing key drivers, confidence scores, and short/medium-term price predictions. This sophisticated n8n workflow ensures timely, consistent, and data-driven market insights, immediately publishing the report to a WordPress site and alerting stakeholders via Slack and email, maximizing the value derived from this critical n8n automation.

How it Works

This specialized n8n workflow operates on a rigid, scheduled cycle to ensure up-to-date market information:


  1. Scheduled Execution (n8n Trigger): The n8n workflow begins every six hours using the Schedule Trigger n8n node.

  2. Parallel Data Collection: The n8n automation simultaneously executes five parallel HTTP Requests to gather data:

Live Gold Price (MetalPriceAPI).
Top 20 Financial News headlines and summaries (NewsAPI).
* Latest monthly data for Inflation (CPIAUCSL), Interest Rates (FEDFUNDS), and Unemployment (UNRATE) from FRED.

  1. Data Structuring: Multiple Set n8n node instances clean and format the raw API output, extracting only necessary fields and trends (e.g., slicing the last six months of FRED data).

  2. Data Aggregation: The Merge n8n node combines all five formatted data streams into a single JSON object.

  3. AI Input Preparation: A dedicated Set n8n node prepares a highly structured, natural language prompt containing all current data, which serves as the context for the AI Agent.

  4. AI Analysis: The AI Agent - Gold Market Analysis n8n node (utilizing the Perplexity Sonar-Pro model via the OpenRouter Chat Model connection) processes the complex input and generates a detailed report following a strict financial analysis structure (Executive Summary, Predictions, Watchlist).

  5. Publishing & Notification: The final report is formatted, posted automatically to WordPress using the Publish to WordPress n8n node, and a brief summary, including the publish link, is sent immediately via the Send Slack Summary and Send Email Summary n8n node actions.

Installation Guide

To deploy this expert n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON code and import it directly into your n8n instance.

  2. API Credentials Setup: You must configure the following credentials for the respective n8n node integrations:

MetalPriceAPI: API Key for gold price retrieval.
NewsAPI: API Key for financial news fetching.
FRED: API Key for accessing macroeconomic data (inflation, rates).
OpenRouter: API Key to connect the OpenRouter Chat Model n8n node, specified for the 'perplexity/sonar-pro' LLM.
WordPress: Credentials (OAuth or user/password) for publishing the final analysis.
Slack/Email: Configure the respective credentials or webhooks for sending alerts.

  1. Review Node Parameters: Customize the email recipient ('[email protected]') and the WordPress author ID in the respective n8n node settings.

  2. Activate: Set the n8n workflow to 'Active' to start the automatic 6-hour schedule using the n8n trigger.

Node Details

This advanced n8n workflow relies on a mix of HTTP, transformation, and AI n8n node types:

Every 6 Hours (Schedule Trigger): The starting n8n trigger node, responsible for running the entire analysis cycle every six hours.
HTTP Request (Multiple Instances): Used extensively to fetch external data. Key configurations include using query parameters for API keys and targeting endpoints like api.metalpriceapi.com and api.stlouisfed.org/fred.
Set Nodes (Format Data/Prepare AI Input): These crucial n8n node instances use n8n expressions ($json.articles.map(...)) to transform complex API responses into clean, structured data suitable for AI consumption, consolidating all metrics into a single input string.
Merge All Data (Merge): Combines the five parallel data streams (Price, News, Inflation, Rates, Employment) into a single input item before AI processing.
OpenRouter Chat Model (LLM): Configures the connection to Perplexity's Sonar-Pro LLM, essential for the sophisticated analysis executed by the downstream AI Agent n8n node.
AI Agent - Gold Market Analysis (LangChain Agent): The heart of the n8n workflow. It uses a highly specific system message instructing it to act as an expert financial analyst, processing the large dataset to generate forecasts and structured market insights.
Publish to WordPress (WordPress): The final action n8n node, responsible for automated content delivery, setting the post status to publish and dynamically generating the title using the current date and time.
Send Slack Summary / Send Email Summary: Notification n8n node actions that send the key findings and the link to the full WordPress report, ensuring timely distribution.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Dr. Cheng Siong CHIN serves as a Professor in Intelligent Systems Modelling and Simulation in Newcastle University, Singapore. His academic credentials include an M.Sc. in Advanced Control and Systems Engineering from The University of Manchester and a Ph.D. in Robotics from Nanyang Technological University.

Featured*