Easy image captioning with Gemini 1.5 Pro
Ready for 3.0What this workflow does
This AI workflow has 11 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Google Gemini Chat Model. It also calls images.pexels.com over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Get Image (HTTP Request): calls images.pexels.com
- Resize For AI (Edit Image): resize
- Get Info (Edit Image): information
- Image Captioning Agent (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model; output parser: Structured Output Parser
- Merge: merges the data from its input branches
- Calculate Positioning (Code): runs custom JavaScript code
- Merge: merges the data from its input branches
- Apply Caption to Image (Edit Image): multi step
Services it uses
HTTP calls to: images.pexels.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- Manual Trigger
n8n-nodes-base.manualTrigger - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Edit Image
n8n-nodes-base.editImage - Code
n8n-nodes-base.code - Merge
n8n-nodes-base.merge - HTTP Request
n8n-nodes-base.httpRequest - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
From the author
This n8n workflow demonstrates how to automate image captioning tasks using Gemini 1.5 Pro - a multimodal LLM which can accept and analyse images. This is a really simple example of how easy it is to build and leverage powerful AI models in your repetitive…