Hajik Renaa
← All work

Case 04AutomationClient

Jewellery Photo Pipeline

Vendor photos in, catalogue images out, plus one path where AI never touches the stones

An n8n pipeline that watches a Drive folder and enhances every product photo two ways with Gemini. For pieces where a single altered stone is unacceptable, a deterministic path runs with no AI at all.

Client
Jewellery vendor
Role
Automation engineer
Year
2026
Stack
n8n, Gemini 2.5 Flash Image, GraphicsMagick, Google Drive API
Jewellery Photo Pipeline: product screenshot

01The numbers

2.4×edge detail, deterministic path
₹0API cost on the no-AI path
3output variants per photo

02The problem

The vendor's photos come off a phone: soft focus, uneven light, busy backgrounds. Catalogue shots need to be sharp and clean.

Jewellery is also the worst case for generative editing. If a model adds a stone or smooths an engraving, the listing is wrong, and nobody notices until a customer does.

03What I built

A Drive trigger picks up every upload and lets only images through. Each photo is upscaled and sent to two Gemini image edits in parallel. One is a detail-safe retouch that is forbidden to change stone count, engraving or design; the other is a studio version on white. Each lands in its own folder so the team can compare them side by side.

Next to that runs a path with no model at all: GraphicsMagick inside the n8n container (despeckle, resize, unsharp mask). It measures 2.4× the edge detail of the original. When fidelity matters more than polish, that's the one they use.

A third variant adds a watermark check before enhancement. A test-bench workflow compares sharpening strengths on a fixed set of photos, so tuning isn't done by eye.

04Architecture

system sketch
DRIVE UPLOADvendor photosPRE-PROCESSfilter · upscaleGEMINI · Adetail-safeGEMINI · Bstudio whiteGRAPHICSMAGICKno AIDRIVE FOLDERSone per variantORIGINAL → BINafter all uploadsDRIVE UPLOADvendor photosPRE-PROCESSfilter · upscaleGEMINI · Adetail-safeGEMINI · Bstudio whiteGRAPHICSMAGICKno AIDRIVE FOLDERSone per variantORIGINAL → BINafter all uploads

05Engineering notes

  • Branch-level error handling: if one Gemini edit fails, the other still delivers.
  • The original moves to trash only after both variants have uploaded.
  • Sharpening was tuned against an edge-detail metric (0.0191 → 0.0458) rather than by eye.
  • Runs on self-hosted n8n, so there are no per-execution platform fees.

06Stack

n8nGemini 2.5 Flash ImageGraphicsMagickGoogle Drive APIDocker

Need something like this? Let’s talk about your version.

Book a free call ↗