This workflow follows the HTTP Request → Postgres recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Video Generation Workflow",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "video-request",
"responseMode": "responseNode",
"options": {}
},
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"url": "http://localhost:8000/api/v1/webhook/n8n",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ {\n \"prompt\": $json.prompt,\n \"platform\": $json.platform || \"instagram\",\n \"duration\": $json.duration || 5,\n \"seed\": $json.seed || null\n} }}",
"options": {}
},
"name": "Generate Video Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
470,
300
]
},
{
"parameters": {
"amount": 10,
"unit": "seconds"
},
"name": "Wait",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
690,
300
]
},
{
"parameters": {
"url": "=http://localhost:8000/api/v1/status/{{ $json.task_id }}",
"options": {}
},
"name": "Check Video Status",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
910,
300
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.status }}",
"operation": "equals",
"value2": "completed"
}
]
}
},
"name": "Is Completed?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1130,
300
]
},
{
"parameters": {
"url": "=http://localhost:8000{{ $json.video_url }}",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"name": "Download Video",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
1350,
200
]
},
{
"parameters": {
"amount": 5,
"unit": "seconds"
},
"name": "Wait More",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
1350,
400
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ {\n \"success\": true,\n \"message\": \"Video generated successfully\",\n \"video_url\": $json.video_url,\n \"task_id\": $json.task_id\n} }}"
},
"name": "Respond to Webhook - Success",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1570,
200
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ {\n \"success\": false,\n \"message\": \"Video still processing\",\n \"task_id\": $json.task_id,\n \"status\": $json.status\n} }}"
},
"name": "Respond to Webhook - Pending",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1570,
400
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Generate Video Request",
"type": "main",
"index": 0
}
]
]
},
"Generate Video Request": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Check Video Status",
"type": "main",
"index": 0
}
]
]
},
"Check Video Status": {
"main": [
[
{
"node": "Is Completed?",
"type": "main",
"index": 0
}
]
]
},
"Is Completed?": {
"main": [
[
{
"node": "Download Video",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait More",
"type": "main",
"index": 0
}
]
]
},
"Download Video": {
"main": [
[
{
"node": "Respond to Webhook - Success",
"type": "main",
"index": 0
}
]
]
},
"Wait More": {
"main": [
[
{
"node": "Check Video Status",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
postgres
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Video Generation Workflow. Uses postgres, httpRequest. Webhook trigger; 18 nodes.
Source: https://github.com/Yaakovyitzchak1231/CLAUDE-CODE_Marketing-Agent/blob/a9f11690dfb44a4e0f520ab2cd1436f06b18c442/n8n-workflows/video_generation.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Jigsaw API key for image processing, I use this as a gatekeeper/second pair of eyes. LINK to their website https://jigsawstack.com/ SECOND A postgress DATABASE (I use Supabase) LlamaCloud for the pars
W1 - IN WhatsApp Adapter (Secure + Fast ACK). Uses postgres, redis, httpRequest. Webhook trigger; 50 nodes.
W1 - IN WhatsApp Adapter (Secure + Fast ACK). Uses postgres, redis, httpRequest. Webhook trigger; 48 nodes.
W2 - IN Instagram Adapter (Secure). Uses postgres, httpRequest. Webhook trigger; 28 nodes.
W3 - IN Messenger Adapter (Secure). Uses postgres, httpRequest. Webhook trigger; 28 nodes.