This workflow follows the Agent → OpenAI Chat 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": "Creative Generator",
"nodes": [
{
"parameters": {
"path": "creative-gen",
"options": {}
},
"id": "9e58b4a8-1ae2-44f5-a8c8-436b663f7944",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
-208,
112
]
},
{
"parameters": {
"resource": "user",
"operation": "getAll"
},
"id": "7150fd97-16d0-4dbe-af05-7f8f798f87d1",
"name": "Notion Brief",
"type": "n8n-nodes-base.notion",
"typeVersion": 2,
"position": [
0,
0
],
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"resource": "database",
"operation": "getAll"
},
"id": "770be0cd-7880-4440-bbde-4d534ac6df7d",
"name": "Notion History",
"type": "n8n-nodes-base.notion",
"typeVersion": 2,
"position": [
0,
208
],
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"functionCode": "return [{json:{prompt:`You are an ad copy generator. Create 3-5 new ad variants (headline + primary text) based on the brief: ${items[0].json.title}. Avoid repeating old variants.`}}];"
},
"id": "ccba4830-3c58-4de6-94c2-051c22f2a8d1",
"name": "Function Prepare Prompt",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
208,
112
]
},
{
"parameters": {
"functionCode": "// Very basic novelty filter (mock)\nreturn items.map((item,i)=>{\n return {json:{variant:item.json.choices?.[0]?.text||`Variant ${i+1}`,rationale:\"Based on CTR performance, trying new angle\",similarity:Math.random()}};\n});"
},
"id": "8169b4a4-63af-4c22-b7a1-aa567d200fe2",
"name": "Function Similarity Filter",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
656,
112
]
},
{
"parameters": {
"resource": "database",
"operation": "getAll"
},
"id": "88c28bf5-bb60-484c-8702-713abdf73d55",
"name": "Notion Staged",
"type": "n8n-nodes-base.notion",
"typeVersion": 2,
"position": [
832,
112
],
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2.2,
"position": [
352,
96
],
"id": "c49c2669-e8c5-4e5c-ae38-e5d72a19f536",
"name": "AI Agent"
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
256,
288
],
"id": "92b5b62a-07f6-4f43-9ca2-eea3b3b07b04",
"name": "OpenAI Chat Model"
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
416,
288
],
"id": "97697f06-5168-49a5-9904-6cb6b2b70c92",
"name": "Simple Memory"
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Notion Brief",
"type": "main",
"index": 0
},
{
"node": "Notion History",
"type": "main",
"index": 0
}
]
]
},
"Notion Brief": {
"main": [
[
{
"node": "Function Prepare Prompt",
"type": "main",
"index": 0
}
]
]
},
"Notion History": {
"main": [
[
{
"node": "Function Prepare Prompt",
"type": "main",
"index": 0
}
]
]
},
"Function Similarity Filter": {
"main": [
[
{
"node": "Notion Staged",
"type": "main",
"index": 0
}
]
]
},
"Function Prepare Prompt": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Function Similarity Filter",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "c397fd84-2dda-4419-8c9d-d68d58578851",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "RxCej4PZrn2V7VMt",
"tags": []
}
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.
notionApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Creative Generator. Uses notion, agent, lmChatOpenAi, memoryBufferWindow. Webhook trigger; 9 nodes.
Source: https://github.com/Paulinho19/ad-optimization-agent/blob/c4357bc957f05fd90c20e1c7506433e041b126fe/workflows/creative.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.
Public-facing professionals (developer advocates, founders, marketers, content creators) who get bombarded with LinkedIn messages that aren't actually for them - support requests when you're in market
L&D_AgentsAI_ATIVO. Uses httpRequest, agent, googleCalendarTool, toolSerpApi. Webhook trigger; 93 nodes.
Are you drowning in daily operational chaos, desperately trying to juggle sales, projects, content, and client communication? Imagine an AI brain that handles it all, freeing you to lead your business
This n8n workflow orchestrates a powerful suite of AI Agents and automations to manage and optimize various aspects of an e-commerce operation, particularly for platforms like Shopify. It leverages La
Aura-bot. Uses postgres, lmChatOpenAi, memoryBufferWindow, httpRequest. Webhook trigger; 82 nodes.