# necto-pro/n8n-nodes-nano-banana architecture

> Architecture diagram of the GitHub repository necto-pro/n8n-nodes-nano-banana, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/necto-pro/n8n-nodes-nano-banana
- Repository: https://github.com/necto-pro/n8n-nodes-nano-banana

## Overview

This repository is an n8n community node for using Gemini models in automated text and image workflows. A workflow supplies either manually mapped messages or JSON, optionally including images by URL or base64. The node prepares image parts, calls Gemini with the selected model and generation settings, and returns generated content and image data to n8n. Credentials provide the Google API key. The excerpts show image fetching and Gemini invocation; credential implementation and other unsampled details are represented only where documented.

Main entry points: [`nodes/Gemini/Gemini.node.ts`](https://github.com/necto-pro/n8n-nodes-nano-banana/blob/master/nodes/Gemini/Gemini.node.ts) (Nano Banana Node), [`nodes/Gemini/utils/imageUtils.ts`](https://github.com/necto-pro/n8n-nodes-nano-banana/blob/master/nodes/Gemini/utils/imageUtils.ts) (Image Utilities), [`credentials/GeminiApi.credentials.ts`](https://github.com/necto-pro/n8n-nodes-nano-banana/blob/master/credentials/GeminiApi.credentials.ts) (API Credentials)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["n8n Workflow"]
  node_n8n["n8n Runtime"]
end

subgraph group_integration["Gemini Integration"]
  node_gemini_node["Nano Banana Node<br/>[Gemini.node.ts]"]
  node_credentials["API Credentials"]
end

subgraph group_media["Image Handling"]
  node_image_utils["Image Utilities<br/>[imageUtils.ts]"]
end

node_workflow_actor(("Workflow Author"))
node_image_host(("Image URL Host"))
node_gemini_api["Google Gemini API"]

node_workflow_actor -->|"configures workflow"| node_n8n
node_n8n -->|"runs node"| node_gemini_node
node_gemini_node -.->|"gets API key"| node_credentials
node_gemini_node -->|"prepares images"| node_image_utils
node_image_utils -->|"fetches image"| node_image_host
node_gemini_node -->|"generates content"| node_gemini_api
node_gemini_node -->|"returns results"| node_n8n

click node_gemini_node "https://github.com/necto-pro/n8n-nodes-nano-banana/blob/master/nodes/Gemini/Gemini.node.ts"
click node_credentials "https://github.com/necto-pro/n8n-nodes-nano-banana/blob/master/credentials/GeminiApi.credentials.ts"
click node_image_utils "https://github.com/necto-pro/n8n-nodes-nano-banana/blob/master/nodes/Gemini/utils/imageUtils.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_n8n toneBlue
class node_gemini_node,node_credentials toneAmber
class node_image_utils,node_gemini_api toneMint
class node_workflow_actor,node_image_host toneIndigo
```

## Components

### n8n Workflow

- **n8n Runtime**

### Gemini Integration

- [Nano Banana Node](https://github.com/necto-pro/n8n-nodes-nano-banana/blob/master/nodes/Gemini/Gemini.node.ts): `nodes/Gemini/Gemini.node.ts`
- [API Credentials](https://github.com/necto-pro/n8n-nodes-nano-banana/blob/master/credentials/GeminiApi.credentials.ts): `credentials/GeminiApi.credentials.ts`

### Image Handling

- [Image Utilities](https://github.com/necto-pro/n8n-nodes-nano-banana/blob/master/nodes/Gemini/utils/imageUtils.ts): `nodes/Gemini/utils/imageUtils.ts`

### Other components

- **Workflow Author**
- **Image URL Host**
- **Google Gemini API**

## Connections

- Workflow Author → n8n Runtime: configures workflow (evidence: `README.md`)
- n8n Runtime → Nano Banana Node: runs node (evidence: `README.md`)
- Nano Banana Node → API Credentials: gets API key
- Nano Banana Node → Image Utilities: prepares images (evidence: `nodes/Gemini/Gemini.node.ts`)
- Image Utilities → Image URL Host: fetches image (evidence: `nodes/Gemini/utils/imageUtils.ts`)
- Nano Banana Node → Google Gemini API: generates content (evidence: `nodes/Gemini/Gemini.node.ts`)
- Nano Banana Node → n8n Runtime: returns results (evidence: `nodes/Gemini/Gemini.node.ts`)
