This workflow corresponds to n8n.io template #4553 — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger 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": "w78LbTzNOGbofCGA",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Guerrilla Marketing Campaign Plan Generator (using Swarm Intelligence)",
"tags": [],
"nodes": [
{
"id": "f4c7bc5e-9584-4d75-924d-cfccd70f1551",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-5800,
2040
],
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "cb7217af-5f82-4ade-a1ac-89d02ab4e12d",
"name": "Introduction Writer",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
220
],
"parameters": {
"text": "=Here is the project description: \n{{ $json.output }}",
"options": {
"systemMessage": "You are an elite marketing strategist with decades of global experience. Your task is to create the \"Introduction\" section of a guerrilla marketing campaign master document.\n\nInstructions:\n- Explain the purpose of having a detailed plan in guerrilla marketing.\n- Highlight the strategic importance of creativity, precision, and adaptability.\n- Set an inspiring, motivational, and professional tone.\n- Your writing must reflect deep expertise, as if coaching a world-class marketing team.\n- Analyze the emotional and practical importance of structured preparation.\n\nBe sure to:\n- Research the core reasons why guerrilla marketing needs planning.\n- Think about successful examples globally and summarize underlying principles.\n- Avoid generic advice; write sharp, specific, and high-level insight.\n- Maintain logical structure without deviation.\n\nFormat:\n- Output must be clear and simple paragraphs.\n\n- Only output the main paragraph ready for direct copy-paste.\n- If specific information is not available, leave blank without guessing.\n\n\nthe output should only contain the result, not any pre or post result note"
},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "73a42030-3fa6-47ce-b8c1-cb471d45e9c4",
"name": "Campaign Definition Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
480
],
"parameters": {
"text": "=You are a creative campaign architect with vast global experience. Your task is to create the \"Campaign Definition\" section for a guerrilla marketing strategy.\n\nInstructions:\n- Define the name of the campaign clearly and creatively.\n- Write a precise mission statement (maximum 2 lines).\n- Describe the core problem or opportunity the campaign addresses.\n- Ensure the tone is innovative yet clear.\n\nYou must:\n- Analyze the target market briefly before writing.\n- Ensure that the name and mission resonate with guerrilla marketing spirit.\n- Validate that the problem statement is realistic and solvable.\n- Stay tightly focused on practicality and creativity.\n\nFormat:\n- Output must be clear and simple paragraphs.\n- Only the paragraph content.\n- Leave blank any section that cannot be precisely completed based on available data.\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "986dd87c-8c95-40e7-a95b-c3804900164b",
"name": "Campaign Objectives Specialist",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
740
],
"parameters": {
"text": "=You are a goal-setting expert and strategic planner. Your task is to create the \"Campaign Objectives\" section for a guerrilla marketing strategy.\n\nInstructions:\n- Define 2-3 short-term objectives that are measurable and concrete.\n- Define 2-3 long-term strategic objectives aligned with brand growth.\n- Ensure that objectives are written following the SMART criteria.\n- Focus on achievable, logical, and highly strategic goals.\n\nYou must:\n- Carefully assess the project description.\n- Ensure the objectives can realistically be measured and achieved.\n- Avoid vague language or generic goal setting.\n- Maintain a strategic yet inspiring tone.\n\nFormat:\n- Output must be clear and simple paragraphs.\n- Leave blank sections where information is insufficient without guessing.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "da84d2d6-48d5-4dd3-ab09-b335ee026773",
"name": "Current Situation Analyst",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
1000
],
"parameters": {
"text": "=You are an advanced market and competition analyst. Your task is to build the \"Current Situation Analysis\" section.\n\nInstructions:\n- Perform a SWOT analysis (Strengths, Weaknesses, Opportunities, Threats).\n- Summarize the current competitor landscape (main competitors, market dynamics).\n- Identify key consumer trends relevant to the campaign.\n\nYou must:\n- Research thoroughly based on the project context.\n- Cross-reference assumptions to ensure practical validity.\n- Critically assess possible gaps or challenges.\n- Maintain a strategic, executive-level analytical tone.\n\nFormat:\n- Output must be clear and simple paragraphs.\n- If data is missing, leave blank without fabricating information.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "5233dc8b-7910-4418-98c5-0d66652b63fe",
"name": "Target Persona Researcher",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
1260
],
"parameters": {
"text": "=Here is the project description: \n{{ $json.output }}",
"options": {
"systemMessage": "You are a deep customer insight researcher with specialization in behavioral psychology. Your task is to create the \"Target Audience Persona\" section create 5 different persona with detailed info as described below,and name them depend on the persona to a famous character (celebrity, movie, game, someone who has been famous) that has those persona (or similar).\n\nInstructions:\n- Describe the demographic profile: age, gender, occupation, income level.\n- Describe the psychographic profile: values, motivations, fears, lifestyles.\n- Explain expected buying behaviors and key emotional triggers.\n\nYou must:\n- Research potential customer segments carefully.\n- Prioritize accuracy, depth, and practical segmentation.\n- Validate assumptions against realistic market behaviors.\n- Ensure persona matches guerrilla marketing style (open to surprise, risk-YOUR_OPENAI_KEY_HERE, trend adopters).\n\nFormat:\n- Output must be clear and simple paragraphs.\n- If some details cannot be inferred reasonably, leave blank.\n\nthe output should only contain the result, not any pre or post result note\n"
},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "13b9e9a5-4691-4e05-b422-2e6a04795a16",
"name": "Key Messaging Specialist",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
1520
],
"parameters": {
"text": "=You are a brand messaging expert specializing in guerrilla marketing campaigns. Your task is to create the \"Key Messaging\" section.\n\nInstructions:\n- Define the primary message the campaign must deliver.\n- Write a memorable slogan or core phrase.\n- Define the tone of voice (e.g., bold, rebellious, humorous).\n- Ensure the message is aligned with the emotions of the target audience.\n\nYou must:\n- Research psychological triggers related to guerrilla marketing success.\n- Focus on clear, emotional, and provocative messaging.\n- Validate that the messaging style fits guerrilla marketing culture (unexpected, unforgettable, shareable).\n\nFormat:\n- Output must be clear and simple paragraphs.\n- Leave blank if information cannot be completed without strong basis.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "d8ec0c1e-ffaa-4c92-8f1d-4c2a1641844d",
"name": "Main Strategy Architect",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
1780
],
"parameters": {
"text": "=You are a chief strategy architect for disruptive marketing campaigns. Your task is to write the \"Main Marketing Strategy\" section.\n\nInstructions:\n- Define the strategic direction (penetration, emotional stimulation, interaction-driven).\n- Outline how to leverage guerrilla tactics for maximum impact.\n- Ensure the plan is realistic, creative, and shock-driven.\n\nYou must:\n- Analyze competitive patterns.\n- Validate the feasibility of tactics.\n- Emphasize high surprise factor, emotional involvement, and viral potential.\n- Ensure strategy feels bold but executable.\n\nFormat:\n- Output must be clear and simple paragraphs.\n- Leave blank parts if strong information is missing.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "f12c7d75-238f-4b15-b517-57de140c5aef",
"name": "guerrilla Tactics Designer",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
2040
],
"parameters": {
"text": "=You are a guerrilla marketing tactics designer with expertise in low-cost, high-impact strategies. Your task is to develop the \"guerrilla Marketing Tactics\" section.\n\nInstructions:\n- Propose specific unconventional tactics: street marketing, ambient marketing, flash mobs, PR stunts.\n- Each tactic must be realistic, cost-effective, and viral-friendly.\n- Prioritize tactics that maximize shock, surprise, and memorability.\n\nYou must:\n- Evaluate feasibility and ease of execution.\n- Ensure tactics have natural potential for virality.\n- Only propose ideas that could realistically be implemented with limited budget.\n- Maintain creativity at the highest level.\n\nFormat:\n- Output must be paragraphs.\n- Leave blank if insufficient information.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "6b6c1448-fe5f-4f92-a702-54a1cb80ac94",
"name": "Channel Strategy Expert",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
2300
],
"parameters": {
"text": "=You are a distribution and media strategist. Your task is to complete the \"Channels & Distribution\" section.\n\nInstructions:\n- Identify the best channels for campaign exposure (social media, public places, PR, collaborations).\n- Explain briefly how each channel would maximize visibility.\n- Ensure chosen channels fit guerrilla marketing principles: unexpectedness, low cost, mass attention.\n\nYou must:\n- Research effectiveness of each potential channel for guerrilla marketing.\n- Validate reach potential against campaign goals.\n- Focus on creativity and strategic leverage.\n\nFormat:\n- Output must be clean paragraphs.\n- If necessary information is missing, leave the area blank.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "d26d1002-65e9-4c28-acfe-1753f9c5c112",
"name": "Execution Planner",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
2560
],
"parameters": {
"text": "=You are an operational execution master. Your task is to complete the \"Execution Plan\" section.\n\nInstructions:\n- Define clear phases of the campaign.\n- Specify timelines, responsibilities, and resources needed.\n- Ensure the plan is step-by-step and execution-ready.\n- Plan should reflect maximum agility and quick reaction options.\n\nYou must:\n- Validate feasibility at each step.\n- Ensure no unnecessary dependency between steps.\n- Maintain practical, fast-paced planning style suited for guerrilla marketing.\n\nFormat:\n- Output must be clean paragraphs.\n- If strong data missing, leave blank without assuming.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "1fc40cd2-5dbc-4689-b40f-bef05f821546",
"name": "Budget Planning Specialist",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
2820
],
"parameters": {
"text": "=You are a financial strategist for guerrilla marketing campaigns. Your task is to create the \"Budget Planning\" section.\n\nInstructions:\n- Estimate the necessary costs for all campaign activities.\n- Prioritize low-cost, high-impact solutions.\n- Identify critical areas where budget must be allocated (content creation, materials, permits, logistics).\n- Recommend contingency reserve for unexpected expenses.\n\nYou must:\n- Research reasonable cost ranges for guerrilla tactics.\n- Ensure all planned costs are realistic and aligned with project scale.\n- Avoid overestimations or underestimations.\n- Focus on maximum ROI (Return on Investment).\n\nFormat:\n- Output must be clean paragraphs.\n- If strong data missing, leave blank without assuming.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "8cc0f4c9-ac63-4d7e-9484-fae55587b490",
"name": "Monitoring and KPIs Expert",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
3080
],
"parameters": {
"text": "=You are a performance measurement expert. Your task is to complete the \"Monitoring & KPIs\" section.\n\nInstructions:\n- Define clear KPIs (Key Performance Indicators) for campaign success.\n- Focus on awareness, engagement, and conversion metrics.\n- Suggest tools and methods for measuring campaign performance.\n\nYou must:\n- Research standard practices for guerrilla campaign measurement.\n- Validate that KPIs are realistic, meaningful, and measurable.\n- Avoid vague KPIs or overcomplicated metrics.\n\nFormat:\n- Output must be clean paragraphs.\n- If strong data missing, leave blank without assuming.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "31912a29-a8c2-4616-9bd6-d0865963d3ca",
"name": "Risk Management Expert",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
3340
],
"parameters": {
"text": "=You are a risk strategist specialized in marketing campaigns. Your task is to complete the \"Risk Management\" section.\n\nInstructions:\n- Identify key risks: legal, operational, branding.\n- Propose realistic mitigation strategies for each risk.\n- Focus on minimizing negative public impact and legal exposure.\n\nYou must:\n- Analyze real-world case studies of guerrilla marketing risks.\n- Validate the practicality of suggested risk mitigation strategies.\n- Ensure risk management approaches are lightweight but effective.\n\nFormat:\n- Output must be clean paragraphs.\n- If strong data missing, leave blank without assuming.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "c0f84840-e25a-4b4c-a14a-c3a3c14b4141",
"name": "Do's and Don'ts Advisor",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
3600
],
"parameters": {
"text": "=You are an advisor in guerrilla marketing best practices. Your task is to complete the \"Do\u2019s and Don\u2019ts\" section.\n\nInstructions:\n- Highlight critical actions that must be done to ensure campaign success.\n- Highlight critical actions that must be avoided to prevent failure.\n- Emphasize creativity, legality, and ethical practices.\n\nYou must:\n- Base advice on real-world guerrilla marketing successes and failures.\n- Ensure points are practical, sharp, and directly actionable.\n- Focus on lessons specifically tied to nontraditional, shock-driven marketing.\n\nFormat:\n- Output must be clean paragraphs and bullet points.\n- If strong data missing, leave blank without assuming.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "0fc661cd-1b77-49f9-bf61-2071ce7f4c36",
"name": "Final To-Do List Creator",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
3860
],
"parameters": {
"text": "=You are an operations and action planning specialist. Your task is to complete the \"Final To-Do List\" section.\n\nInstructions:\n- Summarize essential actionable steps from all previous sections.\n- Organize logically from preparation to execution.\n- Keep list concise but comprehensive.\n\nYou must:\n- Cross-reference all campaign elements carefully.\n- Avoid missing any critical step.\n- Prioritize actions critical for campaign success.\n\nFormat:\n- Output must be clean paragraphs and bullet points.\n- If strong data missing, leave blank without assuming.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "62ef19de-e112-43fb-987e-c57865f1b376",
"name": "Post-Campaign Analyst",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1560,
4120
],
"parameters": {
"text": "=You are a post-campaign analyst with expertise in learning optimization. Your task is to complete the \"Post-Campaign Activities\" section.\n\nInstructions:\n- Define how to evaluate the campaign's success versus goals.\n- Outline the feedback collection process.\n- Summarize key learnings and improvement opportunities.\n\nYou must:\n- Base analysis on real post-campaign industry practices.\n- Ensure the learning loop is practical, quick, and meaningful.\n- Focus on building reusability for future campaigns.\n\nFormat:\n- Output must be clean paragraphs.\n- If strong data missing, leave blank without assuming.\n\nthe output should only contain the result, not any pre or post result note\n\nHere is the project description: \n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "e3bf7e06-0fe4-4c60-87f0-68affbaf1d57",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-2880,
4800
],
"parameters": {
"sessionKey": "={{ $json.session_id }}",
"sessionIdType": "customKey",
"contextWindowLength": 15
},
"typeVersion": 1.3
},
{
"id": "fae3499b-4a69-4a36-8726-07def17289c8",
"name": "Market Analyst",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-4640,
2040
],
"parameters": {
"text": "=You are a highly critical and realistic Feasibility and Market Validator. Your task is to complete the section \\\"Critical Validation\\\".\\n\\nAnalyze the provided idea very pessimistically and critically, focusing on finding flaws, risks, and weaknesses first. Your approach is to:\\n\\n- Check if the idea is realistically executable (technical, financial, and operational feasibility)\\n- Critically assess if the idea fits market needs (market demand, competition, differentiation)\\n- If the idea can be improved, provide precise and actionable improvement feedback to enhance it\\n- If the idea is fundamentally weak or unlikely to succeed, clearly recommend discarding it and starting a new idea on the same topic\\n- If the idea is strong, innovative, and suitable for guerrilla marketing, approve it confidently\\n\\nNever sugarcoat problems. Focus on honest, actionable feedback, with the goal of reaching the strongest possible idea.\\n\\nFormat the answer as a clean paragraph. Do not include any titles, headers, numbering, or extra notes.\\n\\nIf you cannot properly evaluate, leave the section blank.\\n\\nHere is the provided project description:\\n {{ $json.output }}\n\nfor the output write is it accepted, or what things exaclty need to modify to be acceptable, and also if the idea is completely not achievable, write to move new gurilla idea and and also give feedback to improve. the result should only contain whether feedbacks (that if those apply on the idea everything will be fixed, so name all the feedbacks with detail, or just tell move to new ideas. do not write both feedback and move to anoteher idea)\nAnd at first explixitly mention this idea is feasable or not with saying it is accepted or not, ",
"options": {},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "fb698621-922e-41ae-8532-10d333ed38ff",
"name": "Idea Generator",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-5080,
2040
],
"parameters": {
"text": "=You are an Gurilla Marketing Idea Creator wich think different and out of box (but feasiable to do) and cheap. Your task is to complete the section \\\"Idea Proposal\\\".\\n\\nBased on the provided project description, conduct the necessary brainstorming and generate creative amazing guerrilla marketing ideas that are feasable. Then elaborate briefly on the idea, explaining what problem it solves and why it could succeed.\\n\\nFocus on:\\n- Invent a fresh, relevant idea\\n- Provide a short but clear elaboration\\n- Ensure the idea is practical, not purely fantasy\\n\\nFormat the answer as a clean paragraph. No titles, headers, numbering, or extra notes. Only the main paragraph, ready to copy-paste.\\n\\nIf you cannot create a valid idea, and everytime only generate one idea (whether imrpove previous idea by considering all given feedbacks, or weather completely write new one) leave it blank.\\n\\nHere is the provided project description:\\n{{ $json.output }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "79a149f3-cfd0-4f94-9874-830bb8bb2173",
"name": "Information Extractor",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
-4220,
2040
],
"parameters": {
"text": "={{ $json.output }}",
"options": {},
"schemaType": "manual",
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"isItAccepted\": {\n\t\t\t\"type\": \"boolean\"\n\t\t}\n\t\n\t}\n}"
},
"typeVersion": 1
},
{
"id": "eac1ccbc-6b4b-47f8-8f8b-b406ab6cb34e",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-3160,
4800
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "b41dbab0-e505-49a5-b413-7b5cc6011a0e",
"name": "Input Parser",
"type": "n8n-nodes-base.code",
"position": [
-5580,
2040
],
"parameters": {
"jsCode": "const workflowStaticData = $getWorkflowStaticData('global');\n\n// get new access token\nworkflowStaticData.originalIdea = $input.first().json.chatInput;\nreturn {\"output\":$input.first().json.chatInput};"
},
"typeVersion": 2
},
{
"id": "abcfffeb-7369-47ab-b936-1be2e88a3180",
"name": "Merge failed results",
"type": "n8n-nodes-base.merge",
"position": [
-3440,
2840
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.1
},
{
"id": "282bb284-bcf7-4f6d-9d85-7888d21bd597",
"name": "combine outputs",
"type": "n8n-nodes-base.code",
"position": [
-3240,
2840
],
"parameters": {
"jsCode": "// Get the global workflow static data\nconst workflowStaticData = $getWorkflowStaticData('global');\n\n// Check if $input.all()[3] exists and its output is false\n// Check the condition\nif (!$input.all()[2]) {\n return[]; // Stop, do nothing\n}\n\n\n// Access its data\nconst originalIdea = workflowStaticData.originalIdea;\n\nreturn {\"output\": `This is business description: '${originalIdea}', And this is generated idea:${$input.all()[0].json.output}, and this the final feedback that you should apply (maybe modify the current idea or maybe generate a more realistic gurilla marketing idea) : ${$input.all()[1].json.output}`};"
},
"typeVersion": 2,
"alwaysOutputData": false
},
{
"id": "9857d479-dede-49ad-88a1-ae00b5343681",
"name": "Merge successful result",
"type": "n8n-nodes-base.merge",
"position": [
-3420,
1140
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.1
},
{
"id": "7c98f796-4273-4117-814c-11c809238085",
"name": "Combine outputs",
"type": "n8n-nodes-base.code",
"position": [
-3200,
1140
],
"parameters": {
"jsCode": "\n// Get the global workflow static data\nconst workflowStaticData = $getWorkflowStaticData('global');\n\n// Access its data\nconst originalIdea = workflowStaticData.originalIdea;\nconst sessionId = (+new Date).toString(36).slice(-5) + Math.random().toString(36).substr(2, 5)\n\nreturn {\"output\": `This is business description: '${originalIdea}', And this is generated idea:${$input.all()[0].json.output}, and this the final feedback that you should apply consider it to have a better and more realistic output: ${$input.all()[1].json.output}`,\"session_id\":sessionId};"
},
"typeVersion": 2
},
{
"id": "b8077851-175d-4aa6-b03b-555d5ae05b2f",
"name": "Merge results 1/2",
"type": "n8n-nodes-base.merge",
"position": [
-180,
1260
],
"parameters": {
"numberInputs": 10
},
"typeVersion": 3.1
},
{
"id": "25deeee6-3546-4944-8c07-27835811c227",
"name": "Merge results 2/2",
"type": "n8n-nodes-base.merge",
"position": [
-180,
3280
],
"parameters": {
"numberInputs": 6
},
"typeVersion": 3.1
},
{
"id": "f75a3534-f185-427e-9531-18cf18edd2d5",
"name": "Merge results",
"type": "n8n-nodes-base.merge",
"position": [
440,
2320
],
"parameters": {},
"typeVersion": 3.1
},
{
"id": "6de3bbc8-8908-4f28-afdd-7dcfde723f02",
"name": "Result organizer",
"type": "n8n-nodes-base.code",
"position": [
640,
2320
],
"parameters": {
"jsCode": "// const input = $input.all()\n// // Simple merge\n// const output = {\n// introduction: input[0].json.output,\n// campaign_definition: input[1].json.output,\n// campaign_objectives: input[2].json.output, // combining both\n// current_situation_analysis: input[3].json.output,\n// target_audience_persona: input[4].json.output,\n// key_messaging: input[5].json.output,\n// main_marketing_strategy: input[6].json.output,\n// guerrilla_marketing_tactics: input[7].json.output,\n// channels_and_distribution : input[8].json.output,\n// execution_plan: input[9].json.output,\n// budget_planning: input[10].json.output,\n// monitoring_and_kpis: input[11].json.output,\n// risk_management: input[12].json.output,\n// dos_and_donts: input[13].json.output,\n// fina_todo_list: input[14].json.output,\n// post_campaign_activities: input[15].json.output,\n// };\n\n// return {\n// \"raw_output\": output,\n// \"text\" : `# Introduction\\n${output.introduction}\\n\\n\n// # Campaign Definition\\n${output.campaign_definition}\\n\\n\n// # Campaign Objectives\\n${output.campaign_objectives}\\n\\n\n// # Current Situation Analysis\\n${output.current_situation_analysis}\\n\\n\n// # Target Audience Persona\\n${output.target_audience_persona}\\n\\n\n// # Key Messaging\\n${output.key_messaging}\\n\\n\n// # Main Marketing Strategy\\n${output.main_marketing_strategy}\\n\\n\n// # guerrilla Marketing Tactics\\n${output.guerrilla_marketing_tactics}\\n\\n\n// # Channels and Distribution\\n${output.channels_and_distribution}\\n\\n\n// # Execution Plan\\n${output.execution_plan}\\n\\n\n// # Budget Planning\\n${output.budget_planning}\\n\\n\n// # Monitoring and KPIs\\n${output.monitoring_and_kpis}\\n\\n\n// # Risk Management\\n${output.risk_management}\\n\\n\n// # Dos and Don'ts\\n${output.dos_and_donts}\\n\\n\n// # Final To-Do List\\n${output.fina_todo_list}\\n\\n\n// # Post Campaign Activities\\n${output.post_campaign_activities}\\n\\n`\n// }\n\n\n\n\n\nconst input = $input.all();\n\nfunction decode(str) {\n try {\n return JSON.parse(`\"${str}\"`);\n } catch (e) {\n return str;\n }\n}\n\nfunction fixNewLines(str) {\n return decode(str).replace(/\\\\n/g, `\n `);\n}\n\nconst sections = [\n { title: \"Introduction\", content: fixNewLines(input[0].json.output) },\n { title: \"Campaign Definition\", content: fixNewLines(input[1].json.output) },\n { title: \"Campaign Objectives\", content: fixNewLines(input[2].json.output) },\n { title: \"Current Situation Analysis\", content: fixNewLines(input[3].json.output) },\n { title: \"Target Audience Persona\", content: fixNewLines(input[4].json.output) },\n { title: \"Key Messaging\", content: fixNewLines(input[5].json.output) },\n { title: \"Main Marketing Strategy\", content: fixNewLines(input[6].json.output) },\n { title: \"guerrilla Marketing Tactics\", content: fixNewLines(input[7].json.output) },\n { title: \"Channels and Distribution\", content: fixNewLines(input[8].json.output) },\n { title: \"Execution Plan\", content: fixNewLines(input[9].json.output) },\n { title: \"Budget Planning\", content: fixNewLines(input[10].json.output) },\n { title: \"Monitoring and KPIs\", content: fixNewLines(input[11].json.output) },\n { title: \"Risk Management\", content: fixNewLines(input[12].json.output) },\n { title: \"Dos and Don'ts\", content: fixNewLines(input[13].json.output) },\n { title: \"Final To-Do List\", content: fixNewLines(input[14].json.output) },\n { title: \"Post Campaign Activities\", content: fixNewLines(input[15].json.output) }\n];\n\nlet text = \"\";\n\nsections.forEach(section => {\n text += `# ${section.title}\n${section.content}\n\n`;\n});\n\nreturn {\n raw_output: sections,\n text: text\n};"
},
"typeVersion": 2
},
{
"id": "31e1e0a0-ad77-4f7a-ba29-ee0d0dc95dba",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-5340,
1000
],
"parameters": {
"width": 2400,
"height": 2180,
"content": "## Swarm Intelligence (Mission : Critical campaign generator)\n\nThis part includes two AI agents: one generates an idea, and the other critiques it and provides an opinion. If the idea isn\u2019t suitable, instead of initiating a feedback loop for improvement, the second agent asks for a new idea."
},
"typeVersion": 1
},
{
"id": "43ff5d3b-9f8a-47e8-9a0a-1f8fc75f49da",
"name": "Idea is good enough?",
"type": "n8n-nodes-base.if",
"position": [
-3780,
2040
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "f0c32b9c-56f7-4514-865e-cb2a01eb5490",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.output.isItAccepted }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"executeOnce": false,
"typeVersion": 2.2
},
{
"id": "b5b1e48d-5693-4838-932c-71ee4cd0c83c",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-6500,
1700
],
"parameters": {
"color": 4,
"width": 840,
"height": 520,
"content": "## How to Use It\n\nTo get started, open the chat and describe your business. \nThe more specific you are, the better the guerrilla marketing campaign plan will be.\n\nIt\u2019s a good idea to include details like your **available budget** and any other relevant information.\n\nThis template introduces a new feature called **Swarm Intelligence**, where multiple agents collaborate in a loop to generate the most effective response.\n\nIf you already have a specific idea and don\u2019t need brainstorming, you can **disable the Swarm Intelligence** part and use only the remaining nodes.\n\nIf you have any questions, feel free to email me at: \n**sinamirshafiee@gmail.com**\n\n\n**Note:** \nThis is version **0.1.0**, so please keep in mind that there may still be some bugs. \nI'd love to hear your feedback, just drop me a message at **sinamirshafiee@gmail.com**!"
},
"typeVersion": 1
},
{
"id": "b29ecbae-ebe8-42c4-b76b-13ab0dabbe9d",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-4120,
4780
],
"parameters": {
"color": 7,
"width": 1100,
"height": 140,
"content": "## LLM is changeable\nYou can change the LLM to others like Ollama, it is better to use Reasonable models if you keep **Swarm Intelligence** active."
},
"typeVersion": 1
},
{
"id": "9a16f079-b6a5-4844-947b-5a8ee1ab145e",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-360,
1100
],
"parameters": {
"color": 7,
"width": 940,
"height": 2600,
"content": "## Merging all outputs\n"
},
"typeVersion": 1
},
{
"id": "8589c4cf-d064-4140-972b-c4891b35c5f5",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1820,
-100
],
"parameters": {
"color": 5,
"width": 760,
"height": 4460,
"content": "## Writing Individual Chapters\n\nEach node represents an agent that is highly skilled in its specific area of expertise. \nIt generates the content for its assigned section based on the provided idea."
},
"typeVersion": 1
},
{
"id": "7d58d91b-11b6-40b4-89a8-e0340c36f6f3",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
1800
],
"parameters": {
"width": 560,
"height": 720,
"content": "## End of Process\n\nAfter completing all the steps, click on this node to download the final result file.\n\nIf you have any further questions, feel free to contact me: \n\ud83d\udce7 **sinamirshafiee@gmail.com**"
},
"typeVersion": 1
},
{
"id": "6d488e0c-08fb-4072-b4bb-9070c43da16f",
"name": "Final result",
"type": "n8n-nodes-base.convertToFile",
"position": [
860,
2320
],
"parameters": {
"options": {
"fileName": "marketing_plan.md"
},
"operation": "toText",
"sourceProperty": "text"
},
"typeVersion": 1.1
}
],
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "94640b98-e316-4740-a952-2905bd792eea",
"connections": {
"Input Parser": {
"main": [
[
{
"node": "Idea Generator",
"type": "main",
"index": 0
}
]
]
},
"Merge results": {
"main": [
[
{
"node": "Result organizer",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Introduction Writer",
"type": "ai_memory",
"index": 0
},
{
"node": "Campaign Definition Agent",
"type": "ai_memory",
"index": 0
},
{
"node": "Current Situation Analyst",
"type": "ai_memory",
"index": 0
},
{
"node": "Target Persona Researcher",
"type": "ai_memory",
"index": 0
},
{
"node": "Key Messaging Specialist",
"type": "ai_memory",
"index": 0
},
{
"node": "Campaign Objectives Specialist",
"type": "ai_memory",
"index": 0
},
{
"node": "Main Strategy Architect",
"type": "ai_memory",
"index": 0
},
{
"node": "guerrilla Tactics Designer",
"type": "ai_memory",
"index": 0
},
{
"node": "Channel Strategy Expert",
"type": "ai_memory",
"index": 0
},
{
"node": "Execution Planner",
"type": "ai_memory",
"index": 0
},
{
"node": "Budget Planning Specialist",
"type": "ai_memory",
"index": 0
},
{
"node": "Monitoring and KPIs Expert",
"type": "ai_memory",
"index": 0
},
{
"node": "Risk Management Expert",
"type": "ai_memory",
"index": 0
},
{
"node": "Do's and Don'ts Advisor",
"type": "ai_memory",
"index": 0
},
{
"node": "Final To-Do List Creator",
"type": "ai_memory",
"index": 0
},
{
"node": "Post-Campaign Analyst",
"type": "ai_memory",
"index": 0
}
]
]
},
"Idea Generator": {
"main": [
[
{
"node": "Market Analyst",
"type": "main",
"index": 0
},
{
"node": "Merge failed results",
"type": "main",
"index": 0
},
{
"node": "Merge successful result",
"type": "main",
"index": 0
}
]
]
},
"Market Analyst": {
"main": [
[
{
"node": "Information Extractor",
"type": "main",
"index": 0
},
{
"node": "Merge failed results",
"type": "main",
"index": 1
},
{
"node": "Merge successful result",
"type": "main",
"index": 1
}
]
]
},
"Combine outputs": {
"main": [
[
{
"node": "Introduction Writer",
"type": "main",
"index": 0
},
{
"node": "Campaign Definition Agent",
"type": "main",
"index": 0
},
{
"node": "Campaign Objectives Specialist",
"type": "main",
"index": 0
},
{
"node": "Current Situation Analyst",
"type": "main",
"index": 0
},
{
"node": "Target Persona Researcher",
"type": "main",
"index": 0
},
{
"node": "Key Messaging Specialist",
"type": "main",
"index": 0
},
{
"node": "Main Strategy Architect",
"type": "main",
"index": 0
},
{
"node": "guerrilla Tactics Designer",
"type": "main",
"index": 0
},
{
"node": "Channel Strategy Expert",
"type": "main",
"index": 0
},
{
"node": "Execution Planner",
"type": "main",
"index": 0
},
{
"node": "Budget Planning Specialist",
"type": "main",
"index": 0
},
{
"node": "Monitoring and KPIs Expert",
"type": "main",
"index": 0
},
{
"node": "Risk Management Expert",
"type": "main",
"index": 0
},
{
"node": "Do's and Don'ts Advisor",
"type": "main",
"index": 0
},
{
"node": "Final To-Do List Creator",
"type": "main",
"index": 0
},
{
"node": "Post-Campaign Analyst",
"type": "main",
"index": 0
}
]
]
},
"combine outputs": {
"main": [
[
{
"node": "Idea Generator",
"type": "main",
"index": 0
}
]
]
},
"Result organizer": {
"main": [
[
{
"node": "Final result",
"type": "main",
"index": 0
}
]
]
},
"Execution Planner": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 9
}
]
]
},
"Merge results 1/2": {
"main": [
[
{
"node": "Merge results",
"type": "main",
"index": 0
}
]
]
},
"Merge results 2/2": {
"main": [
[
{
"node": "Merge results",
"type": "main",
"index": 1
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Idea Generator",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Market Analyst",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Information Extractor",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Post-Campaign Analyst",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Final To-Do List Creator",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Do's and Don'ts Advisor",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Risk Management Expert",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Monitoring and KPIs Expert",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Budget Planning Specialist",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Execution Planner",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Channel Strategy Expert",
"type": "ai_languageModel",
"index": 0
},
{
"node": "guerrilla Tactics Designer",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Main Strategy Architect",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Key Messaging Specialist",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Target Persona Researcher",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Current Situation Analyst",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Campaign Objectives Specialist",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Campaign Definition Agent",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Introduction Writer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Introduction Writer": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 0
}
]
]
},
"Idea is good enough?": {
"main": [
[
{
"node": "Merge successful result",
"type": "main",
"index": 2
}
],
[
{
"node": "Merge failed results",
"type": "main",
"index": 2
}
]
]
},
"Merge failed results": {
"main": [
[
{
"node": "combine outputs",
"type": "main",
"index": 0
}
]
]
},
"Information Extractor": {
"main": [
[
{
"node": "Idea is good enough?",
"type": "main",
"index": 0
}
]
]
},
"Post-Campaign Analyst": {
"main": [
[
{
"node": "Merge results 2/2",
"type": "main",
"index": 5
}
]
]
},
"Risk Management Expert": {
"main": [
[
{
"node": "Merge results 2/2",
"type": "main",
"index": 2
}
]
]
},
"Channel Strategy Expert": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 8
}
]
]
},
"Do's and Don'ts Advisor": {
"main": [
[
{
"node": "Merge results 2/2",
"type": "main",
"index": 3
}
]
]
},
"Main Strategy Architect": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 6
}
]
]
},
"Merge successful result": {
"main": [
[
{
"node": "Combine outputs",
"type": "main",
"index": 0
}
]
]
},
"Final To-Do List Creator": {
"main": [
[
{
"node": "Merge results 2/2",
"type": "main",
"index": 4
}
]
]
},
"Key Messaging Specialist": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 5
}
]
]
},
"Campaign Definition Agent": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 1
}
]
]
},
"Current Situation Analyst": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 3
}
]
]
},
"Target Persona Researcher": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 4
}
]
]
},
"Budget Planning Specialist": {
"main": [
[
{
"node": "Merge results 2/2",
"type": "main",
"index": 0
}
]
]
},
"Monitoring and KPIs Expert": {
"main": [
[
{
"node": "Merge results 2/2",
"type": "main",
"index": 1
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Input Parser",
"type": "main",
"index": 0
}
]
]
},
"guerrilla Tactics Designer": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 7
}
]
]
},
"Campaign Objectives Specialist": {
"main": [
[
{
"node": "Merge results 1/2",
"type": "main",
"index": 2
}
]
]
}
}
}
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
🧠 Who is this for? Startup founders designing creative growth strategies Marketing teams seeking low-cost, high-impact campaigns Consultants and agencies needing fast guerrilla plans Creators exploring AI-powered content and campaigns
Source: https://n8n.io/workflows/4553/ — 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.
This workflow implements an advanced AI-powered system for generating, and executing Claude Skills stored on GitHub.
Http Executeworkflow. Uses stickyNote, chatTrigger, lmChatOpenAi, memoryBufferWindow. Chat trigger; 18 nodes.
Use n8n to bring data from any API to your AI. This workflow uses the Chat Trigger to provide the chat interface, and the Custom n8n Workflow Tool to call a second workflow that calls the API.
Expense Tracker. Uses chatTrigger, agent, lmChatOpenAi, memoryBufferWindow. Chat trigger; 12 nodes.
AI agent: expense tracker in Google Sheets and n8n chat. Uses agent, chatTrigger, executeWorkflowTrigger, lmChatOpenAi. Chat trigger; 10 nodes.