n8n Image Automation: Self-Hosted Workflows for Full Control
Some companies can't use Zapier or Make.com. Data policies. Compliance requirements. Or just a strong preference for keeping automation in-house.
If that's you, n8n is the answer.
n8n is an open-source workflow automation tool. You host it yourself. Your data never leaves your infrastructure (except when calling external APIs, of course). And it's completely free if you self-host.
I've been running n8n on a small VPS for about two years. It handles all my image automation workflows. Here's how to set up the same thing.
Why n8n for image automationWhy n8n for Image Automation
The pitch is simple: Zapier-like workflows, but self-hosted.
| Feature | n8n (Self-Hosted) | Zapier | Make.com |
|---|---|---|---|
| Hosting | Your server | Cloud | Cloud |
| Data control | Complete | None | None |
| Pricing | Free (self-host) | $50-500+/mo | $9-99/mo |
| Customization | Unlimited | Limited | Moderate |
| Open source | Yes | No | No |
When n8n makes sense:
- You have strict data handling requirements
- You're already running infrastructure
- You want unlimited executions without per-task fees
- You need custom nodes or deep integrations
When it doesn't:
- You have no technical resources for hosting
- You need rock-solid uptime without maintenance work
- You prefer paying for convenience
Be honest about your situation. Self-hosting isn't free in terms of time and effort.
Setting up n8nSetting Up n8n
The fastest path is Docker. If you've got Docker installed, you're five minutes away from running n8n.
Quick start with dockerQuick Start with Docker
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8nOpen http://localhost:5678 and you're in.
Production setup with docker composeProduction Setup with Docker Compose
For a real deployment, use Docker Compose with proper persistence:
# docker-compose.yml
version: "3.8"
services:
n8n:
image: n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=your-secure-password
- N8N_HOST=your-domain.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://your-domain.com/
volumes:
- n8n_data:/home/node/.n8n
- ./local-files:/files
volumes:
n8n_data:Run with:
docker-compose up -dAdd a reverse proxyAdd a Reverse Proxy
Put nginx or Caddy in front for HTTPS:
# nginx.conf
server {
listen 443 ssl;
server_name your-domain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:5678;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}Creating an image generation workflowCreating an Image Generation Workflow
Now for the actual automation. Here's a complete workflow that generates images from a webhook trigger.
Step 1 create the webhook triggerStep 1: Create the Webhook Trigger
- In n8n, click "Add first step"
- Search for "Webhook"
- Select "Webhook" node
- Set HTTP Method to POST
- Copy the webhook URL (you'll need this)
Step 2 add the http request nodeStep 2: Add the HTTP Request Node
- Click the + button after the Webhook node
- Search for "HTTP Request"
- Configure:
Settings:
- Method: POST
- URL:
https://render.imejis.io/v1/YOUR_TEMPLATE_ID - Response Format: File (the API returns image binary directly)
Authentication:
- Authentication: Header Auth
- Name:
Authorization - Value:
Bearer YOUR_API_KEY
Body:
- Body Content Type: JSON
- Specify Body: Using Fields Below
Body Parameters:
| Name | Value |
|---|---|
| headline | {{ $json.headline }} |
| subtitle | {{ $json.subtitle }} |
The {{ $json.headline }} syntax pulls data from the incoming webhook payload. Since the API returns the image directly, set Response Format to "File" to handle the binary data.
Step 3 return the resultStep 3: Return the Result
- Add a "Respond to Webhook" node
- Configure to return the generated image:
Response Mode: Binary Property Name: data (the binary from the HTTP node)
Or save to storage first (S3, Google Drive) and return the URL.
Step 4 test itStep 4: Test It
Activate the workflow, then call your webhook:
curl -X POST https://your-domain.com/webhook/xxx \
-H "Content-Type: application/json" \
-d '{
"headline": "My Generated Image",
"subtitle": "Created with n8n + Imejis.io"
}'You'll get back the generated image URL.
Real world workflow examplesReal-World Workflow Examples
Product card generatorProduct Card Generator
This workflow watches a database and generates product cards for new items.
[Postgres Trigger] → [HTTP: Imejis.io] → [Postgres: Update Row]
Postgres Trigger configuration:
- Table: products
- Operations to Watch: INSERT
HTTP Request body:
{
"product_name": "{{ $json.name }}",
"price": "${{ $json.price }}",
"image_url": "{{ $json.image_url }}"
}Every new product in your database gets an image automatically.
Scheduled social media imagesScheduled Social Media Images
Generate images for your content calendar every morning.
[Cron] → [Google Sheets: Get Rows] → [Loop Over Items] → [HTTP: Imejis.io] → [Slack: Send Message]
Cron configuration:
- Mode: Every Day
- Hour: 9
- Minute: 0
The workflow grabs today's content from a spreadsheet, generates images for each item, and posts the URLs to Slack.
Certificate generation apiCertificate Generation API
Turn n8n into a certificate generation API for your application.
[Webhook] → [HTTP: Imejis.io] → [AWS S3: Upload] → [Respond to Webhook]
Your app calls the webhook with recipient data. n8n generates the certificate, uploads it to S3 for permanent storage, and returns the URL.
Webhook body example:
{
"recipient_name": "Jane Smith",
"course_name": "Advanced JavaScript",
"completion_date": "2026-02-18"
}Advanced patternsAdvanced Patterns
Conditional generationConditional Generation
Use the IF node to generate different images based on conditions:
[Trigger] → [IF: Price > 100] → [Premium Template]
└→ [Standard Template]
Different data triggers different templates automatically.
Batch processing with split in batchesBatch Processing with Split In Batches
Process large datasets without overwhelming the API:
[Read Spreadsheet] → [Split In Batches] → [HTTP: Imejis.io] → [Merge] → [Output]
The Split In Batches node processes items in groups (say, 10 at a time) with delays between batches.
Configuration:
- Batch Size: 10
- Options: Reset batch index for each run
Error handlingError Handling
Add an Error Trigger workflow to catch failures:
[Error Trigger] → [Slack: Notify] → [Google Sheets: Log Error]
Create a separate workflow with the Error Trigger node. When any workflow fails, this catches it and notifies you.
Storing credentials securelyStoring Credentials Securely
Never hardcode API keys in workflows. Use n8n's credential system:
- Go to Settings > Credentials
- Create new credential of type "Header Auth"
- Set the header value to your Imejis.io API key
- Reference this credential in HTTP Request nodes
This keeps secrets out of your workflow JSON exports.
Performance optimizationPerformance Optimization
Caching generated imagesCaching Generated Images
Store generated URLs to avoid regenerating identical images:
[Trigger] → [Redis: Get] → [IF: Cached] → [Return Cached]
└→ [HTTP: Imejis.io] → [Redis: Set] → [Return New]
Use Redis or any key-value store n8n supports.
Parallel processingParallel Processing
n8n can run branches in parallel. For multi-format generation:
[Trigger] → [Split] → [HTTP: Twitter Format]
├→ [HTTP: Instagram Format]
└→ [HTTP: LinkedIn Format]
→ [Merge] → [Return All URLs]
Three API calls happen simultaneously, cutting total time significantly.
Webhook response timeoutWebhook Response Timeout
For synchronous webhooks, image generation must complete before the timeout. If you're generating complex images:
- Increase n8n's webhook timeout in environment variables
- Or use async pattern: return immediately, send result via callback
Hosting considerationsHosting Considerations
Resource requirementsResource Requirements
n8n itself is lightweight:
- CPU: 1 core minimum (2 recommended)
- RAM: 512MB minimum (1GB recommended)
- Storage: 10GB for workflows and logs
A $10/month VPS handles most use cases easily.
Recommended providersRecommended Providers
| Provider | Smallest Plan | Notes |
|---|---|---|
| DigitalOcean | $6/mo | Easy Docker setup |
| Hetzner | €4/mo | Great value in Europe |
| Vultr | $5/mo | Global locations |
| Railway | $5/mo | Managed Docker |
Backup your workflowsBackup Your Workflows
n8n stores workflows in ~/.n8n by default. Back this up regularly:
# Manual backup
tar -czvf n8n-backup-$(date +%Y%m%d).tar.gz ~/.n8n
# Or use n8n's export feature
# Settings > Download all workflow dataCost analysisCost Analysis
Running n8n for image automation:
| Component | Monthly Cost |
|---|---|
| VPS (DigitalOcean) | $6 |
| Imejis.io Basic | $14.99 |
| Domain (optional) | ~$1 |
| Total | ~$22 |
For 1,000 images/month, that's about 2 cents per image including all infrastructure.
Compare to Zapier ($50+) + competitor APIs ($29+). Self-hosting wins on cost if you have the technical skills.
Check Imejis.io pricing for higher volume plans.
Getting startedGetting Started
Here's your path:
- Spin up n8n with Docker (5 minutes)
- Create a simple webhook workflow that calls Imejis.io
- Test with curl to verify it works
- Build out your use case (product cards, certificates, social images)
- Add error handling and monitoring
Start simple. A basic "webhook → generate → return URL" workflow proves the concept. Add complexity once that's solid.
Self-hosted automation isn't for everyone. But if you need data control, unlimited executions, or deep customization, n8n + Imejis.io is a powerful combination.
Get your Imejis.io API key to start building
FaqFAQ
Is n8n really free for self hostingIs n8n really free for self-hosting?
Yes. The core n8n software is open source under a fair-code license. Self-host it on your own infrastructure at no cost. They also offer a paid cloud version if you don't want to manage servers.
How does n8n compare to zapier for non technical usersHow does n8n compare to Zapier for non-technical users?
It's harder. n8n requires some technical knowledge for setup and maintenance. If you're not comfortable with Docker and basic server administration, Zapier or Make.com are better choices.
Can i run n8n on a raspberry piCan I run n8n on a Raspberry Pi?
Yes. n8n runs on ARM architecture. A Raspberry Pi 4 with 4GB RAM handles small to medium workloads. Not recommended for high-volume production, but great for personal automation.
What happens if my n8n server goes downWhat happens if my n8n server goes down?
Your workflows stop running until you fix it. This is the tradeoff of self-hosting. Set up monitoring (UptimeRobot, Healthchecks.io) and alerts to catch outages quickly. Consider n8n Cloud if uptime is critical.
Can i migrate from zapier to n8nCan I migrate from Zapier to n8n?
Not directly. You'll need to rebuild workflows manually. The good news: n8n's node library covers most Zapier integrations, so the logic translates even if the interface differs.

