n8n Workflow Deployment
Goal
Create and deploy visual automation workflows using n8n. Connect any APIs, trigger via webhooks/schedule, no code needed for basic flows.
When to Use
- Multi-step workflows (Form → CRM → Email → Slack → Sheet)
- Webhook-driven automation (receive events, process, respond)
- Visual workflows students/clients can understand without code
- Connecting 400+ integrations via built-in nodes
Prerequisites
- n8n running (self-hosted on VPS or n8n Cloud)
- For self-hosted: Docker installed on VPS
Self-Hosted Setup (Docker Compose)
1. Create docker-compose.yml on your VPS
version: '3.8'
services:
n8n:
image: n8nio/n8n
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=changeme
- N8N_HOST=your-domain.com
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://your-domain.com/
volumes:
- n8n_data:/home/node/.n8n
restart: unless-stopped
volumes:
n8n_data:
2. Start n8n
docker-compose up -d
3. Access n8n
Open http://your-vps-ip:5678 or https://your-domain.com
Creating a Workflow
Via n8n UI (Visual)
- Open n8n dashboard
- Click "New Workflow"
- Add trigger node (Webhook, Schedule, or Manual)
- Add processing nodes (HTTP Request, Code, IF, etc.)
- Connect nodes by dragging edges
- Click "Activate" to make it live
Via JSON Import
- Create a workflow JSON file
- In n8n: Workflows → Import → paste JSON
Example: Social Media Post Workflow
{
"name": "Daily Social Media Post",
"nodes": [
{
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": {"interval": [{"field": "hours", "hoursInterval": 24}]}
},
"position": [250, 300]
},
{
"name": "Generate Content",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "https://api.euron.one/api/v1/euri/chat/completions",
"method": "POST",
"headers": {"Authorization": "Bearer {{$env.EURI_API_KEY}}"},
"body": {
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "Write a LinkedIn post about AI automation"}]
}
},
"position": [450, 300]
},
{
"name": "Post to LinkedIn",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "https://api.linkedin.com/rest/posts",
"method": "POST",
"headers": {
"Authorization": "Bearer {{$env.LINKEDIN_ACCESS_TOKEN}}",
"LinkedIn-Version": "202603"
},
"body": "={{JSON.stringify({author: 'urn:li:person:' + $env.LINKEDIN_PERSON_URN, lifecycleState: 'PUBLISHED', visibility: 'PUBLIC', commentary: $json.choices[0].message.content, distribution: {feedDistribution: 'MAIN_FEED'}})}}"
},
"position": [650, 300]
}
],
"connections": {
"Schedule Trigger": {"main": [[{"node": "Generate Content", "type": "main", "index": 0}]]},
"Generate Content": {"main": [[{"node": "Post to LinkedIn", "type": "main", "index": 0}]]}
}
}
Free Hosting Options
| Option |
Cost |
Setup |
| Oracle Cloud Free VPS |
$0 forever |
Docker Compose on ARM VM |
| PikaPods |
~$3.80/mo |
Managed, zero DevOps |
| Hostinger VPS |
~$5/mo |
1-click n8n template |
| DigitalOcean |
$6/mo |
Docker Compose on droplet |
Gotchas
- Webhook URLs change if n8n restarts (self-hosted without domain). Use Cloudflare Tunnel for stable URLs.
- n8n stores data in SQLite by default — switch to PostgreSQL for production.
- Environment variables — set in docker-compose.yml, not in workflow nodes.
- Activate workflows — creating a workflow doesn't start it. Click the toggle.
- Error handling — always add an Error Trigger node to catch failures.
Schema
Inputs
| Name |
Type |
Required |
Description |
workflow_description |
string |
Yes |
What the workflow should do |
trigger_type |
string |
No |
webhook, schedule, or manual (default: schedule) |
nodes |
array |
No |
Specific n8n nodes to use |
Outputs
| Name |
Type |
Description |
workflow_json |
file |
Importable n8n workflow JSON |
deployed |
boolean |
Whether workflow was activated |
Credentials
| Name |
Source |
| Per-integration |
n8n Credentials panel (OAuth, API keys) |
Composable With
Any project — n8n can call any API, webhook, or script.
Cost
Free (self-hosted), ~$24/mo (n8n Cloud Starter)
1---2name: n8n-workflow-deploy3description: Deploy automations as n8n workflows — visual, webhook-driven, multi-step. Use when user asks to create a workflow, connect services visually, or deploy to n8n.4---56# n8n Workflow Deployment78## Goal9Create and deploy visual automation workflows using n8n. Connect any APIs, trigger via webhooks/schedule, no code needed for basic flows.1011## When to Use12- Multi-step workflows (Form → CRM → Email → Slack → Sheet)13- Webhook-driven automation (receive events, process, respond)14- Visual workflows students/clients can understand without code15- Connecting 400+ integrations via built-in nodes1617## Prerequisites18- n8n running (self-hosted on VPS or n8n Cloud)19- For self-hosted: Docker installed on VPS2021## Self-Hosted Setup (Docker Compose)2223### 1. Create docker-compose.yml on your VPS24```yaml25version: '3.8'26services:27 n8n:28 image: n8nio/n8n29 ports:30 - "5678:5678"31 environment:32 - N8N_BASIC_AUTH_ACTIVE=true33 - N8N_BASIC_AUTH_USER=admin34 - N8N_BASIC_AUTH_PASSWORD=changeme35 - N8N_HOST=your-domain.com36 - N8N_PROTOCOL=https37 - WEBHOOK_URL=https://your-domain.com/38 volumes:39 - n8n_data:/home/node/.n8n40 restart: unless-stopped4142volumes:43 n8n_data:44```4546### 2. Start n8n47```bash48docker-compose up -d49```5051### 3. Access n8n52Open `http://your-vps-ip:5678` or `https://your-domain.com`5354## Creating a Workflow5556### Via n8n UI (Visual)571. Open n8n dashboard582. Click "New Workflow"593. Add trigger node (Webhook, Schedule, or Manual)604. Add processing nodes (HTTP Request, Code, IF, etc.)615. Connect nodes by dragging edges626. Click "Activate" to make it live6364### Via JSON Import651. Create a workflow JSON file662. In n8n: Workflows → Import → paste JSON6768### Example: Social Media Post Workflow69```json70{71 "name": "Daily Social Media Post",72 "nodes": [73 {74 "name": "Schedule Trigger",75 "type": "n8n-nodes-base.scheduleTrigger",76 "parameters": {77 "rule": {"interval": [{"field": "hours", "hoursInterval": 24}]}78 },79 "position": [250, 300]80 },81 {82 "name": "Generate Content",83 "type": "n8n-nodes-base.httpRequest",84 "parameters": {85 "url": "https://api.euron.one/api/v1/euri/chat/completions",86 "method": "POST",87 "headers": {"Authorization": "Bearer {{$env.EURI_API_KEY}}"},88 "body": {89 "model": "gpt-4o-mini",90 "messages": [{"role": "user", "content": "Write a LinkedIn post about AI automation"}]91 }92 },93 "position": [450, 300]94 },95 {96 "name": "Post to LinkedIn",97 "type": "n8n-nodes-base.httpRequest",98 "parameters": {99 "url": "https://api.linkedin.com/rest/posts",100 "method": "POST",101 "headers": {102 "Authorization": "Bearer {{$env.LINKEDIN_ACCESS_TOKEN}}",103 "LinkedIn-Version": "202603"104 },105 "body": "={{JSON.stringify({author: 'urn:li:person:' + $env.LINKEDIN_PERSON_URN, lifecycleState: 'PUBLISHED', visibility: 'PUBLIC', commentary: $json.choices[0].message.content, distribution: {feedDistribution: 'MAIN_FEED'}})}}"106 },107 "position": [650, 300]108 }109 ],110 "connections": {111 "Schedule Trigger": {"main": [[{"node": "Generate Content", "type": "main", "index": 0}]]},112 "Generate Content": {"main": [[{"node": "Post to LinkedIn", "type": "main", "index": 0}]]}113 }114}115```116117## Free Hosting Options118119| Option | Cost | Setup |120|--------|------|-------|121| Oracle Cloud Free VPS | $0 forever | Docker Compose on ARM VM |122| PikaPods | ~$3.80/mo | Managed, zero DevOps |123| Hostinger VPS | ~$5/mo | 1-click n8n template |124| DigitalOcean | $6/mo | Docker Compose on droplet |125126## Gotchas1271281. **Webhook URLs change if n8n restarts** (self-hosted without domain). Use Cloudflare Tunnel for stable URLs.1292. **n8n stores data in SQLite by default** — switch to PostgreSQL for production.1303. **Environment variables** — set in docker-compose.yml, not in workflow nodes.1314. **Activate workflows** — creating a workflow doesn't start it. Click the toggle.1325. **Error handling** — always add an Error Trigger node to catch failures.133134---135136## Schema137138### Inputs139| Name | Type | Required | Description |140|------|------|----------|-------------|141| `workflow_description` | string | Yes | What the workflow should do |142| `trigger_type` | string | No | webhook, schedule, or manual (default: schedule) |143| `nodes` | array | No | Specific n8n nodes to use |144145### Outputs146| Name | Type | Description |147|------|------|-------------|148| `workflow_json` | file | Importable n8n workflow JSON |149| `deployed` | boolean | Whether workflow was activated |150151### Credentials152| Name | Source |153|------|--------|154| Per-integration | n8n Credentials panel (OAuth, API keys) |155156### Composable With157Any project — n8n can call any API, webhook, or script.158159### Cost160Free (self-hosted), ~$24/mo (n8n Cloud Starter)