This high-performance n8n workflow automates the complex task of comparing gold investment types in the Indian market. By pulling live data from the GoldAPI (Digital) and the IBJA (Physical benchmark), it calculates the "Landed Cost" including GST and making charges to provide a data-driven "Buy/Wait" verdict powered by a Groq-hosted LLM.
Stop manually calculating gold spreads across different platforms. This workflow fetches real-time 24K gold rates, applies localized taxes (3% GST) and industry-standard fees (3-8%), analyzes global market sentiment via Yahoo Finance RSS and logs a professional investment report to Google Sheets. It transforms raw data into an actionable "Efficiency Score" using AI.
Date, Digital_Price, Physical_Price, Arbitrage, Sentiment and Efficiency_Score.This workflow acts as a 24/7 Quantitative Financial Analyst specialized in the gold market. It eliminates the "hidden cost" surprise by calculating the absolute final price an investor pays out-of-pocket for 1 gram of 24K gold. It doesn't just look at the ticker price; it factors in the 3% GST applicable in India, platform spreads for digital gold apps and making charges for physical coins/bars.
Beyond raw arithmetic, the workflow contextually understands the global landscape. By scraping the latest commodity headlines from Yahoo Finance, the integrated AI Agent determines if the current market vibe is "Greedy," "Neutral," or "Fearful." It then synthesizes the price gap and the news into a single "Efficiency Score" (1-100), telling you exactly how favorable the buying conditions are today.
Finally, it maintains a permanent investment ledger. Every execution logs the data into a Google Sheet and formats a clean report ready to be sent to messaging apps, ensuring you never miss a buying opportunity when the "Arbitrage" (the price difference) favors one medium over the other.
The workflow starts with a Manual Trigger (can be changed to a Schedule Trigger for daily runs). It fetches the live 1-gram digital gold price in INR via an HTTP Request to GoldAPI. Simultaneously, it scrapes the official IBJA website to extract the physical benchmark rate using the CSS selector #GoldRatesCompare999.
The Comparator node uses JavaScript to apply real-world fees:
The workflow pulls the top 3 most recent gold market headlines from Yahoo Finance. These are bundled together so the AI can read them in one go.
The AI Agent takes the math and the news headlines. It outputs a structured JSON verdict containing:
The data is formatted into a readable message and appended as a new row in your designated Google Sheet.
1.08 value in the code.| Issue | Possible Cause | Solution |
|---|---|---|
| Digital Price = 0 or Error | API Key is missing or expired. | Check the "Get Digital Price" node; ensure the token is in the headers. |
| Physical Price Extraction Fails | Website structure changed. | Verify the URL and the CSS selector #GoldRatesCompare999 on IBJA. |
| AI Agent gives generic response | Prompt is too vague or news is missing. | Ensure the "Data Array" node is successfully bundling headlines. |
| Google Sheets won't append | Missing columns or incorrect ID. | Ensure headers (Date, Sentiment, etc.) match exactly in your sheet. |
Need assistance setting up your GoldAPI credentials, customizing the making charges or adding custom notifications to this workflow? We can help you build and scale your automation ideas.
Contact WeblineIndia to help you customize this workflow or build similar AI-powered financial tools for your business.