Skip to main content

Unpublish NSFW ImageKit uploads with GPT-4o Vision via OpenRouter

Workflow preview

Workflow preview
100%
Unpublish NSFW ImageKit uploads with GPT-4o Vision via OpenRouter preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow triggers on new ImageKit uploads, downloads the image, uses OpenRouter (OpenAI GPT 4o) vision to run an NSFW check, and automatically unpublishes flagged assets in Imag...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, @imagekit/n8n-nodes-imagekit.imagekittrigger, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenrouter, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.if, @imagekit/n8n-nodes-imagekit.imagekit

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by ImageKit Developer.

Original n8n.io source

1.1 Workflow description

Title
Unpublish NSFW ImageKit uploads with GPT-4o Vision via OpenRouter
Workflow name
Unpublish NSFW ImageKit uploads with GPT-4o Vision via OpenRouter

Quick Overview

This workflow triggers on new ImageKit uploads, downloads the image, uses OpenRouter (OpenAI GPT-4o) vision to run an NSFW check, and automatically unpublishes flagged assets in ImageKit so they are not served via your CDN.

How it works

  1. Triggers when ImageKit emits a file.created event for a newly uploaded asset.
  2. Downloads the uploaded image from the ImageKit URL as binary data.
  3. Sends the image to OpenRouter using the OpenAI GPT-4o model to return a structured JSON verdict (is_nsfw, confidence, and reason).
  4. Checks the model verdict and, when is_nsfw is true, updates the ImageKit file to set it as unpublished.
  5. Ends without taking action when the image is not flagged.

Setup

  1. Add ImageKit credentials for both the ImageKit trigger (webhook) and the ImageKit API operation used to unpublish files.
  2. Create an OpenRouter credential with access to the openai/gpt-4o model.
  3. In ImageKit, register the n8n webhook URL for file.created events and ensure new uploads default to published if you want this workflow to act as the gatekeeper.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Section 1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Section 2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Section 3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Confidence Threshold Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - New File Upload

Type / Role
@imagekit/n8n-nodes-imagekit.imagekitTrigger - imagekitTrigger
Config choices
Version 1

Block 7 - Download Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 8 - GPT-4o Vision

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 9 - OpenRouter Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 10 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 11 - Is NSFW?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 12 - Unpublish File

Type / Role
@imagekit/n8n-nodes-imagekit.imagekit - imagekit
Config choices
Version 1

3. Summary Table

Workflow Unpublish NSFW ImageKit uploads with GPT-4o Vision via OpenRouter
Complexity intermediate
Nodes 12
Categories Document Extraction, AI Summarization
Author ImageKit Developer
Published 16 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16400/16400.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Unpublish NSFW ImageKit uploads with GPT-4o Vision via OpenRouter do?

Quick Overview This workflow triggers on new ImageKit uploads, downloads the image, uses OpenRouter (OpenAI GPT 4o) vision to run an NSFW check, and automatically unpublishes flagged assets in Imag...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.