workflows.fit
Back to n8n workflows
n8n templateFreeBy WeblineIndia

Generate a daily multi-asset market report with TwelveData, Groq and Google Sheets

Multi-Asset Daily Market Snapshot This workflow fully automates the creation of a daily multi-asset market report. It retrieves live pricing data for specified indices, forex pairs and commodities using the TwelveData...

Data & StorageProductivityDevelopmentCore NodesCommunicationHITLAILangchain
Loading interactive preview...

Template notes

Multi-Asset Daily Market Snapshot

This workflow fully automates the creation of a daily multi-asset market report. It retrieves live pricing data for specified indices, forex pairs and commodities using the TwelveData API, manages rate limits safely and feeds the normalized data into a Groq-powered AI (Llama-3). The AI generates a professional, institutional-grade market summary which is then automatically logged in Google Sheets and emailed to your inbox.

Quick Implementation Steps

1. Import the Workflow: Upload the JSON file into your n8n workspace. 2. Add Your Keys: In the Environment Config node, paste your TwelveData API key. 3. Connect Accounts: Authenticate your Google Sheets, Gmail and Groq API credentials in their respective nodes. 4. Prepare the Sheet: Create a Google Sheet with two tabs ("Sheet1" for reports, "Error logs" for failures) matching the column headers defined in the Google Sheets nodes. 5. Execute: Click "Test Workflow" (or trigger it manually) to fetch data and receive your daily snapshot.

What It Does

This workflow acts as an automated quantitative analyst. It starts by establishing your target asset watchlists across three categories: Indices (e.g., SPY, QQQ), Forex (e.g., EUR/USD) and Commodities (e.g., Gold, Oil). It breaks these lists down and carefully queues them up to fetch daily pricing from the TwelveData API. To ensure it doesn't overwhelm the API and get blocked, it uses a batching system with a built-in 15-second throttle.

As data flows in, the workflow actively monitors for errors. If an API call fails or hits a hard limit, it instantly logs the failure details into an "Error logs" Google Sheet and sends an emergency failure alert via Gmail. Successfully fetched data is normalized into a clean format, calculating daily percentage changes and basic bullish/bearish trends.

Finally, the cleaned dataset is passed to a Llama-3 AI agent via Groq. Instructed to act as a macro strategist, the AI parses the numbers to generate a structured snapshot including a market summary, key movers, risk sentiment and actionable outlook. A custom script safely extracts these exact sections, logs the complete report into your main Google Sheet for historical tracking and delivers the final formatted text straight to your Gmail.