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.
- Start
manualTrigger
- Create task
POST /jobs/createTask
- Wait 5 seconds
wait · 5 s
- Check task
GET /jobs/recordInfo
- Done?
if · state
Not yet: wait again
- File URL
set · url

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.
Self-hosted n8n? You can also install the PopNow community node from Settings > Community Nodes > Install: n8n-nodes-popnow · npm · GitHub
The workflow
Create a task, wait and check its status until it finishes, then pass the output file URL to the next node.
{
"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?
Not for this workflow: it only uses nodes that ship with n8n (Manual Trigger, HTTP Request, Wait, If and Edit Fields), so it runs on n8n Cloud as well as self-hosted. On self-hosted n8n you can also install the PopNow community node, n8n-nodes-popnow, from Settings > Community Nodes. It is not a verified node yet, so n8n Cloud cannot install it.
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?
Pay for actual usage in USD from your PopNow balance. Check the model page for Nano Banana image prices and video rates per second. POST /jobs/quote shows estimated and maximum USD costs before a run. If a task fails, the reserved USD amount is released back to the balance that paid for it.
How long does a run take?
Images usually finish in under a minute and videos in a few minutes. The polling loop checks every five seconds. With callBackUrl, the result is sent automatically when generation finishes, so you do not need to poll.



