n8n × PopNow
Generate AI images and videos in n8n
Nothing to install: n8n’s built-in HTTP Request node calls the PopNow API directly, on n8n Cloud and self-hosted alike. Paste the workflow, add your key and run.
Set it up in four steps
- In n8n, add a Header Auth credential. Name: Authorization. Value: Bearer, a space, then your sk-popnow- key.
- Copy the workflow below and paste it onto an empty canvas with Ctrl + V (Cmd + V on a Mac).
- Open the Create task node, choose the credential, then change the model and the prompt.
- Run it. The last node gives you the file URL; add a Google Drive, Slack or S3 node after it to keep the file.
The workflow
Create the task, wait, check it, loop until it is done, then hand the file link to the next node.
- Start
- Create task
- Wait 5 seconds
- Check task
- Done?
- File URL
↺ Done? → Wait 5 seconds
{
"name": "PopNow: generate and get the file",
"nodes": [
{
"id": "b1f0c1a2-0001-4c55-9a10-000000000001",
"name": "Start",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"parameters": {}
},
{
"id": "b1f0c1a2-0002-4c55-9a10-000000000002",
"name": "Create task",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
220,
0
],
"parameters": {
"method": "POST",
"url": "https://api.popnow.ai/api/v1/jobs/createTask",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Idempotency-Key",
"value": "={{ $execution.id }}"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"model\": \"google/nano-banana-2.1/text-to-image\",\n \"input\": {\n \"prompt\": \"A ceramic teapot on a linen cloth, soft window light, muted palette\",\n \"aspect_ratio\": \"16:9\",\n \"resolution\": \"1k\",\n \"output_format\": \"png\"\n }\n}",
"options": {}
}
},
{
"id": "b1f0c1a2-0003-4c55-9a10-000000000003",
"name": "Wait 5 seconds",
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
440,
0
],
"parameters": {
"amount": 5
},
"webhookId": "4d3c2b1a-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
},
{
"id": "b1f0c1a2-0004-4c55-9a10-000000000004",
"name": "Check task",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
660,
0
],
"parameters": {
"url": "https://api.popnow.ai/api/v1/jobs/recordInfo",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "taskId",
"value": "={{ $('Create task').item.json.data.taskId }}"
}
]
},
"options": {}
}
},
{
"id": "b1f0c1a2-0005-4c55-9a10-000000000005",
"name": "Done?",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
880,
0
],
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "loose"
},
"conditions": [
{
"id": "c0ffee00-0000-4000-8000-000000000001",
"leftValue": "={{ ['succeeded','failed','canceled','expired'].includes($json.data.state) && !($json.data.output?.assets ?? []).some(a => a.pending && !a.unavailable) }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
}
},
{
"id": "b1f0c1a2-0006-4c55-9a10-000000000006",
"name": "File URL",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1100,
-100
],
"parameters": {
"assignments": {
"assignments": [
{
"id": "c0ffee00-0000-4000-8000-000000000002",
"name": "state",
"value": "={{ $json.data.state }}",
"type": "string"
},
{
"id": "c0ffee00-0000-4000-8000-000000000003",
"name": "fileUrl",
"value": "={{ $json.data.output?.assets?.[0]?.url ?? '' }}",
"type": "string"
},
{
"id": "c0ffee00-0000-4000-8000-000000000004",
"name": "error",
"value": "={{ $json.data.errorMessage ?? '' }}",
"type": "string"
}
]
},
"options": {}
}
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Create task",
"type": "main",
"index": 0
}
]
]
},
"Create task": {
"main": [
[
{
"node": "Wait 5 seconds",
"type": "main",
"index": 0
}
]
]
},
"Wait 5 seconds": {
"main": [
[
{
"node": "Check task",
"type": "main",
"index": 0
}
]
]
},
"Check task": {
"main": [
[
{
"node": "Done?",
"type": "main",
"index": 0
}
]
]
},
"Done?": {
"main": [
[
{
"node": "File URL",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait 5 seconds",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}Plain n8n JSON. The model and input come from this page, so they pass validation as they are.
What to change
Keep spending in check. Give the n8n key its own daily cap and allowed models in the console. A runaway loop then stops at the cap instead of draining your balance.
model- The model name. Every model page under the API section shows it, with a copy button.
input- Prompt and options for that model. The model’s API page lists every field, its range and its default.
callBackUrl- Optional. Point it at an n8n Webhook node and drop the wait loop: we post the finished task there.
Idempotency-Key- Already set to the execution id, so a retried node never pays twice for the same run.
Good models to start with
Fast, well-priced picks for automations. Each link opens its model name, parameters and price.
n8n questions
Do I need a PopNow community node?
No. The workflow only uses nodes that ship with n8n: Manual Trigger, HTTP Request, Wait, If and Edit Fields. It runs on n8n Cloud as well as self-hosted.
How do I use images from earlier nodes?
Pass a public https link in the image field. If the file only exists inside n8n, upload it through the API first and use the popnow:// reference it returns.
What does a run cost?
The same credits as on the website, per call. A Nano Banana image is a few credits; video is billed per second. Failed tasks are refunded.
How long does a run take?
Images usually finish in under a minute and video in a few minutes. The wait loop checks every five seconds; a callBackUrl avoids waiting at all.

