Quick overview
This workflow provides an upload form that analyzes travel photos with Google Gemini, removes all people or only unselected people, then uploads the cleaned images to Google Drive and returns a results page with preview thumbnails and download links, automatically deleting temporary files after 24 hours.
How it works
- Receives photo uploads and mode/language choices from an n8n Form trigger.
- Splits the uploaded files into individual photo items and uses Google Gemini to detect and describe real people in each image.
- Skips image editing and keeps the original photo when no people are detected.
- If “Remove all people” is selected, uses Google Gemini image editing to remove every detected real person from each photo.
- If “Keep selected people” is selected, uploads preview images to Google Drive, shows a second form to choose which people to keep per photo, and then uses Google Gemini image editing to remove only the unselected people.
- Restores the original upload order, uploads the final images to Google Drive, shares them publicly, and displays a results gallery with download links.
- Waits 24 hours and then deletes the temporary Google Drive files created for delivery.
Setup
- Add Google Gemini (Google PaLM) API credentials for both image analysis and image editing.
- Add a Google Drive OAuth2 connection and choose the Drive/folder to store the temporary preview and result files.
- Activate the workflow and open the production URL generated by the “Photo Upload Form” trigger. When “Keep selected people” is chosen, the workflow automatically presents a second form for selecting which detected people should remain.
Requirements
- Google Gemini API credentials configured in n8n.
Customization
- Change the Gemini models used for person detection and image editing to balance image quality, processing speed, and cost.
Additional info
AI image editing results may vary depending on image complexity, lighting, and how much people overlap with subjects that should remain. When a removed person significantly overlaps with another person, animal, or object, the AI may need to reconstruct hidden areas. Temporary Google Drive files are automatically deleted after 24 hours.