n8n

How to Automate Google Drive Passport Photo Checks?

Quickly check if headshots meet passport rules without manual review. Great for operations teams, travel services, and onboarding flows that need fast and consistent ID photo validation.

Photos are listed in a simple array, pulled from Google Drive, resized to a standard 1024 by 1024, and sent to an AI model with clear UK government rules. The flow loops through multiple images, applies the same checks every time, and uses a structured output parser to return clean fields like is_valid and photo_description. Results are easy to read and can feed a database or a case management tool. The manual trigger makes testing simple, and the setup supports batch runs.

Use a Google Drive account for file access and a Google Gemini key for the AI check. Expect faster review time per photo and more consistent pass or fail results. Ideal for teams that handle lots of ID photos, student IDs, or membership images and need quick compliance checks at scale.

What are the key features?

  • Manual run to test and control when checks happen
  • Photo list is defined in one place for simple batch input
  • Google Drive download by URL to fetch each portrait
  • Image resize to 1024 by 1024 only if larger for stable AI input
  • AI validator uses UK passport rules embedded in the prompt
  • Structured Output Parser returns clean fields like is_valid and photo_description
  • Google Gemini 1.5 Pro model powers the vision analysis
  • Inline sticky notes explain each stage for easy onboarding

What are the benefits?

  • Reduce review time from 10 minutes per photo to under 1 minute
  • Apply the same passport rules on every image for higher consistency
  • Process multiple portraits in one run without extra steps
  • Return structured fields that are ready for databases or audits
  • Lower human errors by standardizing checks with AI

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 Drive and Google Gemini. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, connect Google Drive: double click the Google Drive node, open the Credential to connect with dropdown, click Create new credential, choose OAuth2, and follow the on screen steps to grant access to your Drive.
  4. In the Google Gemini Chat Model node, create a new credential: click Credential to connect with, select Create new credential for Google Gemini, and paste your API key from the Google AI Studio API page.
  5. Prepare your test images in Google Drive. Make sure each file is shared or accessible by the connected Google Drive account. Copy each share URL.
  6. Open the Photo URLs node and replace the sample array with your file names and URLs. Keep the same structure so the Split Out node can read the list.
  7. Run a test using the manual trigger. Check the Google Drive node output to confirm images download correctly. If you see a permission error, adjust Drive sharing settings.
  8. Verify the Resize For AI node produces a 1024 by 1024 image when larger inputs are provided. If images are already small, they will pass through unchanged.
  9. Open the Structured Output Parser node and review the schema. Add or remove fields if you want more details in the final result.
  10. Review the output from the Passport Photo Validator node. Confirm you see is_valid and photo_description fields for each image.
  11. If the AI result looks off, refine the rules text inside the Passport Photo Validator node to clarify edge cases like glasses glare or background color.
  12. Optional: after validation, connect a database or email node to store results or notify users when photos fail checks.

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 Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

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.