Log gold and silver prices and email Groq insights with Google Sheets
Quick Overview This workflow manually logs daily Gold and Silver prices from GoldAPI into Google Sheets, summarizes historical monthly averages, generates seasonal insights with Groq (LLM), builds QuickChart bar charts, and emails a formatted report via Gmail.
How it works Starts manually and loads a two-item asset list (Gold/XAU and Silver/XAG) to process in a loop. For each commodity, calls the GoldAPI endpoint to fetch the latest INR price and converts it into a per-10g value with date and month fields. Checks Google Sheets for an existing row for the same commodity and date, keeps the higher of the two prices, and appends or updates the row in the historical sheet. Reads the full historical dataset from Google Sheets and calculates monthly average, minimum, and maximum prices grouped by month and commodity. Formats the monthly averages into a text block and sends it to a Groq-hosted chat model to generate a structured JSON insight summary for gold, silver, and the overall trend. Creates QuickChart URLs for separate Gold and Silver monthly-average bar charts and emails the AI summary and chart images using Gmail.
Setup Add a GoldAPI key and set it in the HTTP request header (x-access-token) for the GoldAPI call. Connect Google Sheets OAuth credentials and select the target spreadsheet and sheet tab where rows are stored (e.g., the 04_HistoricalData sheet). Ensure the sheet has columns for ID, Date, Month, Price, and Commodity, and that ID is used as the upsert/matching key. Add Groq API credentials for the Groq chat model used to generate the JSON insights. Connect Gmail OAuth credentials and replace the placeholder recipient address ("RECEIVER MAIL ID") and subject as needed.
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Food Recipes from Gmail & Form Requests with Ollama & Llama 3.2
This n8n template demonstrates how to create an intelligent food recipe assistant that accepts requests via Gmail and we...
Automatic News Summarization & Email Digest with GPT-4, NewsAPI and Gmail
📰 AI News Digest Agent: Auto News Summarizer & Email Newsletter Create an intelligent news curation system that automat...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments