npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@prama13/n8n-nodes-advance-gemini

v0.3.3

Published

Advanced Gemini Node for n8n - Unlock the full potential of Gemini AI with advanced image generation capabilities in n8n workflows.

Readme

n8n-nodes-nano-banana

This is an n8n community node that integrates Google's Gemini AI models for advanced text and image generation capabilities. It lets you use Nano Banana Pro (powered by Gemini AI) in your n8n workflows for creating images, analyzing visual content, and generating text responses.

Google Gemini AI is a powerful multimodal AI platform that can understand and generate both text and images, making it perfect for creative workflows, content generation, and AI-powered automation.

n8n is a fair-code licensed workflow automation platform.

Table of Contents

Installation
Operations
Credentials
Getting Started
Usage Examples
Compatibility
Resources
Contributing
License

Installation

Follow the installation guide in the n8n community nodes documentation.

Install via npm

npm install @nectopro/n8n-nodes-nano-banana

Install in n8n

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter @nectopro/n8n-nodes-nano-banana
  4. Agree to the risks of using community nodes
  5. Select Install

After installation restart n8n to use the new nodes.

Operations

The Nano Banana Pro node supports the following operations:

Generate Content

  • Text Generation: Create written content, stories, code, and more
  • Image Generation: Generate images from text descriptions
  • Image Analysis: Analyze and describe uploaded images
  • Multimodal Conversations: Combine text and images in interactive dialogues
  • Creative Tasks: Logo design, artwork, technical diagrams, and illustrations
  • JSON Input Format: Provide message history and current message as JSON for programmatic workflows

Key Features

  • Support for multiple content types (text, images via URL or base64)
  • Conversation history management
  • Streaming responses for real-time processing
  • Multiple response modalities (text, images, or both)
  • Advanced configuration options (temperature, tokens, etc.)
  • Comprehensive error handling
  • Flexible input formats (Manual UI mapping or JSON)

Credentials

To use this node, you need a Google AI Studio API key.

Getting Your API Key

  1. Visit Google AI Studio

  2. Create API Key

    • Click "Create API Key"
    • Choose "Create API key in new project" or select an existing project
    • Copy the generated API key (starts with AIza...)
  3. Configure in n8n

    • In your n8n workflow, add the Nano Banana Pro node
    • Click on the credential field
    • Select "Create New"
    • Choose "AI Studio Credentials API"
    • Paste your API key
    • Save the credential

Important Notes

  • Keep your API key secure and never share it publicly
  • Google AI Studio has usage limits and quotas
  • Some features may require billing to be enabled in Google Cloud
  • The API key provides access to Gemini models including image generation capabilities

Getting Started

Input Format Options

The node supports two input formats that can be selected in the node settings:

  1. Manual Mapping: Use the UI fields to define message history and current message
  2. JSON Format: Provide all input data as a JSON object in the "JSON Input" field

JSON Input Format

When using JSON format, provide a JSON object with the following structure:

{
  "messageHistory": [
    {
      "contentType": "text",
      "text": "What's in this image?",
      "role": "user"
    },
    {
      "contentType": "imageUrl",
      "imageUrl": "https://example.com/image.jpg",
      "mimeType": "image/jpeg",
      "role": "user"
    },
    {
      "contentType": "text",
      "text": "This is a beautiful landscape with mountains and a lake.",
      "role": "model"
    }
  ],
  "currentMessage": "Can you describe the colors in more detail?"
}

Basic Text Generation

  1. Add a Nano Banana Pro node to your workflow
  2. Set up your AI Studio Credentials
  3. Select Generate Image operation
  4. Choose Nano Banana Pro Image model
  5. Select JSON Format if you want to use JSON input, or keep Manual Mapping
  6. Enter your prompt in Current Message (Manual) or JSON Input (JSON)
  7. Set Response Modalities to TEXT
  8. Execute the node

Basic Image Generation

  1. Follow steps 1-5 from above
  2. Enter an image description prompt
  3. Set Response Modalities to IMAGE
  4. Execute to generate an image

Image Analysis

  1. Add the node and configure credentials
  2. Select input format (Manual or JSON)
  3. For Manual: In Message History, add a message with:
    • Content Type: Image (URL) or Image (Base64)
    • Image URL or Image Base64 data
    • Role: User
  4. For JSON: Include image data in the JSON input
  5. Set Current Message to your question about the image
  6. Set Response Modalities to TEXT
  7. Execute to get image analysis

Usage Examples

Example 1: Creative Writing

{
  "operation": "generateContent",
  "model": "gemini-2.5-flash-image-preview",
  "currentMessage": "Write a short story about a robot learning to paint",
  "responseModalities": ["TEXT"]
}

Example 2: Logo Design

{
  "operation": "generateContent", 
  "model": "gemini-2.5-flash-image-preview",
  "currentMessage": "Create a modern, minimalist logo for a coffee shop called 'Morning Brew'",
  "responseModalities": ["IMAGE", "TEXT"]
}

Example 3: Image Analysis

{
  "operation": "generateContent",
  "model": "gemini-2.5-flash-image-preview",
  "messageHistory": {
    "messages": [{
      "role": "user",
      "contentType": "imageUrl",
      "imageUrl": "https://example.com/photo.jpg",
      "mimeType": "image/jpeg"
    }]
  },
  "currentMessage": "What objects do you see in this image?",
  "responseModalities": ["TEXT"]
}

Example 4: Conversation with Context

{
  "operation": "generateContent",
  "model": "gemini-2.5-flash-image-preview", 
  "messageHistory": {
    "messages": [
      {
        "role": "user",
        "contentType": "text",
        "text": "I need help designing a website"
      },
      {
        "role": "model", 
        "contentType": "text",
        "text": "I'd be happy to help! What type of website are you looking to create?"
      }
    ]
  },
  "currentMessage": "It's for a photography portfolio",
  "responseModalities": ["TEXT"]
}

Example 5: JSON Input Format

{
  "operation": "generateContent",
  "model": "gemini-2.5-flash-image-preview",
  "inputFormat": "json",
  "jsonInput": "{\n  \"messageHistory\": [\n    {\n      \"contentType\": \"text\",\n      \"text\": \"What's in this image?\",\n      \"role\": \"user\"\n    },\n    {\n      \"contentType\": \"imageUrl\",\n      \"imageUrl\": \"https://example.com/image.jpg\",\n      \"mimeType\": \"image/jpeg\",\n      \"role\": \"user\"\n    }\n  ],\n  \"currentMessage\": \"Can you describe the colors in more detail?\"\n}",
  "responseModalities": ["TEXT"]
}

Advanced Configuration

The node supports advanced parameters for fine-tuning:

  • Temperature: Controls creativity (0.0-1.0)
  • Max Output Tokens: Limits response length
  • Top P: Nucleus sampling parameter
  • Top K: Top-k sampling parameter
  • Stream Response: Enable real-time streaming

Compatibility

  • Minimum n8n version: 0.227.0
  • Node.js: 20.15 or higher
  • Tested with: n8n 1.0+

Known Limitations

  • Image generation requires sufficient API quotas
  • Large images may take longer to process
  • Rate limits apply based on your Google AI Studio plan

Resources

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

  1. Clone the repository:

    git clone https://github.com/necto-pro/n8n-nodes-nano-banana.git
    cd n8n-nodes-nano-banana
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build
  4. Lint the code:

    npm run lint
    npm run lintfix  # To auto-fix issues
  5. Test locally:

    npm run dev

License

MIT


Created by Necto Pro | Questions? Open an issue