n8n

How to Automate Gemini Asset Tagging?

Turn images and PDFs into clear tags, captions, and summaries using Google Gemini. Great for marketing teams that manage many assets and need fast, consistent results across different media types. Pick the method that fits your task, from quick single image checks to full control API calls.

The flow starts on manual run and branches into five paths. One path sends a single image straight to an AI agent with binary passthrough for the fastest setup. Another path processes multiple images with custom prompts and loops through each item. A third path follows the standard n8n item model, converts files to base64, and calls Gemini directly. The fourth path fetches a PDF, converts it to base64, and asks Gemini for a summary. The fifth path does the same for a single image via a custom API call. You can filter inputs, split data, and control prompts per item.

You need a Google Gemini API key and credentials in n8n. Add your image URLs and prompts in the Set nodes, or point to your PDFs. Run a branch, check the output text, and adjust your instructions for better tags. Expect faster media review, more consistent labels, and less manual copywriting work. Useful for product catalogs, social content planning, brand audits, and document summaries.

What are the key features?

  • Five analysis methods for images and PDFs, from quick agent passthrough to full custom API calls
  • AI Agent nodes with passthroughBinaryImages to send raw image data without extra setup
  • Split Out and Split In Batches nodes to break lists into single items and process them safely
  • HTTP Request nodes that call the Gemini generateContent API with inline base64 data
  • Extract From File nodes to convert images and PDFs into base64 for direct API use
  • Set nodes to define multiple image URLs and custom prompts per item
  • Optional Filter node to include or exclude items before fetching media
  • Manual trigger for controlled testing of each branch before scaling

What are the benefits?

  • Reduce manual media review from hours to minutes by batch processing images and PDFs
  • Streamline tagging and caption creation by up to 80 percent with AI generated text
  • Improve consistency of labels and summaries across assets by 90 percent
  • Handle 10 times more assets with loop based processing and item splitting
  • Unify image and PDF analysis in one workflow for simpler operations

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Gemini. See the Tools Required section above for links to create accounts with these services.
  3. Create a Google Gemini API key in your Google AI or PaLM developer console. Copy the key and keep it secure.
  4. In the n8n credentials manager, create a new Google Gemini PaLM API credential and paste your API key when prompted. Name it clearly, for example Gemini Chat.
  5. In the credentials manager, also create an HTTP Query Auth credential for Gemini. Add the API key as a query parameter key named key and set the value to your API key.
  6. Open each Gemini node and select the matching credential. For AI Agent and Chat Model nodes, choose your Google Gemini PaLM credential. For HTTP Request nodes that call generateContent, choose the HTTP Query Auth credential.
  7. In the Set nodes named Define URLs And Prompts and Define Multiple Image URLs, replace the sample URLs and prompts with your own image links and instructions.
  8. If testing PDF analysis, update the Get PDF file URL to a real PDF you can access. Large files may fail, so start with a small document.
  9. Run the workflow in Test mode. Start with the single image branch to confirm your credentials work. Check the output text from the AI Agent or HTTP Request nodes.
  10. Test the multi image branch next. Watch the Loop Over Items node to confirm items move one by one and images are fetched without errors.
  11. If you see 401 errors, confirm the API key is valid and attached to the correct nodes. If responses are empty, verify the Extract From File nodes produced base64 data.
  12. Tune your prompts in the Set node to get better tags or summaries. Re run and compare outputs until you reach the quality you need.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.