Automating Financial Analysis with AI Agents Using n8n & macOS Shortcuts

Hey everyone! Welcome back to another automation adventure! 🎉 Today, we’re diving into a super cool financial analysis workflow using AI agents. We’re Agents Ops, a team of AI devs who love building automation solutions tailored to any business need. 💡
In this tutorial, we’ll show you how to leverage n8n, macOS Shortcuts, ChatGPT-4o, and some powerful tools like MarketStack & SerpAPI to analyze candlestick patterns and stock movements in a breeze. 📈✨
Here’s what we’re covering:
- 1️⃣ Setting up a macOS Shortcut to grab candlestick charts of any stock or crypto. 📸
- 2️⃣ Building an n8n workflow to create an AI agent that analyzes these charts. 🧠💰
Setting Up the macOS Shortcut 📸
First things first, let’s automate capturing and processing stock charts! 🖥️📊

Step 1: Open Shortcuts App
Can’t find it in Applications? 🤔 Just search for it! If it’s missing, grab it from the App Store (it’s free and super useful). 🛠️
Step 2: Create a New Shortcut
- Tap the ➕ (plus) icon to create a fresh shortcut.
- On the right-hand Actions bar, start adding the following steps.
Step 3: Add Essential Actions
- Take a Screenshot:
- Search for “Screenshot” and add it.
- Tap “Show More” and set Selection to Custom (so you can pick what to capture). 🖼️
- Convert to JPEG:
- Add “Convert Image” and set format to JPEG to keep file size optimized. 🏆
- Convert to Base64:
- This makes it easier to send the image to n8n. 🔄
- Send Data to n8n Webhook:
- Add “Get Contents of URL” and set the method to POST.
- Drop in your n8n Webhook URL & configure headers. 🌍🔗
- Speak & Show Results:
- Add “Speak” action so your Mac announces the AI’s response. 🎙️
- Add “Show Result” so you get a pop-up with the insights. 👀
And BOOM 💥— your macOS shortcut is ready to roll! Now, let’s wire up n8n to analyze the charts. 🚦
Building the n8n Workflow 🔗
Now that we’ve got our screenshot automation in place, let’s set up the AI-powered analysis in n8n. 🤖💡

Step 1: Add a Webhook Node
- This is where we’ll receive the Base64 image data from our shortcut.
- Pro tip: Always use authentication for security, but you can skip it for testing.
Step 2: Convert Base64 to File
- Use the Move Base64 String to File node to turn the data into an actual image.
Step 3: AI-Powered Analysis with ChatGPT-4o Mini
- Add an AI Agent Node and give it the image file as input.
- Write a system prompt so the AI knows exactly how to analyze the chart.
- Ensure the model supports image processing before you proceed.
Step 4: Fetch Latest Stock News & Data
- Add SerpAPI to pull in the latest financial news.
- Use MarketStack to fetch real-time stock prices.
- Toss in a calculator node for any advanced calculations.
Step 5: Returning the AI Insights
- Add a Webhook Response node to send AI-generated insights back to your device.
- Format the response so it's clear & actionable!
Putting It All Together 🎯
With this slick automation setup, you can:
- ✅ Capture candlestick charts for stocks or crypto on the fly.
- ✅ Get instant AI analysis on market trends.
- ✅ Stay updated with real-time financial news.
- ✅ Use technical indicators like MACD, RSI & more.
And the best part? It works seamlessly on Mac, iPad & iPhone—so you can trade smarter, anywhere! 📲💸
Got questions? 🤔 Drop them in the comments, and we’d love to help out!
Automating Financial Analysis with AI Agents Using n8n & macOS Shortcuts