AI Image Retrieval from Google Sheets with n8n
detail.loadingPreview
Automate the retrieval of images from a Google Sheet database using n8n's AI capabilities. This workflow uses the Langchain node with GPT-4.1-mini to search and return image details, then retrieves the image via Google Drive and sends it via Telegram.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow automates the process of retrieving specific images based on a user's intent. It leverages the power of AI, specifically the Langchain node with a GPT-4.1-mini model, to understand the user's request and query a Google Sheet acting as an image database. The workflow is triggered when executed by another workflow, allowing for seamless integration into larger automation processes.
It solves the problem of manually searching for images within a collection and provides an automated, intelligent way to access them. The use of a structured output parser ensures that the AI's findings are easily digestible and usable by subsequent nodes. Finally, the workflow retrieves the actual image file from Google Drive and sends it to a specified chat via Telegram, making it a complete image delivery solution.
Key Features
- Utilizes Langchain agent for intelligent image searching.
- Connects to Google Sheets for a dynamic image database.
- Supports image retrieval via Google Drive.
- Integrates with Telegram to send retrieved images.
- Structured output parsing for reliable AI responses.
- Triggered by other workflows for flexible automation.
How To Use
- Configure Trigger: Set up the 'When Executed by Another Workflow' node to define the inputs (intent, image reference, chat ID).
- Set Up AI Agent: Configure the 'Image Search Agent' with the GPT-4.1-mini model and define the system prompt to instruct the AI on its role and output format.
- Connect Image Database: Link the 'Image Database' node to your Google Sheet containing image information (name, ID, link).
- Implement Output Parsing: Use the 'Name, ID, & Link' node to parse the AI's output into a structured format.
- Add Conditional Logic: Employ the 'Not Found?' and 'Get?' IF nodes to handle cases where an image is not found or to proceed with retrieval.
- Configure Google Drive: Set up the 'Download File' node with your Google Drive credentials and the logic to extract the file ID from the AI's output.
- Send via Telegram: Configure the 'Send Photo' node with your Telegram credentials and the appropriate chat ID to deliver the retrieved image.
Apps Used
Workflow JSON
{
"id": "87c62ec3-bf3f-4bf8-8fd2-7e516b3c55bc",
"name": "AI Image Retrieval from Google Sheets with n8n",
"nodes": 0,
"category": "AI Marketing Team Workflows",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 87c62ec3-bf3f...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
AI Image Generator and Marketing Asset Logger
This workflow automates AI image generation from a prompt, saves the image to Google Drive, and logs the request in a Google Sheet. It uses the `Image Prompt` node to refine prompts for the `Generate Image` (OpenAI API) node.
AI Marketing Team: Streamline Content Creation and Image Management via Telegram
Automate marketing tasks with this n8n workflow. Leverage GPT-4.1 to generate blog posts, LinkedIn updates, and manage image creation/editing through Telegram.
Automated AI Image Editing and Cloud Logging Workflow
This workflow leverages AI to edit images based on a prompt and automatically logs the process. It uses nodes like `When Executed by Another Workflow`, `Edit Image` (OpenAI), `Convert to File`, `Upload Image` (Google Drive), and `Image Log` (Google Sheets).
AI-Powered Blog Post to Visual Content Creation Workflow
Automate the creation of engaging visual content for blog posts using AI. This workflow uses Tavily for research and GPT-4.1 for generating both blog content and corresponding image prompts, streamlining marketing content production.
LinkedIn Post to Visual Prompt Generator for Marketing Graphics
Automate the creation of marketing graphics from LinkedIn posts. This workflow uses AI to generate visual prompts for image generation tools, saving time for marketing teams.
AI-Generated Faceless Videos with Audio and Google Drive Upload
Automate the creation of faceless videos using AI image generation, text-to-video, sound generation, and direct Google Drive uploads. This workflow leverages PIAPI, RunwayML, ElevenLabs, and Creatomate for a seamless AI marketing asset pipeline.