This workflow corresponds to n8n.io template #16734 — we link there as the canonical source.
This workflow follows the Agent → HTTP Request 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 →
{
"id": "Bsvzd98FhIAut9lP",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "AI-Based Character Development Tool",
"tags": [
{
"id": "dRjb4UNWiZEeeWDg",
"name": "character-development",
"createdAt": "2026-06-30T11:15:56.340Z",
"updatedAt": "2026-06-30T11:15:56.340Z"
},
{
"id": "74A8pR2DXlZ4f96l",
"name": "ai-writing",
"createdAt": "2026-06-30T11:15:56.185Z",
"updatedAt": "2026-06-30T11:15:56.185Z"
},
{
"id": "brjo1LereDeR5iS3",
"name": "creative-tools",
"createdAt": "2026-06-30T11:15:56.221Z",
"updatedAt": "2026-06-30T11:15:56.221Z"
}
],
"nodes": [
{
"id": "cbb74b87-e89d-46e3-811a-262bfd8a3ae1",
"name": "Sticky Note - Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-416,
-464
],
"parameters": {
"width": 960,
"height": 1140,
"content": "## AI-Based Character Development Tool\n\nThis workflow accepts character input parameters and instantly generates rich, production-ready character profiles \u2014 including personality psychology, layered backstory, emotional arc, motivations, fears, and inner conflicts.\n\n### Who's it for\n- Fiction writers building complex, consistent characters\n- Game designers creating NPCs or player characters\n- Screenwriters developing cast profiles quickly\n- Worldbuilders populating rich narrative universes\n\n### How it works\n1. Trigger fires via Webhook (API call) or Manual input\n2. Input parameters are normalized, validated, and tagged with genre context\n3. Three parallel AI nodes generate psychology, backstory, and emotional arc documents\n4. Each AI output is formatted and merged into one unified context object\n5. A final AI node synthesizes all three documents into a cohesive Character Bible\n6. JS formatter structures the output into clean, structured fields\n7. Response node returns the complete character profile as JSON (and optionally logs it to Google Sheets)\n\n### Required Inputs\n- name \u2014 Character's full name\n- age \u2014 Numerical age or life-stage description\n- archetype \u2014 e.g. Hero, Trickster, Mentor, Shadow, Outlaw\n- world_setting \u2014 e.g. dystopian sci-fi, medieval fantasy, contemporary thriller\n- story_role \u2014 e.g. protagonist, antagonist, supporting, anti-hero\n- traits \u2014 Comma-separated traits or freeform description (optional)\n- constraints \u2014 Any hard rules for the character (optional)\n\n### How to set up\n1. Import this workflow into n8n\n2. Add your OpenAI (or Anthropic) credentials in n8n credential manager and attach them to all four AI model nodes\n3. If using the Google Sheets logging step, add Google Sheets OAuth2 credentials and replace YOUR_SHEET_ID\n4. Activate the workflow, or test it directly using the Manual Trigger\n\n### Requirements\n- OpenAI API key (GPT-4.1 or above recommended for narrative quality)\n- n8n instance with webhook access (for API-based character generation)\n- Google Sheets OAuth2 (optional, for logging generated characters)\n\n### How to customize\n- Swap OpenAI model for Anthropic Claude in any of the four AI nodes\n- Add a Google Sheets node after the Response node to log every generated character\n- Chain a second workflow to auto-generate dialogue samples from the finished Character Bible\n- Modify the system prompts in each AI node to shift tone, genre, or narrative framework (e.g. Save the Cat, Hero's Journey)\n- Adjust temperature values per AI node to control creative variance (lower = more consistent, higher = more unexpected)"
},
"typeVersion": 1
},
{
"id": "a39b2e80-185c-467d-9f61-e3390ac47ab8",
"name": "Sticky Note - Section 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
704,
-224
],
"parameters": {
"color": 4,
"width": 700,
"height": 660,
"content": "## 1. Trigger & Input Normalization\n\nAccepts character parameters via Webhook POST or Manual Trigger for direct testing in n8n.\n\nThe Set node normalizes all incoming fields into a consistent schema, applying sensible defaults for any missing optional fields.\n\nThe Python node validates the archetype against a known list, infers genre tags from the world_setting description, and flags the request as valid before it proceeds to AI generation."
},
"typeVersion": 1
},
{
"id": "9253110e-afc6-470f-a03b-7ef95f7cfe5e",
"name": "Sticky Note - Section 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1488,
-720
],
"parameters": {
"color": 3,
"width": 960,
"height": 1928,
"content": "## 2. Parallel AI Generation\n\nThree AI agent nodes run in parallel, each focused on one dimension of the character:\n\n- Psychology \u2014 Big Five traits, cognitive style, defense mechanisms, shadow self\n- Backstory \u2014 origins, formative events, the inciting wound, hidden past\n- Emotional Arc \u2014 core desire, deep need, fatal flaw, inner conflict, growth edge\n\nEach branch uses its own OpenAI model node so temperature and tone can be tuned independently per document type. All three outputs are formatted and merged before moving to the synthesis stage."
},
"typeVersion": 1
},
{
"id": "58e18650-06ec-4a83-9454-3985f2f7c1b5",
"name": "Sticky Note - Section 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2480,
-464
],
"parameters": {
"color": 6,
"width": 1600,
"height": 620,
"content": "## 3. Synthesis, Formatting & Response\n\nThe three research documents (psychology, backstory, emotional arc) are merged into a single context object and passed to a final AI node, which synthesizes everything into one cohesive Character Bible with 9 structured sections.\n\nA JS node parses the Character Bible into clean, individually addressable fields (identity snapshot, personality core, wound and lie, story hooks, etc).\n\nThe structured profile is returned as JSON via the webhook response, and optionally logged to a Google Sheet for tracking every character generated."
},
"typeVersion": 1
},
{
"id": "10db8122-37ad-4805-b89c-380113b3f0b9",
"name": "Webhook - Character Input",
"type": "n8n-nodes-base.webhook",
"position": [
832,
80
],
"parameters": {
"path": "character-development",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 1.1
},
{
"id": "a4c6f87f-a9f2-42a8-afbb-cd95e6eb4433",
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"position": [
832,
272
],
"parameters": {},
"typeVersion": 1
},
{
"id": "e2a1faf1-b658-4f79-9090-b718418e0807",
"name": "Normalize Input Parameters",
"type": "n8n-nodes-base.set",
"position": [
1056,
176
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"name": "name",
"type": "string",
"value": "={{ $json.body?.name || $json.name || 'Unnamed Character' }}"
},
{
"name": "age",
"type": "string",
"value": "={{ $json.body?.age || $json.age || '30' }}"
},
{
"name": "archetype",
"type": "string",
"value": "={{ $json.body?.archetype || $json.archetype || 'Hero' }}"
},
{
"name": "world_setting",
"type": "string",
"value": "={{ $json.body?.world_setting || $json.world_setting || 'contemporary thriller' }}"
},
{
"name": "story_role",
"type": "string",
"value": "={{ $json.body?.story_role || $json.story_role || 'protagonist' }}"
},
{
"name": "traits",
"type": "string",
"value": "={{ $json.body?.traits || $json.traits || 'None specified' }}"
},
{
"name": "constraints",
"type": "string",
"value": "={{ $json.body?.constraints || $json.constraints || 'None specified' }}"
},
{
"name": "requestId",
"type": "string",
"value": "={{ 'char-' + Date.now() }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f4b741ac-2235-41f1-b397-e3f8df169cf9",
"name": "Python - Validate & Enrich Input",
"type": "n8n-nodes-base.code",
"notes": "Validates required fields, normalizes archetype casing, tags genre context from world_setting, and flags any missing critical inputs before AI nodes fire.",
"position": [
1280,
176
],
"parameters": {
"mode": "runOnceForEachItem",
"language": "python",
"pythonCode": "item = _input.item['json']\n\nVALID_ARCHETYPES = [\n 'hero', 'mentor', 'trickster', 'shadow', 'outlaw',\n 'lover', 'caregiver', 'sage', 'innocent', 'explorer',\n 'ruler', 'creator', 'jester', 'magician', 'everyman'\n]\n\narchetype = item.get('archetype', 'Hero').strip().lower()\nif archetype not in VALID_ARCHETYPES:\n archetype = 'hero'\n\n# Infer genre tags from world_setting\nworld = item.get('world_setting', '').lower()\ngenre_tags = []\nif any(w in world for w in ['sci-fi', 'dystopian', 'futuristic', 'cyberpunk', 'space']):\n genre_tags.append('science fiction')\nif any(w in world for w in ['fantasy', 'medieval', 'magic', 'elves', 'dragons']):\n genre_tags.append('fantasy')\nif any(w in world for w in ['thriller', 'noir', 'detective', 'crime', 'spy']):\n genre_tags.append('thriller')\nif any(w in world for w in ['horror', 'gothic', 'supernatural', 'paranormal']):\n genre_tags.append('horror')\nif any(w in world for w in ['romance', 'contemporary', 'literary', 'drama']):\n genre_tags.append('literary fiction')\nif not genre_tags:\n genre_tags.append('general fiction')\n\nreturn {\n 'json': {\n **item,\n 'archetype': archetype.title(),\n 'genre_tags': ', '.join(genre_tags),\n 'isValid': True,\n 'validationNote': 'Input normalized successfully'\n }\n}"
},
"notesInFlow": false,
"typeVersion": 2
},
{
"id": "4351edec-c82a-4ec3-ab25-7318e5e00a7c",
"name": "Filter Valid Requests",
"type": "n8n-nodes-base.filter",
"position": [
1504,
176
],
"parameters": {
"options": {},
"conditions": {
"conditions": [
{
"operator": {
"type": "boolean",
"operation": "true"
},
"leftValue": "={{ $json.isValid }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "e5af4d75-6229-468d-b591-2f300dc9d6a8",
"name": "JS - Split to Parallel Branches",
"type": "n8n-nodes-base.code",
"position": [
1728,
176
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Duplicate item for parallel AI branches\nconst item = $input.item.json;\nreturn { json: { ...item, branch: 'parallel_start' } };"
},
"typeVersion": 2
},
{
"id": "80198286-a5be-472d-9c77-4cc98c5003b9",
"name": "AI - Generate Psychology Profile",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1952,
-320
],
"parameters": {
"text": "=You are a master psychologist and character designer specializing in deep fictional personalities.\n\nCreate a comprehensive psychological profile for this character:\n\nName: {{ $json.name }}\nAge: {{ $json.age }}\nArchetype: {{ $json.archetype }}\nWorld/Setting: {{ $json.world_setting }}\nStory Role: {{ $json.story_role }}\nKnown Traits: {{ $json.traits }}\nGenre Context: {{ $json.genre_tags }}\nConstraints: {{ $json.constraints }}\n\nGenerate a structured psychological profile covering:\n1. CORE PERSONALITY (Big Five traits with intensity scores 1-10)\n2. COGNITIVE STYLE (how they think, make decisions, process information)\n3. EMOTIONAL PROFILE (dominant emotions, emotional triggers, coping mechanisms)\n4. SOCIAL DYNAMICS (how they relate to others, attachment style, leadership vs. follower tendencies)\n5. PSYCHOLOGICAL WOUNDS (formative traumas or lacks that shape current behavior)\n6. DEFENSE MECHANISMS (what walls they put up and why)\n7. SHADOW SELF (the hidden/repressed aspects of their personality)\n\nBe specific, vivid, and psychologically grounded. Avoid clich\u00e9s. Make this character feel real and complex.\nRespond in clean prose paragraphs under each numbered heading. Total length: 400-500 words.",
"options": {
"systemMessage": "You are an expert in Jungian psychology, narrative theory, and character construction. Your profiles are used by professional authors and game designers. You write with psychological precision and narrative intuition. Always ground personality in specific behavioral patterns, not abstract labels."
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "e9bf404b-70fc-425d-b857-d41a9ed1f05c",
"name": "AI - Generate Backstory",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1952,
80
],
"parameters": {
"text": "=You are a master storyteller and worldbuilder specializing in rich character backstories.\n\nCreate a detailed backstory for this character:\n\nName: {{ $json.name }}\nAge: {{ $json.age }}\nArchetype: {{ $json.archetype }}\nWorld/Setting: {{ $json.world_setting }}\nStory Role: {{ $json.story_role }}\nKnown Traits: {{ $json.traits }}\nGenre Context: {{ $json.genre_tags }}\nConstraints: {{ $json.constraints }}\n\nGenerate a layered backstory covering:\n1. ORIGINS (birthplace, family structure, social class, cultural background)\n2. FORMATIVE CHILDHOOD (2-3 pivotal early experiences that shaped them)\n3. ADOLESCENCE & TURNING POINTS (the moment(s) they began becoming who they are)\n4. ADULT HISTORY (key relationships, losses, achievements, failures before the story begins)\n5. THE INCITING WOUND (the single deepest scar \u2014 loss, betrayal, failure, or revelation)\n6. HIDDEN PAST (one secret or buried truth only the reader may know)\n7. SKILLS & KNOWLEDGE ORIGIN (how they acquired their key abilities and expertise)\n\nMake the backstory internally consistent with the world setting. Avoid fantasy tropes unless the genre demands it. Every beat should connect to who they are now.\nRespond in clean prose paragraphs under each numbered heading. Total length: 400-500 words.",
"options": {
"systemMessage": "You are a professional novelist and story consultant. You specialize in backstories that feel earned, specific, and free of clich\u00e9s. Your backstories contain unexpected details that make a character feel like a real person with a real history. Every element you write should serve the character's present-day psychology and story function."
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "9219f05e-c6fd-4fe7-860c-e86c275e21ce",
"name": "AI - Generate Emotional Arc",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1952,
576
],
"parameters": {
"text": "=You are an expert narrative architect and emotional arc designer.\n\nDesign a complete emotional arc and inner conflict map for this character:\n\nName: {{ $json.name }}\nAge: {{ $json.age }}\nArchetype: {{ $json.archetype }}\nWorld/Setting: {{ $json.world_setting }}\nStory Role: {{ $json.story_role }}\nKnown Traits: {{ $json.traits }}\nGenre Context: {{ $json.genre_tags }}\nConstraints: {{ $json.constraints }}\n\nGenerate a full emotional and motivational architecture:\n1. CORE DESIRE (what they want above all else \u2014 the external goal)\n2. DEEP NEED (what they actually need, often the opposite of what they want)\n3. PRIMARY FEAR (the thing that paralyzes them or drives irrational behavior)\n4. FATAL FLAW (the internal trait that will cause the most conflict or potential downfall)\n5. MISBELIEF / WOUND BELIEF (the lie they believe about themselves or the world due to their wound)\n6. EMOTIONAL ARC TRAJECTORY (emotional state at Act 1 start \u2192 midpoint transformation \u2192 Act 3 resolution or collapse)\n7. INNER CONFLICT (the two opposing forces battling within them throughout the story)\n8. GROWTH EDGE (what they must confront, accept, or sacrifice to grow \u2014 or fail to)\n9. RELATIONSHIP DYNAMICS (how their flaw and need manifest in relationships with others)\n\nBe specific and non-generic. The arc should feel inevitable in retrospect but surprising in the moment.\nRespond in clean prose paragraphs under each numbered heading. Total length: 400-500 words.",
"options": {
"systemMessage": "You are a senior script consultant and narrative therapist trained in the Save the Cat, Story Grid, and Dramatic Need frameworks. You build emotional arcs that feel emotionally true and dramatically inevitable. You understand that character arc is always about internal transformation, and that the best arcs contain real sacrifice and risk of failure."
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "2b25cfc1-5e49-4a50-8598-00997d4322ea",
"name": "JS - Prepare Merge Context",
"type": "n8n-nodes-base.code",
"position": [
2304,
-224
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Merge all three AI branch outputs into one object\n// In n8n, branches are merged by a Merge node; this node formats the merged item\nconst item = $input.item.json;\n\nreturn {\n json: {\n requestId: item.requestId,\n name: item.name,\n age: item.age,\n archetype: item.archetype,\n world_setting: item.world_setting,\n story_role: item.story_role,\n traits: item.traits,\n constraints: item.constraints,\n genre_tags: item.genre_tags,\n psychology_raw: item.psychology_raw || item.output || '',\n backstory_raw: item.backstory_raw || '',\n emotional_arc_raw: item.emotional_arc_raw || '',\n merge_ready: true\n }\n};"
},
"typeVersion": 2
},
{
"id": "19b05a8c-6396-4e53-b36c-b44d71e77677",
"name": "Merge AI Branch Outputs",
"type": "n8n-nodes-base.merge",
"position": [
2528,
-224
],
"parameters": {
"mode": "combineBySql",
"query": "SELECT * FROM t1 LEFT JOIN t2 ON t1.requestId = t2.requestId LEFT JOIN t3 ON t1.requestId = t3.requestId"
},
"typeVersion": 3
},
{
"id": "f83cc603-63c0-44d0-805b-3764e80f0fe3",
"name": "AI - Synthesize Character Bible",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2960,
-224
],
"parameters": {
"text": "=You are the final editor and character architect. Synthesize the three research documents below into one cohesive, production-ready character profile.\n\n--- CHARACTER PARAMETERS ---\nName: {{ $json.name }}\nAge: {{ $json.age }}\nArchetype: {{ $json.archetype }}\nWorld/Setting: {{ $json.world_setting }}\nStory Role: {{ $json.story_role }}\nGenre: {{ $json.genre_tags }}\n\n--- PSYCHOLOGY DOCUMENT ---\n{{ $json.psychology_raw }}\n\n--- BACKSTORY DOCUMENT ---\n{{ $json.backstory_raw }}\n\n--- EMOTIONAL ARC DOCUMENT ---\n{{ $json.emotional_arc_raw }}\n\nSynthesize these into a unified CHARACTER BIBLE with the following exact sections:\n\n# CHARACTER BIBLE: {{ $json.name }}\n\n## Identity Snapshot\n[3-sentence summary: who they are, what they want, what holds them back]\n\n## Personality Core\n[Psychological profile condensed to the 5 most defining traits, each with a 1-sentence behavioral manifestation]\n\n## Backstory Highlights\n[The 4 most narratively important backstory beats, each in 2 sentences]\n\n## Emotional Architecture\n[Core desire, deep need, primary fear, and fatal flaw \u2014 each 1-2 sentences]\n\n## The Wound & The Lie\n[The inciting wound and the false belief it created \u2014 3-4 sentences]\n\n## Emotional Arc\n[Beginning state \u2192 Midpoint crisis \u2192 End state (transformation or tragedy) \u2014 3 sentences]\n\n## Inner Conflict\n[The central internal battle in 2-3 sentences]\n\n## Voice & Presence\n[How they speak, move, and occupy space \u2014 2-3 sentences for actors/writers]\n\n## Story Hooks\n[3 specific scene or plot hooks uniquely enabled by this character's psychology and history]\n\nMake the profile feel like it was written by a professional story consultant. Eliminate redundancy between sections. Ensure every line has specific, unique detail \u2014 no generic filler.\nTotal length: 550-700 words.",
"options": {
"systemMessage": "You are the lead character consultant for a major publishing house. Your character bibles are used by authors, directors, and game designers. You synthesize research into concise, actionable, specific profiles that give creators everything they need and nothing they don't. Your writing is precise, vivid, and free of clich\u00e9s."
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "0d75620e-e881-402d-a32f-9dbdf258c881",
"name": "JS - Structure Character Profile",
"type": "n8n-nodes-base.code",
"position": [
3312,
-224
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const item = $input.item.json;\nconst raw = item.output || item.response || item.text || '';\n\n// Helper: extract section content from markdown headers\nfunction extractSection(text, header) {\n const regex = new RegExp(`##\\\\s*${header}[\\\\s\\\\S]*?\\\\n([\\\\s\\\\S]*?)(?=\\\\n##|$)`, 'i');\n const match = text.match(regex);\n return match ? match[1].trim() : '';\n}\n\nconst profile = {\n meta: {\n requestId: item.requestId,\n generatedAt: new Date().toISOString(),\n characterName: item.name,\n version: '1.0'\n },\n parameters: {\n name: item.name,\n age: item.age,\n archetype: item.archetype,\n world_setting: item.world_setting,\n story_role: item.story_role,\n genre_tags: item.genre_tags,\n user_traits: item.traits,\n constraints: item.constraints\n },\n character_bible: {\n identity_snapshot: extractSection(raw, 'Identity Snapshot'),\n personality_core: extractSection(raw, 'Personality Core'),\n backstory_highlights: extractSection(raw, 'Backstory Highlights'),\n emotional_architecture: extractSection(raw, 'Emotional Architecture'),\n wound_and_lie: extractSection(raw, 'The Wound & The Lie'),\n emotional_arc: extractSection(raw, 'Emotional Arc'),\n inner_conflict: extractSection(raw, 'Inner Conflict'),\n voice_and_presence: extractSection(raw, 'Voice & Presence'),\n story_hooks: extractSection(raw, 'Story Hooks')\n },\n raw_documents: {\n psychology: item.psychology_raw || '',\n backstory: item.backstory_raw || '',\n emotional_arc: item.emotional_arc_raw || ''\n },\n full_bible_text: raw,\n status: 'complete'\n};\n\nreturn { json: profile };"
},
"typeVersion": 2
},
{
"id": "237ba093-7db1-48e0-9a1d-c9a0e1b1cafb",
"name": "Wait - Processing Buffer",
"type": "n8n-nodes-base.wait",
"position": [
3536,
-224
],
"parameters": {},
"typeVersion": 1
},
{
"id": "38028ff0-30e9-4f1b-9711-1b896575e4e1",
"name": "Respond - Return Character Profile",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
3760,
-320
],
"parameters": {
"options": {
"responseCode": 200,
"responseHeaders": {
"entries": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "X-Character-Id",
"value": "={{ $json.meta?.requestId }}"
}
]
}
},
"respondWith": "json",
"responseBody": "={{ JSON.stringify($json, null, 2) }}"
},
"typeVersion": 1.1
},
{
"id": "9eb2f4c1-febc-40a3-8779-e9c0ddc5e483",
"name": "Log to Google Sheets (Optional)",
"type": "n8n-nodes-base.httpRequest",
"notes": "Optional: logs each generated character to a Google Sheet for tracking. Add your Google Sheets OAuth2 credentials and replace YOUR_SHEET_ID.",
"position": [
3760,
-128
],
"parameters": {
"url": "https://sheets.googleapis.com/v4/spreadsheets/YOUR_SHEET_ID/values/Characters!A1:append?valueInputOption=USER_ENTERED",
"method": "POST",
"options": {},
"jsonBody": "={\n \"values\": [[\n \"{{ $json.meta.generatedAt }}\",\n \"{{ $json.meta.requestId }}\",\n \"{{ $json.parameters.name }}\",\n \"{{ $json.parameters.age }}\",\n \"{{ $json.parameters.archetype }}\",\n \"{{ $json.parameters.world_setting }}\",\n \"{{ $json.parameters.story_role }}\",\n \"{{ $json.parameters.genre_tags }}\",\n \"{{ $json.character_bible.identity_snapshot.substring(0, 200) }}\",\n \"Complete\"\n ]]\n}",
"sendBody": true,
"specifyBody": "json"
},
"notesInFlow": false,
"typeVersion": 4.2
},
{
"id": "4d49e1f3-4679-48d5-b3f0-9b84e427c76b",
"name": "OpenAI Model - Psychology",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2016,
-96
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1"
},
"options": {
"maxTokens": 1200,
"temperature": 0.85
},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "fac4913d-a2e9-400f-90b0-64596b0b2531",
"name": "OpenAI Model - Backstory",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2016,
304
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1"
},
"options": {
"maxTokens": 1200,
"temperature": 0.9
},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "f4c5e8b0-a2c4-4e2d-a2e7-d18c92e08b70",
"name": "OpenAI Model - Emotional Arc",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2016,
800
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1"
},
"options": {
"maxTokens": 1200,
"temperature": 0.8
},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "c46582dc-b47c-4677-8b71-7641dedf4019",
"name": "OpenAI Model - Synthesis",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
3024,
0
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1"
},
"options": {
"maxTokens": 2000,
"temperature": 0.75
},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "e915a75c-0e14-4fbf-a473-92b59a2016fb",
"name": "Wait For Data",
"type": "n8n-nodes-base.wait",
"position": [
2736,
-224
],
"parameters": {},
"typeVersion": 1.1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "22f09f0d-557d-4899-a892-0c8eab25f5aa",
"connections": {
"Wait For Data": {
"main": [
[
{
"node": "AI - Synthesize Character Bible",
"type": "main",
"index": 0
}
]
]
},
"Manual Trigger": {
"main": [
[
{
"node": "Normalize Input Parameters",
"type": "main",
"index": 0
}
]
]
},
"Filter Valid Requests": {
"main": [
[
{
"node": "JS - Split to Parallel Branches",
"type": "main",
"index": 0
}
]
]
},
"Merge AI Branch Outputs": {
"main": [
[
{
"node": "Wait For Data",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Model - Backstory": {
"ai_languageModel": [
[
{
"node": "AI - Generate Backstory",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Model - Synthesis": {
"ai_languageModel": [
[
{
"node": "AI - Synthesize Character Bible",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Wait - Processing Buffer": {
"main": [
[
{
"node": "Respond - Return Character Profile",
"type": "main",
"index": 0
},
{
"node": "Log to Google Sheets (Optional)",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Model - Psychology": {
"ai_languageModel": [
[
{
"node": "AI - Generate Psychology Profile",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Webhook - Character Input": {
"main": [
[
{
"node": "Normalize Input Parameters",
"type": "main",
"index": 0
}
]
]
},
"JS - Prepare Merge Context": {
"main": [
[
{
"node": "Merge AI Branch Outputs",
"type": "main",
"index": 0
}
]
]
},
"Normalize Input Parameters": {
"main": [
[
{
"node": "Python - Validate & Enrich Input",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Model - Emotional Arc": {
"ai_languageModel": [
[
{
"node": "AI - Generate Emotional Arc",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI - Synthesize Character Bible": {
"main": [
[
{
"node": "JS - Structure Character Profile",
"type": "main",
"index": 0
}
]
]
},
"JS - Split to Parallel Branches": {
"main": [
[
{
"node": "AI - Generate Psychology Profile",
"type": "main",
"index": 0
},
{
"node": "AI - Generate Backstory",
"type": "main",
"index": 0
},
{
"node": "AI - Generate Emotional Arc",
"type": "main",
"index": 0
}
]
]
},
"AI - Generate Psychology Profile": {
"main": [
[
{
"node": "JS - Prepare Merge Context",
"type": "main",
"index": 0
}
]
]
},
"JS - Structure Character Profile": {
"main": [
[
{
"node": "Wait - Processing Buffer",
"type": "main",
"index": 0
}
]
]
},
"Python - Validate & Enrich Input": {
"main": [
[
{
"node": "Filter Valid Requests",
"type": "main",
"index": 0
}
]
]
}
}
}
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.
openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow accepts character details via webhook or manual trigger, uses OpenAI to generate psychology, backstory, and emotional arc drafts in parallel, then synthesizes them into a structured “Character Bible” JSON response and optionally appends a log row to Google Sheets.…
Source: https://n8n.io/workflows/16734/ — 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.
VEP WAPP. Uses openAi, lmChatOpenAi, toolCalculator, agent. Webhook trigger; 100 nodes.
⏺ 🚀 How it works
L&D_AgentsAI_ATIVO. Uses httpRequest, agent, googleCalendarTool, toolSerpApi. Webhook trigger; 93 nodes.
AI Customer Service Automation - Portfolio. Uses googleSheets, httpRequest, agent, memoryBufferWindow. Webhook trigger; 91 nodes.
CLINICAINTEGRAL_secretary. Uses postgres, mcpClientTool, googleDriveTool, toolWorkflow. Webhook trigger; 89 nodes.