__NUXT_JSONP__("/workflows/2457-multi-agent-pdf-to-blog-content-generation", (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT,bU,bV,bW,bX,bY,bZ,b_,b$,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,cA,cB,cC,cD,cE,cF,cG,cH,cI,cJ,cK,cL,cM,cN,cO,cP,cQ,cR,cS,cT,cU,cV,cW,cX,cY,cZ,c_,c$,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,do0,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,dA,dB,dC,dD,dE,dF,dG,dH,dI,dJ,dK,dL,dM,dN,dO,dP,dQ,dR,dS,dT,dU,dV,dW,dX,dY,dZ,d_,d$,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,eq,er,es,et,eu,ev,ew,ex,ey,ez,eA,eB,eC,eD,eE,eF,eG,eH,eI,eJ,eK,eL,eM,eN,eO,eP,eQ,eR,eS,eT,eU,eV,eW,eX,eY,eZ,e_,e$,fa,fb){cw.data=[];return {data:[{additionalNodes:[],canonical:"2457-multi-agent-pdf-to-blog-content-generation",workflow:{id:ca,workflow:{meta:{instanceId:"2723a3a635131edfcb16103f3d4dbaadf3658e386b4762989cbf49528dccbdbd",templateId:"2187"},nodes:[{id:"bde7b7db-45c6-4ab3-a705-358000cefbec",name:aT,type:u,position:[2280,k],parameters:{mode:N,options:{},combinationMode:_},typeVersion:z},{id:"0079022b-eaa2-481b-8c78-f8623a63645b",name:cb,type:$,position:[cc,k],parameters:{jsCode:"let article = \"\";\n\n\u002F\u002F Introduction\narticle += $('Project Planner').first().json.message.content.introduction;\n\nfor (const item of $input.all()) {\n  article += \"\u003Cstrong\u003E\" + item.json.title + \"\u003C\u002Fstrong\u003E\";\n  article += item.json.output;\n  article += \"\u003Cbr\u003E\";\n}\n\n\u002F\u002F Conclusions\narticle += \"\u003Cstrong\u003E Conclusions \u003C\u002Fstrong\u003E\";\narticle += $('Project Planner').first().json.message.content.conclusions;\n\n\nreturn [\n  {\n    \"article\": article\n  }\n];"},typeVersion:b},{id:"2e1c004d-43a5-4b87-9e30-beb2f22d4683",name:aU,type:cd,position:[ap,k],webhookId:ce,parameters:{path:ce,options:{},formTitle:"PDF",formFields:{values:[{fieldType:"dropdown",fieldLabel:"Tone",fieldOptions:{values:[{option:"Professional"},{option:"Causal"},{option:"Witty"}]},requiredField:d},{fieldLabel:"Number of words",placeholder:"1000",requiredField:d},{fieldLabel:"Number of sections",placeholder:aV,requiredField:d},{fieldType:h,fieldLabel:cf,multipleFiles:g,requiredField:d}]}},typeVersion:z},{id:"2246ffe9-868f-4680-9770-3bb5c8e4b2f8",name:aq,type:cg,position:[v,k],parameters:{options:{},operation:"pdf",binaryPropertyName:cf},typeVersion:b},{id:"a883d54a-13fd-49bd-becf-7abdae21cd6c",name:ch,type:q,position:[3040,aa],parameters:{model:O,options:{}},credentials:{openAiApi:{id:ar,name:as}},typeVersion:b},{id:"ef57acff-30d4-4493-bfd1-486314bd0a53",name:at,type:ci,position:[3560,k],parameters:{title:cj,source:"adminApi",content:"={{ $('Editor').item.json.output }}",operation:"create",additionalFields:{}},credentials:{ghostAdminApi:{id:"wNSKsDefI9uoXwhs",name:"Ghost Admin account"}},typeVersion:b},{id:"479f474a-1687-4588-8485-d793afc6757d",name:ck,type:P,position:[cl,k],parameters:{options:{},fieldToSplitOut:"message.content.chapters"},typeVersion:b},{id:"1ba1b58e-4101-4348-b0f0-a0a92b1f4806",name:aW,type:A,position:[2760,k],parameters:{text:"=Article to edit:\n {{ $json.article }}\n\nProvide polished output in html format. ",agent:aX,options:{systemMessage:"=You are an expert Editor specializing in refining and polishing content to ensure it meets the highest quality standards. Your role is to review and improve the written material produced by the Writer. Your task is to provide an highly polished article. \n\nInstructions:\n1. Carefully read the entire content piece.\n2. Check for grammar, spelling, and punctuation errors.\n3. Ensure consistency in tone, style, and voice throughout the piece.\n4. Verify that the content aligns with the original brief and project requirements.\n5. Improve sentence structure and flow for better readability.\n6. Fact-check and verify the accuracy of information and citations.\n7. Optimize headlines, subheadings, and formatting for better engagement.\n8. Suggest improvements or additions to enhance the overall quality of the content.\n\n"},promptType:au},typeVersion:av},{id:"789c210d-6841-4c50-9057-e5fd114c0d77",name:aY,type:aw,position:[3240,k],parameters:{text:"=Suggest an engaging title based on the following article.  Please use plain text, no formating of any kind.\n {{ $json.output }}",promptType:au},typeVersion:1.4},{id:"d368ebec-3fdd-45a5-ae47-d252abd3b351",name:l,type:q,position:[aZ,aa],parameters:{model:O,options:{}},credentials:{openAiApi:{id:ar,name:as}},typeVersion:b},{id:"040789b8-cedf-42ed-bce7-175e7ca61caa",name:a_,type:A,position:[a$,k],parameters:{text:cj,agent:aX,options:{systemMessage:"You are a Content Analyst specialized in document analysis and content structuring. Your task is to analyze a given document and create a comprehensive table of contents that can serve as the basis for a blog post. Follow these steps:\n\n1. Carefully read and understand the entire document provided.\n\n2. Identify the main topic or theme of the document.\n\n3. Recognize the key points, arguments, or sections within the document.\n\n4. Organize these key elements into a logical and hierarchical structure.\n\n5. Create a table of contents with main sections and subsections that accurately reflect the document's content and flow.\n\n6. Ensure that the table of contents is suitable for a blog post format, with clear and engaging headings.\n\n7. Include a brief introduction at the beginning of the table of contents to summarize the main topic.\n\n8. Add a conclusion section at the end to wrap up the key points.\n\nPlease format your response as follows:\n\nDocument Topic: [Brief statement of the main topic]\n\nTable of Contents:\n\nI. Introduction\n   A. [Subtopic]\n   B. [Subtopic]\n\nII. [Main Section 1]\n    A. [Subtopic]\n    B. [Subtopic]\n    C. [Subtopic]\n\nIII. [Main Section 2]\n     A. [Subtopic]\n     B. [Subtopic]\n\n[Continue with additional main sections as needed]\n\nX. Conclusion\n   A. [Summary of key points]\n   B. [Final thoughts or call to action]"},promptType:au},typeVersion:av},{id:"608860bf-f372-415e-a7f0-5708ba22ac2a",name:cm,type:cn,position:[ax,k],parameters:{modelId:{__rl:d,mode:Q,value:O,cachedResultName:"GPT-4O-MINI"},options:{maxTokens:2048},messages:{values:[{content:"=Write the title, the subtitle, the chapters details, the introduction, the conclusions, and an image prompt for a SEO-friendly article.  \n\nPlease use this set of topics to create chapters:\n{{ $json.output }}\n\n\nInstructions:\n- Place the article title in a JSON field called `title`\n- Place the subtitle in a JSON field called `subtitle`\n- Place the introduction in a JSON field called `introduction`\n- In the introduction introduce the topic that is then explored in depth in the rest of the text\n- The introduction should be around 100 words\n- Place the conclusions in a JSON field called `conclusions`\n- The conclusions should be around 100 words\n- Use the conclusions to sum all said in the article and offer a conclusion to the reader\n- The image prompt will be used to produce a photographic cover image for the article and should depict the topics discussed in the article\n- Place the image prompt in a JSON field called `imagePrompt`\n- There should be {{ $('n8n Form Trigger').item.json['Number of sections'].toString() }} chapters.\n- For each chapter provide a title and an exaustive prompt that will be used to write the chapter text.\n- Place the chapters in an array field called `chapters`\n- For each chapter provide the fields `title` and `prompt`\n- The chapters should follow a logical flow and not repeat the same concepts.\n- The chapters should be one related to the other and not isolated blocks of text. The text should be fluent and folow a linear logic.\n- Don't start the chapters with \"Chapter 1\", \"Chapter 2\", \"Chapter 3\"... just write the title of the chapter\n- For the title and the capthers' titles don't use colons (`:`)\n- For the text, use html format\n- Please write in a style that is {{ $('n8n Form Trigger').item.json.Tone }}\n- Go deep in the topic you treat, don't just throw some superficial info\n\n\nPlease use this text as the source for all the information needed to create the chapter:\n{{ $('Extract from File').item.json.text }}"}]},jsonOutput:d},credentials:{openAiApi:{id:ar,name:as}},typeVersion:b},{id:"80b7a065-dc27-4109-b012-be7438ced628",name:o,type:j,position:[co,R],parameters:{color:B,width:524.2843893435219,height:cp,content:"## Extract PDF and analyze content ⛏️\n"},typeVersion:b},{id:"03cc812a-d7eb-498f-8f90-821d55607f26",name:"OpenAI Chat Model2",type:q,position:[cq,aa],parameters:{model:O,options:{}},credentials:{openAiApi:{id:ar,name:as}},typeVersion:b},{id:"ef96ee94-1499-43b1-baee-fb40e41818d9",name:ab,type:j,position:[1120,R],parameters:{color:B,width:576.6288165877254,height:cp,content:"## Plan the work and Delegate to writers 📅\n"},typeVersion:b},{id:"adf103db-d4df-47f5-938e-43e4a3a87411",name:ay,type:j,position:[ba,R],parameters:{color:B,width:648.8280265797307,height:427.13707697042037,content:"## Team of writers working on each chapter ✍️"},typeVersion:b},{id:"2e33d24b-128c-47f0-adda-024191091db2",name:az,type:j,position:[2500,R],parameters:{color:B,width:650.6330068295307,height:cr,content:"## Editor polishing draft 📝 "},typeVersion:b},{id:"48e313af-df5b-4887-8fa1-92d6de58d596",name:cs,type:j,position:[3200,R],parameters:{color:B,width:542.3341918415219,height:cr,content:"## Publish to Ghost 📰"},typeVersion:b},{id:"e43a0a0e-e791-4295-b7b7-d53bc87f04ec",name:bb,type:A,position:[1860,k],parameters:{text:"=Write a chapter for the article: {{ $('Project Planner').item.json.message.content.title }}, {{ $('Project Planner').item.json.message.content.subtitle }}\n\nWrite the chapter titled {{ $json.title }}that {{ $json.prompt }}.\n\nDocument text as source of information to use to write the chapter:\n{{ $('Extract from File').item.json.text }}",agent:aX,options:{systemMessage:"=You are a skilled writer specializing in creating engaging and informative content. Your task is to write a chapter in the blog.\n\nGuidelines:\n- Just return the plain text for each chapter (no JSON structure).\n- Use html format for output\n- Don't add internal titles or headings.\n- The length of each chapther should be around {{ Math.round($('n8n Form Trigger').item.json['Number of words'] - 120)\u002F $('n8n Form Trigger').item.json['Number of sections']}} words long- Go deep in the topic you treat, don't just throw some superficial info\n{{ $itemIndex \u003E 0 ? \"- The previous chapter talks about \" + $input.all()[$itemIndex-1].json.title : \"\" }}\n{{ $itemIndex \u003E 0 ? \"- The promt for the previous chapter is \" + $input.all()[$itemIndex-1].json.prompt : \"\" }}\n{{ $itemIndex \u003C $input.all().length ? \"- The following chapter will talk about \" + $input.all()[$itemIndex+1].json.title: \"\" }}\n{{ $itemIndex \u003C $input.all().length ? \"- The prompt for the following chapter is \" + $input.all()[$itemIndex+1].json.prompt : \"\" }}\n- Consider the previous and following chapters what writing the text for this chapter. The text must be coherent with the previous and following chapters.\n- This chapter should not repeat the concepts already exposed in the previous chapter.\n- This chapter is a part of a larger article so don't include an introduction or conclusions. This chapter should merge with the rest of the article.\n- Please write in a style that is {{ $('n8n Form Trigger').item.json.Tone }}\n"},promptType:au},retryOnFail:d,typeVersion:av},{id:"8db1e8bb-4b50-46f3-be08-1abecbf1b2b0",name:ct,type:j,position:[-320,R],parameters:{color:B,width:474.9059883840442,height:428.1315182833339,content:"## Start here: Step-by Step Youtube Tutorial :star:\n\n[![Building an AI Crew to Analyze Financial Data with CrewAI and n8n](https:\u002F\u002Fimg.youtube.com\u002Fvi\u002F4aKZrct0lzA\u002Fsddefault.jpg)](https:\u002F\u002Fyoutu.be\u002F4aKZrct0lzA)\n"},typeVersion:b}],pinData:{},connections:{Editor:{main:[[{node:aY,type:c,index:a}]]},Writers:{main:[[{node:aT,type:c,index:a}]]},"Create title":{main:[[{node:at,type:c,index:a}]]},"Content Analyst":{main:[[{node:cm,type:c,index:a}]]},"Project Planner":{main:[[{node:ck,type:c,index:a}]]},"n8n Form Trigger":{main:[[{node:aq,type:c,index:a}]]},"Extract from File":{main:[[{node:a_,type:c,index:a}]]},"OpenAI Chat Model":{ai_languageModel:[[{node:a_,type:C,index:a}]]},"Final article text":{main:[[{node:aW,type:c,index:a}]]},"OpenAI Chat Model1":{ai_languageModel:[[{node:aW,type:C,index:a},{node:aY,type:C,index:a}]]},"OpenAI Chat Model2":{ai_languageModel:[[{node:bb,type:C,index:a}]]},"Delegate to Writers":{main:[[{node:aT,type:c,index:b},{node:bb,type:c,index:a}]]},"Merge chapters title and text":{main:[[{node:cb,type:c,index:a}]]}}},name:cu,description:cv,categories:{data:[{id:S,attributes:{name:w,slug:T}},{id:aA,attributes:{name:G,slug:aB}}]},image:cw,createdAt:"2024-10-09T03:22:17.862Z",updatedAt:"2024-10-09T11:23:23.050Z",username:cx,verified:d,views:6228,recentViews:155,price:e,purchaseUrl:e,nodes:{data:[{id:aC,attributes:{displayName:m,name:u,iconData:{type:h,fileBuffer:f,fileName:aD},defaults:{name:m}},url:"merge"},{id:"420",attributes:{displayName:at,name:ci,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002Fghost.svg"},defaults:{name:at}},url:"ghost"},{id:aE,attributes:{displayName:o,name:j,iconData:{icon:ac,type:i},defaults:{name:o,color:aF}},url:ac},{id:cy,attributes:{displayName:aG,name:$,iconData:{type:h,fileBuffer:f,fileName:cz},defaults:{name:aG}},url:cA},{id:bc,attributes:{displayName:r,name:A,iconData:{icon:bd,type:i},defaults:{name:r,color:be}},url:"agent"},{id:cB,attributes:{displayName:D,name:aw,iconData:{icon:bf,type:i},defaults:{name:D,color:H}},url:"basic-llm-chain"},{id:ad,attributes:{displayName:l,name:q,iconData:{type:h,fileBuffer:f,fileName:ae},defaults:{name:l}},url:"openai-chat-model"},{id:"1225",attributes:{displayName:aU,name:cd,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002FformTrigger.svg"},defaults:{name:aU}},url:"n8n-form-trigger"},{id:"1235",attributes:{displayName:aq,name:cg,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002FextractFromFile.svg"},defaults:{name:aq}},url:"extract-from-file"},{id:bg,attributes:{displayName:E,name:P,iconData:{type:h,fileBuffer:f,fileName:bh},defaults:{name:E}},url:"split-out"},{id:"1250",attributes:{displayName:I,name:cn,iconData:{type:h,fileBuffer:f,fileName:cC},defaults:{name:I}},url:"openai"}]},nonNativeNodes:[]},workflowId:ca,workflowName:cu,content:cv,contentImages:cw,copyText:"The workflow has been copied to your clipboard! You can paste it in n8n and jump start your workflow automation. ",getInTouch:{id:15,text:"Implement complex processes faster with n8n",MarginBottomPX:e,MarginTopPX:e,CustomMargin:e,variant:e,title:e,fontSize:e,customClassName:e,contentPaddingX:e,contentPaddingY:e,content:e,AnchorLink:e,button:{id:88,text:"Get started",url:"https:\u002F\u002Fapp.n8n.cloud\u002Fregister",type:"primary",hasCustomColor:e,customColor:e,textSecond:e,hasGHStars:e,typeformId:e}},creator:{id:91384,name:"Derek Cheung",username:cx,bio:"Derek is an engineer, instructor, and investor based in Canada. He is publicly building AI applications to solve real-world problems, leveraging his technical expertise to develop practical solutions.",verified:d,links:["https:\u002F\u002Ftwitter.com\u002Fderekcheungsa"],partnerKey:"derekcheung6338",avatar:"https:\u002F\u002Fgravatar.com\u002Favatar\u002F1d8dbb30401a76425734d4319abbaa38548b7572064ca080740bbfe60324772a?r=pg&d=retro&size=200",workflowsCount:cD},searchPageConfig:{__typename:"ComponentWorkflowsSearchPageConfig",categoriesAboveTheFold:B,promotedCategories:[w,"SecOps",af,"IT Ops",G,cE,cF],appsAboveTheFold:11,promotedApps:[U,I,cG,aH,cH,cI,bi,cJ,cK,cL,"Microsoft Outlook",bj,"Google Calendar"],defaultUserRole:w,categoriesToRoleMapping:{HR:["HR & Legal"],Other:["Other","other"],Sales:[af,"Sales and Marketing","sales-and-marketing"],"IT Ops":["IT & Support","Data Science","data-science",cF,"devops","IT","it"],SecOps:[cM,"security"],Product:["Product & Design"],Support:["Customer Service","Customer Support","customer-support"],Marketing:[G],AdvancedAI:["AdvancedAI","advancedai"],Engineering:[cE,"engineering"]}},similarWorkflows:[{sectionTitle:"More AI workflow templates",workflows:[{workflowId:bk},{workflowId:bl},{workflowId:bm}]},{sectionTitle:"More Marketing workflow templates",workflows:[{workflowId:bn},{workflowId:bo},{workflowId:bp}]}],_img:{"/_ipx/_/images/nodes/merge.svg":"\u002F_nuxt\u002Fimage\u002Fffc424.svg","/_ipx/_/images/nodes/ghost.svg":"\u002F_nuxt\u002Fimage\u002Fa7a3bb.svg","/_ipx/_/images/nodes/code.svg":"\u002F_nuxt\u002Fimage\u002F8aae21.svg","/_ipx/_/images/icons/verified.svg":"\u002F_nuxt\u002Fimage\u002Fc4683e.svg","/_ipx/_/images/nodes/lmChatOpenAi.svg":"\u002F_nuxt\u002Fimage\u002F6759e0.svg","/_ipx/_/images/nodes/toolSerpApi.svg":"\u002F_nuxt\u002Fimage\u002F747e2c.svg","/_ipx/_/images/nodes/httpRequest.svg":"\u002F_nuxt\u002Fimage\u002Fbfc4c5.svg","/_ipx/_/images/nodes/markdown.svg":"\u002F_nuxt\u002Fimage\u002F652206.svg","/_ipx/_/images/nodes/googleSheets.svg":"\u002F_nuxt\u002Fimage\u002Fd1c460.svg","/_ipx/_/images/nodes/microsoftExcel.svg":"\u002F_nuxt\u002Fimage\u002Ff83032.svg","/_ipx/_/images/nodes/gmail.svg":"\u002F_nuxt\u002Fimage\u002Feaacd8.svg","/_ipx/_/images/img/touch-red.svg":"\u002F_nuxt\u002Fimage\u002Ff76a18.svg","/_ipx/_/images/img/touch-yellow.svg":"\u002F_nuxt\u002Fimage\u002F87e257.svg","/_ipx/_/images/img/touch-red-desktop.png":"\u002F_nuxt\u002Fimage\u002F83b330.png","/_ipx/_/images/img/touch-yellow-desktop.png":"\u002F_nuxt\u002Fimage\u002F1e8ec1.png","/_ipx/s_24x24/https://n8niostorageaccount.blob.core.windows.net/n8nio-strapi-blobs-prod/assets/Twitter_b5797f12f6.svg":"\u002F_nuxt\u002Fimage\u002Fc17c74.svg","/_ipx/s_24x24/https://n8niostorageaccount.blob.core.windows.net/n8nio-strapi-blobs-prod/assets/Github_e5e4b55412.svg":"\u002F_nuxt\u002Fimage\u002Fd02369.svg","/_ipx/s_24x24/https://n8niostorageaccount.blob.core.windows.net/n8nio-strapi-blobs-prod/assets/Discord_b026858c43.svg":"\u002F_nuxt\u002Fimage\u002F0cfe96.svg","/_ipx/s_24x24/https://n8niostorageaccount.blob.core.windows.net/n8nio-strapi-blobs-prod/assets/Linked_In_ac1292d890.svg":"\u002F_nuxt\u002Fimage\u002F1df51a.svg","/_ipx/s_24x24/https://n8niostorageaccount.blob.core.windows.net/n8nio-strapi-blobs-prod/assets/Youtube_4efb02226a.svg":"\u002F_nuxt\u002Fimage\u002Fe17e5b.svg"}}],fetch:{"data-v-63d61a14:0":{prevScrollPos:a,navOpened:g,menuFirstLevels:{Type:"Header",MenuItemComponent:[{MenuItemLabel:"Product",URLSlug:cN,isLinkExternal:g,MenuItemGroup:{isGrouped:g,menu_group:{data:{attributes:{NavGroup:[{GroupTitle:e,Item:[{Label:"Product overview",description:f,URLSlug:cN,isLinkExternal:g},{Label:"Integrations",description:f,URLSlug:"\u002Fintegrations",isLinkExternal:g},{Label:"Templates",description:f,URLSlug:"\u002Fworkflows",isLinkExternal:g},{Label:"Advanced AI",description:e,URLSlug:"\u002Fai",isLinkExternal:g}]}]}}}}},{MenuItemLabel:"Use cases",URLSlug:f,isLinkExternal:g,MenuItemGroup:{isGrouped:d,menu_group:{data:{attributes:{NavGroup:[{GroupTitle:f,Item:[{Label:"Lead automation",description:e,URLSlug:"\u002Fautomate-lead-management",isLinkExternal:g},{Label:"Supercharge your CRM",description:e,URLSlug:"\u002Fsupercharge-your-crm",isLinkExternal:g},{Label:"Limitless integrations",description:e,URLSlug:"\u002Flimitless-integrations",isLinkExternal:g},{Label:"Backend prototyping",description:f,URLSlug:"\u002Fsaas",isLinkExternal:g},{Label:"Save engineering resources",description:f,URLSlug:"\u002Fengineering-resources",isLinkExternal:g},{Label:"Security Operations",description:e,URLSlug:"\u002Fsecops",isLinkExternal:g},{Label:"Embedded automation",description:e,URLSlug:"\u002Fembed",isLinkExternal:g}]}]}}}}},{MenuItemLabel:"Docs",URLSlug:cO,isLinkExternal:d,MenuItemGroup:{isGrouped:d,menu_group:{data:{attributes:{NavGroup:[{GroupTitle:f,Item:[{Label:"Self-host n8n",description:e,URLSlug:"https:\u002F\u002Fdocs.n8n.io\u002Fhosting\u002F",isLinkExternal:d},{Label:"Documentation",description:e,URLSlug:cO,isLinkExternal:d},{Label:"Our license",description:e,URLSlug:"https:\u002F\u002Fdocs.n8n.io\u002Fchoose-n8n\u002Ffaircode-license\u002F",isLinkExternal:d}]}]}}}}},{MenuItemLabel:"Community",URLSlug:f,isLinkExternal:e,MenuItemGroup:{isGrouped:d,menu_group:{data:{attributes:{NavGroup:[{GroupTitle:f,Item:[{Label:"Forum",description:e,URLSlug:"https:\u002F\u002Fcommunity.n8n.io",isLinkExternal:d},{Label:bi,description:e,URLSlug:"https:\u002F\u002Fdiscord.gg\u002FXPKeKXeB7d",isLinkExternal:d},{Label:"Blog",description:e,URLSlug:"https:\u002F\u002Fblog.n8n.io",isLinkExternal:d},{Label:"Contribute",description:e,URLSlug:"https:\u002F\u002Fdocs.n8n.io\u002Fhelp-community\u002Fcontributing\u002F",isLinkExternal:d},{Label:"Experts",description:f,URLSlug:"\u002Fexperts",isLinkExternal:g},{Label:"Support",description:f,URLSlug:"\u002Fsupport",isLinkExternal:g}]}]}}}}},{MenuItemLabel:"Enterprise",URLSlug:"\u002Fenterprise",isLinkExternal:g,MenuItemGroup:e},{MenuItemLabel:"Pricing",URLSlug:"\u002Fpricing",isLinkExternal:g,MenuItemGroup:e}]}},"data-v-1aded750:0":{workflows:[{id:bk,attributes:{id:bk,workflow:{meta:{instanceId:cP},nodes:[{id:"939bb301-5e12-4d5b-9a56-61a61cca5f0d",name:l,type:q,position:[aa,k],parameters:{model:O,options:{}},credentials:{openAiApi:{id:cQ,name:bq}},typeVersion:b},{id:"372777e8-ce90-4dea-befc-ac1b2eb4729f",name:cR,type:cS,position:[780,k],parameters:{},typeVersion:br},{id:"7a8f0ad1-1c00-4043-b3e5-c88521140a1a",name:cT,type:cU,position:[bs,k],parameters:{options:{}},credentials:{serpApi:{id:"aJCKjxx6U3K7ydDe",name:"SerpAPI account"}},typeVersion:b},{id:"a7624108-e3da-4193-a625-887314216b8b",name:bt,type:cV,position:[bu,cW],webhookId:"53c136fe-3e77-4709-a143-fe82746dd8b6",parameters:{options:{}},typeVersion:cX},{id:"6b8b7de8-fe3f-43b5-97ce-a52a9e44eb5e",name:r,type:A,position:[cY,cW],parameters:{options:{}},typeVersion:av}],pinData:{},connections:{SerpAPI:{ai_tool:[[{node:r,type:cZ,index:a}]]},"OpenAI Chat Model":{ai_languageModel:[[{node:r,type:C,index:a}]]},"Window Buffer Memory":{ai_memory:[[{node:r,type:"ai_memory",index:a}]]},"When chat message received":{main:[[{node:r,type:c,index:a}]]}}},name:c_,description:"This workflow employs OpenAI's language models and SerpAPI to create a responsive, intelligent conversational agent. It comes equipped with manual chat triggers and memory buffer capabilities to ensure seamless interactions.\n\nTo use this template, you need to be on n8n version 1.50.0 or later.",categories:{data:[{id:S,attributes:{name:w,slug:T}}]},image:{data:[]},createdAt:"2023-10-03T14:49:21.377Z",updatedAt:"2024-08-06T09:34:52.093Z",username:V,verified:d,views:90793,recentViews:6,price:e,purchaseUrl:e,nodes:{data:[{id:bc,attributes:{displayName:r,name:A,iconData:{icon:bd,type:i},defaults:{name:r,color:be}}},{id:ad,attributes:{displayName:l,name:q,iconData:{type:h,fileBuffer:f,fileName:ae},defaults:{name:l}}},{id:"1163",attributes:{displayName:"Window Buffer Memory (easiest)",name:cS,iconData:{icon:"database",type:i},defaults:{name:cR}}},{id:"1199",attributes:{displayName:"SerpApi (Google Search)",name:cU,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002FtoolSerpApi.svg"},defaults:{name:cT}}},{id:"1247",attributes:{displayName:"Chat Trigger",name:cV,iconData:{icon:c$,type:i},defaults:{name:bt}}}]},nonNativeNodes:[]},userInfo:{id:bv,name:bw,username:V,bio:bx,verified:d,links:[f],partnerKey:f,avatar:by,workflowsCount:bz}},{id:bl,attributes:{id:bl,workflow:{meta:{instanceId:cP},nodes:[{id:"67850bd7-f9f4-4d5b-8c9e-bd1451247ba6",name:bA,type:J,position:[-740,K],parameters:{},typeVersion:b},{id:"0d9133f9-b6d3-4101-95c6-3cd24cdb70c3",name:da,type:s,position:[-520,K],parameters:{url:"http:\u002F\u002Fwww.paulgraham.com\u002Farticles.html",options:{}},typeVersion:ag},{id:"ee634297-a456-4f70-a995-55b02950571e",name:db,type:x,position:[bB,K],parameters:{options:{},operation:aI,dataPropertyName:"=data",extractionValues:{values:[{key:dc,attribute:"href",cssSelector:"table table a",returnArray:d,returnValue:dd}]}},typeVersion:b},{id:"83d75693-dbb8-44c4-8533-da06f611c59c",name:de,type:s,position:[bu,K],parameters:{url:"=http:\u002F\u002Fwww.paulgraham.com\u002F{{ $json.essay }}",options:{}},typeVersion:ag},{id:"151022b5-8570-4176-bf3f-137f27ac7036",name:df,type:x,position:[dg,dg],parameters:{options:{},operation:aI,extractionValues:{values:[{key:L,cssSelector:L}]}},typeVersion:b},{id:"07bcf095-3c4d-4a72-9bcb-341411750ff5",name:dh,type:p,position:[di,aJ],parameters:{fields:{values:[{name:L,stringValue:"={{ $json.title }}"},{name:"summary",stringValue:"={{ $json.response.text }}"},{name:bC,stringValue:"=http:\u002F\u002Fwww.paulgraham.com\u002F{{ $('Limit to first 3').item.json.essay }}"}]},include:"none",options:{}},typeVersion:M},{id:"11285de0-3c5d-4296-a322-9b7585af9acc",name:o,type:j,position:[-580,bs],parameters:{width:1071.752021563343,height:285.66037735849045,content:"## Scrape latest Paul Graham essays"},typeVersion:b},{id:"c32f905d-dd7a-4b68-bbe0-dd8115ee0944",name:ab,type:j,position:[620,bs],parameters:{width:465.3908355795153,height:606.7924528301882,content:"## Summarize them with GPT"},typeVersion:b},{id:"29d264f4-df6d-4a41-ab38-58e1b1becc9a",name:dj,type:P,position:[dk,K],parameters:{options:{},fieldToSplitOut:dc},typeVersion:b},{id:"ccfa3a1d-f170-44b4-a1f2-3573c88cae98",name:dl,type:dm,position:[140,K],parameters:{maxItems:M},typeVersion:b},{id:"c3d05068-9d1a-4ef5-8249-e7384dc617ee",name:aK,type:dn,position:[ah,F],parameters:{options:{}},typeVersion:b},{id:"db75adad-cb16-4e72-b16e-34684a733b05",name:bD,type:do0,position:[ah,1340],parameters:{options:{}},typeVersion:b},{id:"022cc091-9b4c-45c2-bc8e-4037ec2d0d60",name:ch,type:q,position:[cY,F],parameters:{model:O,options:{}},credentials:{openAiApi:{id:cQ,name:bq}},typeVersion:b},{id:"cda47bb7-36c5-4d15-a1ef-0c66b1194825",name:m,type:u,position:[ax,aJ],parameters:{mode:N,options:{},combineBy:"combineByPosition"},typeVersion:M},{id:"28144e4c-e425-428d-b3d1-f563bfd4e5b3",name:W,type:dp,position:[dq,K],parameters:{options:{},operationMode:"documentLoader"},typeVersion:bE}],pinData:{},connections:{Merge:{main:[[{node:dh,type:c,index:a}]]},"Extract title":{main:[[{node:m,type:c,index:a}]]},"Fetch essay list":{main:[[{node:db,type:c,index:a}]]},"Limit to first 3":{main:[[{node:de,type:c,index:a}]]},"Fetch essay texts":{main:[[{node:df,type:c,index:a},{node:W,type:c,index:a}]]},"OpenAI Chat Model1":{ai_languageModel:[[{node:W,type:C,index:a}]]},"Default Data Loader":{ai_document:[[{node:W,type:"ai_document",index:a}]]},"Extract essay names":{main:[[{node:dj,type:c,index:a}]]},"Summarization Chain":{main:[[{node:m,type:c,index:b}]]},"Split out into items":{main:[[{node:dl,type:c,index:a}]]},"When clicking \"Execute Workflow\"":{main:[[{node:da,type:c,index:a}]]},"Recursive Character Text Splitter":{ai_textSplitter:[[{node:aK,type:"ai_textSplitter",index:a}]]}}},name:dr,description:"This workflow integrates both web scraping and NLP functionalities. It uses HTML parsing to extract links, HTTP requests to fetch essay content, and AI-based summarization using GPT-4o. It's an excellent example of an end-to-end automated task that is not only efficient but also provides real value by summarizing valuable content.\n\nNote that to use this template, you need to be on n8n version 1.50.0 or later.",categories:{data:[{id:S,attributes:{name:w,slug:T}}]},image:{data:[]},createdAt:"2023-10-02T18:51:45.300Z",updatedAt:"2024-08-06T09:40:03.365Z",username:V,verified:d,views:56267,recentViews:bF,price:e,purchaseUrl:e,nodes:{data:[{id:ai,attributes:{displayName:n,name:s,iconData:{type:h,fileBuffer:f,fileName:aj},defaults:{name:n,color:ak}}},{id:aC,attributes:{displayName:m,name:u,iconData:{type:h,fileBuffer:f,fileName:aD},defaults:{name:m}}},{id:bG,attributes:{displayName:bH,name:p,iconData:{icon:bI,type:i},defaults:{name:bJ}}},{id:aE,attributes:{displayName:o,name:j,iconData:{icon:ac,type:i},defaults:{name:o,color:aF}}},{id:bK,attributes:{displayName:bL,name:J,iconData:{icon:bM,type:i},defaults:{name:bN,color:H}}},{id:bO,attributes:{displayName:t,name:x,iconData:{type:h,fileBuffer:f,fileName:bP},defaults:{name:t}}},{id:"1121",attributes:{displayName:W,name:dp,iconData:{icon:bf,type:i},defaults:{name:W,color:H}}},{id:ad,attributes:{displayName:l,name:q,iconData:{type:h,fileBuffer:f,fileName:ae},defaults:{name:l}}},{id:"1191",attributes:{displayName:bD,name:do0,iconData:{icon:"grip-lines-vertical",type:i},defaults:{name:bD}}},{id:"1237",attributes:{displayName:ds,name:dm,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002Flimit.svg"},defaults:{name:ds}}},{id:bg,attributes:{displayName:E,name:P,iconData:{type:h,fileBuffer:f,fileName:bh},defaults:{name:E}}},{id:"1243",attributes:{displayName:aK,name:dn,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002FdocumentDefaultDataLoader.svg"},defaults:{name:aK}}}]},nonNativeNodes:[]},userInfo:{id:bv,name:bw,username:V,bio:bx,verified:d,links:[f],partnerKey:f,avatar:by,workflowsCount:bz}},{id:bm,attributes:{id:bm,workflow:{id:"dsKnCFwysROIA4MT",meta:{instanceId:"03524270bab2c2dfd5b82778cd1355e56cdda3cf098bf2dfd865e18164c00485"},name:"Agent with custom HTTP Request",tags:[],nodes:[{id:"e7374976-f3c1-4f60-ae57-9eec65444216",name:"On new manual Chat Message",type:dt,position:[763,du],parameters:{},typeVersion:b},{id:"97e84a23-9536-43cd-94e9-b8166be8ed32",name:l,type:q,position:[dv,dw],parameters:{model:"gpt-4-1106-preview",options:{timeout:300000,temperature:dx,frequencyPenalty:.3}},credentials:{openAiApi:{id:"wPFAzp4ZHdLLwvkK",name:bq}},typeVersion:b},{id:"63d98361-8978-4042-84e7-53a0e226f946",name:n,type:s,onError:"continueRegularOutput",position:[di,F],parameters:{url:"={{ encodeURI($json.query.url) }}",options:{response:{response:{neverError:d}},allowUnauthorizedCerts:d}},typeVersion:ag,alwaysOutputData:g},{id:"17d4b5ae-f5d3-4793-8419-d3c879f7f50d",name:dy,type:p,position:[ba,X],parameters:{fields:{values:[{name:t,stringValue:"={{ $json?.data.match(\u002F\u003Cbody[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Fbody\u003E\u002Fi)[1] }}"}]},include:bQ,options:{},includeFields:t},typeVersion:y},{id:"36c38ee4-724c-4ba2-a59a-ac0bbc912e94",name:dz,type:Y,position:[cl,F],parameters:{conditions:{boolean:[{value1:"={{ $json.hasOwnProperty('error') }}",value2:d}]}},typeVersion:b},{id:"4e4d97ce-14a9-4f4f-aa75-f218784d9ed9",name:dA,type:p,position:[ba,aJ],parameters:{fields:{values:[{name:aL,stringValue:"={{ $('QUERY_PARAMS').first()?.json?.query?.url == null ? \"INVALID action_input. This should be an HTTP query string like this: \\\"?url=VALIDURL&method=SELECTEDMETHOD\\\". Only a simple string value is accepted. JSON object as an action_input is NOT supported!\" : JSON.stringify($json.error) }}"}]},include:bQ,options:{},includeFields:t},typeVersion:y},{id:"8452e5c4-aa29-4a02-9579-8d9da3727bcb",name:bR,type:dB,position:[a$,F],parameters:{},typeVersion:b},{id:"063220c2-fa4d-4d5e-9549-7712aaa72921",name:dC,type:p,position:[dD,X],parameters:{fields:{values:[{name:t,stringValue:"={{ ($json.HTML || \"HTML BODY CONTENT FOR THIS SEARCH RESULT IS NOT AVAILABLE\").replace(\u002F\u003Cscript[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Fscript\u003E|\u003Cstyle[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Fstyle\u003E|\u003Cnoscript[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Fnoscript\u003E|\u003C!--[\\s\\S]*?--\u003E|\u003Ciframe[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Fiframe\u003E|\u003Cobject[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Fobject\u003E|\u003Cembed[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Fembed\u003E|\u003Cvideo[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Fvideo\u003E|\u003Caudio[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Faudio\u003E|\u003Csvg[^\u003E]*\u003E([\\s\\S]*?)\u003C\\\u002Fsvg\u003E\u002Fig, '')}}"}]},options:{}},typeVersion:y},{id:"036511d7-a4be-4bbf-b4bc-47ddfabfe76f",name:dE,type:p,notes:"remove links and image URLs",position:[2360,dF],parameters:{fields:{values:[{name:t,stringValue:"={{ $json.HTML.replace(\u002Fhref\\s*=\\s*\"(.+?)\"\u002Fgi, 'href=\"NOURL\"').replace(\u002Fsrc\\s*=\\s*\"(.+?)\"\u002Fgi, 'src=\"NOIMG\"')}}"}]},options:{}},notesInFlow:d,typeVersion:y},{id:"5e2b5383-adcf-4de0-a406-4f5d631b5e8a",name:dG,type:Y,position:[2180,X],parameters:{conditions:{string:[{value1:"={{ $('CONFIG').first()?.json?.query?.method }}",value2:"simplif",operation:"contains"}]}},typeVersion:b},{id:"a0fc004a-ab0f-4b31-94df-50f5eee69c86",name:dH,type:p,position:[960,F],parameters:{fields:{values:[{name:"query",type:"objectValue",objectValue:"={{ $json.query.substring($json.query.indexOf('?') + 1).split('&').reduce((result, item) =\u003E (result[item.split('=')[0]] = decodeURIComponent(item.split('=')[1]), result), {}) }}"}]},options:{}},typeVersion:y},{id:"3b6599d6-ce9a-4861-9b52-07156eb52539",name:dI,type:p,position:[ax,F],parameters:{fields:{values:[{name:"query.maxlimit",type:dJ,numberValue:"={{ $json?.query?.maxlimit == null ? 70000 : Number($json?.query?.maxlimit) }}"}]},options:{}},typeVersion:y},{id:"14f683be-76f6-4034-9a0e-d785738b135f",name:o,type:j,position:[721,1134],parameters:{width:556.25,height:235.79999999999995,content:"### Convert the query string into JSON, apply the limit for a page length"},typeVersion:b},{id:"6deabcb7-a984-48ec-af2a-8c70b3a4e4bf",name:ab,type:j,position:[dK,840],parameters:{width:491,height:285.7,content:"## Send an error message:\n1. If query param was incorrect, return the instruction. AI Agent should pick up on this and adapt the query on the next iteration.\n2. If the query is OK and an error was during the HTTP Request, then send back the original error message."},typeVersion:b},{id:"df1e8d00-0e18-44fa-8f94-8a53c27f7c88",name:ay,type:j,position:[dK,ax],parameters:{width:F,height:472.5,content:"## Post-processing of the HTML page:\n1. Keep only \u003CBODY\u003E content\n2. Remove inline \u003CSCRIPT\u003E tag entirely, as well as: NOSCRIPT, IFRAME, OBJECT, EMBED, VIDEO, AUDIO, SVG, and HTML comments.\n3. In case query parameter method=simplified, replace all page URLs (a href) and IMG (src) with NOURL \u002F NOIMG - this may save up to 20% of the page length\n4. Convert the remaining HTML to Markdown. This step further reduces the length of the page: long HTML tags and styles are eliminated, but the markdown syntax keeps some page structure. This gives much better results compared to just a blank text.\n5. Finally, check the page length. If it's too long, send an \"ERROR: PAGE CONTENT TOO LONG\" instead of the actual page. Of course, you could split the page content in chunks, but sometimes long pages just don't have a needed content, so it makes little sense to burn tokens on them."},typeVersion:b},{id:"6afe96a0-0fba-4ae1-ab8f-f7da56d420b1",name:az,type:j,position:[dq,v],parameters:{width:616.8597285067872,height:483.0226244343891,content:"## Example ReAct AI Agent\n1. Agent Prompt is default\n2. Check the description of the HTTP_Request_Tool, it guides the agent to provide a query string with several parameters instead of a JSON object"},typeVersion:b},{id:"d5ff2114-1e74-43cf-9f3c-744c241988db",name:aM,type:A,position:[dv,du],parameters:{agent:"reActAgent",options:{prefix:"Answer the following questions as best you can. You have access to the following tools:",suffix:"Begin!\n\n\tQuestion: {input}\n\tThought:{agent_scratchpad}",suffixChat:"Begin! Reminder to always use the exact characters `Final Answer` when responding.",humanMessageTemplate:"{input}\n\n{agent_scratchpad}"}},typeVersion:b},{id:"cc7aef4a-a1fb-4a69-a670-1f200f9e9541",name:bS,type:dL,position:[cc,X],parameters:{html:"={{ $json.HTML }}",options:{},destinationKey:aL},typeVersion:b},{id:"11806e8c-5fc4-4d9d-8144-179356993aa7",name:dM,type:p,position:[2740,X],parameters:{fields:{values:[{name:aL,stringValue:"={{ $json.page_content.length \u003C $('CONFIG').first()?.json?.query?.maxlimit ? $json.page_content : \"ERROR: PAGE CONTENT TOO LONG\" }}"},{name:"page_length",type:dJ,numberValue:"={{ $json.page_content.length }}"}]},include:bQ,options:{}},typeVersion:y},{id:"a3a6b199-517b-4987-8281-d7997a32f54b",name:dN,type:dO,position:[1103,dw],parameters:{name:dN,workflowId:"={{ $workflow.id }}",description:"Call this tool to fetch a webpage content. The input should be a stringified HTTP query parameter like this: \"?url=VALIDURL&method=SELECTEDMETHOD\". \"url\" parameter should contain the valid URL string. \"method\" key can be either \"full\" or \"simplified\". method=full will fetch the whole webpage content in the Markdown format, including page links and image links. method=simplified will return the Markdown content of the page but remove urls and image links from the page content for simplicity. Before calling this tool, think strategically which \"method\" to call. Best of all to use method=simplified. However, if you anticipate that the page request is not final or if you need to extract links from the page, pick method=full.",responsePropertyName:aL},typeVersion:b}],active:g,pinData:{},settings:{executionOrder:bT},versionId:"9db853c5-3658-47c1-b98a-5858b1c184ec",connections:{CONFIG:{main:[[{node:n,type:c,index:a}]]},"Is error?":{main:[[{node:dA,type:c,index:a}],[{node:dy,type:c,index:a}]]},"Simplify?":{main:[[{node:dE,type:c,index:a}],[{node:bS,type:c,index:a}]]},"HTTP Request":{main:[[{node:dz,type:c,index:a}]]},QUERY_PARAMS:{main:[[{node:dI,type:c,index:a}]]},"Simplify output":{main:[[{node:bS,type:c,index:a}]]},HTTP_Request_Tool:{ai_tool:[[{node:aM,type:cZ,index:a}]]},"OpenAI Chat Model":{ai_languageModel:[[{node:aM,type:C,index:a}]]},"Remove extra tags":{main:[[{node:dG,type:c,index:a}]]},"Exctract HTML Body":{main:[[{node:dC,type:c,index:a}]]},"Convert to Markdown":{main:[[{node:dM,type:c,index:a}]]},"Execute Workflow Trigger":{main:[[{node:dH,type:c,index:a}]]},"On new manual Chat Message":{main:[[{node:aM,type:c,index:a}]]}}},name:dP,description:"![n8nReAct.webp](fileId:720)\n\n⚙️🛠️🚀🤖🦾\n\nThis template is a PoC of a ReAct AI Agent capable of fetching random pages (not only Wikipedia or Google search results).\n\nOn the top part there's a manual chat node connected to a LangChain ReAct Agent. The agent has access to a workflow tool for getting page content.\n\nThe page content extraction starts with converting query parameters into a JSON object. There are 3 pre-defined parameters:\n- **url** – an address of the page to fetch\n- **method** = full \u002F simplified\n- **maxlimit** - maximum length for the final page. For longer pages an error message is returned back to the agent\n\nPage content fetching is a multistep process:\n1. An HTTP Request mode tries to get the page content.\n\nIf the page content was successfuly retrieved, a series of post-processing begin:\n\n2. Extract HTML BODY; content\n3. Remove all unnecessary tags to recude the page size\n4. Further eliminate external URLs and IMG scr values (based on the method query parameter)\n5. Remaining HTML is converted to Markdown, thus recuding the page lengh even more while preserving the basic page structure\n6. The remaining content is sent back to an Agent if it's not too long (maxlimit = 70000 by default, see CONFIG node).\n\n*NB:*\n- You can isolate the HTTP Request part into a separate workflow.\n- Check the Workflow Tool description, it guides the agent to provide a query string with several parameters instead of a JSON object.\n\nPlease reach out to [Eduard](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fparsadanyan\u002F) is you need further assistance with you n8n workflows and automations!\n\nNote that to use this template, you need to be on n8n version 1.19.4 or later.\n",categories:{data:[{id:S,attributes:{name:w,slug:T}}]},image:{data:[{id:"720",attributes:{url:"https:\u002F\u002Fn8niostorageaccount.blob.core.windows.net\u002Fn8nio-strapi-blobs-prod\u002Fassets\u002Fn8n_Re_Act_99d612c06e.webp"}}]},createdAt:"2023-12-06T14:45:11.358Z",updatedAt:"2024-07-15T18:13:29.520Z",username:dQ,verified:d,views:37234,recentViews:M,price:e,purchaseUrl:e,nodes:{data:[{id:ai,attributes:{displayName:n,name:s,iconData:{type:h,fileBuffer:f,fileName:aj},defaults:{name:n,color:ak}}},{id:dR,attributes:{displayName:aN,name:Y,iconData:{icon:dS,type:i},defaults:{name:aN,color:dT}}},{id:bG,attributes:{displayName:bH,name:p,iconData:{icon:bI,type:i},defaults:{name:bJ}}},{id:"564",attributes:{displayName:dU,name:dL,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002Fmarkdown.svg"},defaults:{name:dU}}},{id:aE,attributes:{displayName:o,name:j,iconData:{icon:ac,type:i},defaults:{name:o,color:aF}}},{id:"837",attributes:{displayName:bR,name:dB,iconData:{icon:"sign-out-alt",type:i},defaults:{name:bR,color:"#ff6d5a"}}},{id:bc,attributes:{displayName:r,name:A,iconData:{icon:bd,type:i},defaults:{name:r,color:be}}},{id:ad,attributes:{displayName:l,name:q,iconData:{type:h,fileBuffer:f,fileName:ae},defaults:{name:l}}},{id:"1205",attributes:{displayName:dV,name:dO,iconData:{icon:"network-wired",type:i},defaults:{name:dV}}},{id:"1207",attributes:{displayName:"Manual Chat Trigger",name:dt,iconData:{icon:c$,type:i},defaults:{name:bt,color:H}}}]},nonNativeNodes:[]},userInfo:{id:21242,name:"Eduard",username:dQ,bio:f,verified:d,links:["https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fparsadanyan\u002F"],partnerKey:"eduardparsadanyan1449",avatar:"https:\u002F\u002Fgravatar.com\u002Favatar\u002Fa551e67c6fe7affd5f882a527dee154bb6c3ac90cf878326accb3fb3ec77c8a6?r=pg&d=retro&size=200",workflowsCount:16}}]},"data-v-1aded750:1":{workflows:[{id:bn,attributes:{id:bn,workflow:{meta:{instanceId:"f0a68da631efd4ed052a324b63ff90f7a844426af0398a68338f44245d1dd9e5"},nodes:[{id:"04750e9b-6ce3-401b-89e7-f1f17f3a4a28",name:bA,type:J,position:[-180,ap],parameters:{},typeVersion:b},{id:"7a8bb997-5a2d-4ee0-a1ca-bebe9fe32bc2",name:n,type:s,position:[aa,k],parameters:{url:"=https:\u002F\u002Fwww.{{ $node[\"Split In Batches\"].json[\"Domain\"] }}",options:{redirect:{redirect:{followRedirects:d}}}},typeVersion:M,continueOnFail:d},{id:"6409f0c4-bf93-4a1d-a74c-e294fb39895f",name:aO,type:dW,position:[ah,k],parameters:{options:{trimValues:g},extractionValues:{values:[{key:"body",cssSelector:dX}]}},typeVersion:b,continueOnFail:d},{id:"f45fcc6a-9ccd-43c9-9eaf-1797768e1e62",name:I,type:dY,position:[1140,k],parameters:{prompt:"=This is the content of the website {{ $node[\"Split In Batches\"].json[\"Domain\"] }}:\"{{ $json[\"contentShort\"] }}\"\n\nIn a JSON format:\n\n- Give me the value proposition of the company. In less than 25 words. In English. Casual Tone. Format is: \"[Company Name] helps [target audience] [achieve desired outcome] and [additional benefit]\"\n\n- Give me the industry of the company. (Classify using this industry list: [Agriculture, Arts, Construction, Consumer Goods, Education, Entertainment, Finance, Other, Health Care, Legal, Manufacturing, Media & Communications, Public Administration, Advertisements, Real Estate, Recreation & Travel, Retail, Software, Transportation & Logistics, Wellness & Fitness] if it's ambiguous between Sofware and Consumer Goods, prefer Consumer Goods)\n\n- Guess the target audience of each company.(Classify and choose 1 from this list: [sales teams, marketing teams, HR teams, customer Service teams, consumers, C-levels] Write it in lowercase)\n\n- Tell me if they are B2B or B2C\n\nformat should be:\n{\"value_proposition\": value_proposition,\n\"industry\": industry,\n\"target_audience\": target_audience, \n\"market\": market }\n\nJSON:",options:{topP:b,maxTokens:dZ,temperature:a}},credentials:{openAiApi:{id:"67",name:"Lucas Open AI"}},typeVersion:b,continueOnFail:d},{id:"8de6c3d4-316f-4e00-a9f5-a4deefce90b3",name:m,type:u,position:[1600,al],parameters:{mode:N,options:{},combinationMode:_},typeVersion:bE},{id:"669f888e-1416-4291-a854-07ffbbbfcab1",name:d_,type:$,position:[aJ,k],parameters:{mode:d$,jsCode:"if ($input.item.json.body){\n\n\n\n$input.item.json.content = $input.item.json.body.replaceAll('\u002F^\\s+|\\s+$\u002Fg', '').replace('\u002F(\\r\\n|\\n|\\r)\u002Fgm', \"\").replace(\u002F\\s+\u002Fg, ' ')\n\n\n  $input.item.json.contentShort = $input.item.json.content.slice(0, 10000)\n}\n\n\n\n\nreturn $input.item"},executeOnce:g,typeVersion:b,continueOnFail:d,alwaysOutputData:d},{id:"dbd5f866-2f5e-4adf-b1b5-a27b08c0425a",name:ea,type:am,position:[cq,al],parameters:{options:{},fieldsUi:{values:[{column:"Market",fieldValue:"={{ $json[\"market\"] }}"},{column:"Industry",fieldValue:"={{ $json[\"industry\"] }}"},{column:"Value Proposition",fieldValue:"={{ $json[\"value_proposition\"] }}"},{column:"Target Audience",fieldValue:"={{ $json[\"target_audience\"] }}"}]},operation:"update",sheetName:{__rl:d,mode:Q,value:bU,cachedResultUrl:eb,cachedResultName:aP},documentId:{__rl:d,mode:bC,value:ec,__regex:ed},valueToMatchOn:"={{ $json[\"Domain\"] }}",columnToMatchOn:"Domain"},credentials:{googleSheetsOAuth2Api:{id:Z,name:ee}},typeVersion:M},{id:"f8bf8b70-6070-447b-af22-4d4e1ffe3539",name:ef,type:$,position:[1300,k],parameters:{mode:d$,jsCode:"\u002F\u002F Add a new field called 'myNewField' to the\n\u002F\u002F JSON of the item\n$input.item.json.value_proposition=JSON.parse($input.item.json.text).value_proposition\n\n$input.item.json.industry=JSON.parse($input.item.json.text).industry\n\n$input.item.json.market=JSON.parse($input.item.json.text).market\n\n$input.item.json.target_audience=JSON.parse($input.item.json.text).target_audience\n\nreturn $input.item;"},typeVersion:b},{id:"2754c6e1-9cf6-47d4-ad97-0797ec9155df",name:eg,type:am,position:[eh,ap],parameters:{options:{},sheetName:{__rl:d,mode:Q,value:bU,cachedResultUrl:eb,cachedResultName:aP},documentId:{__rl:d,mode:bC,value:ec,__regex:ed}},credentials:{googleSheetsOAuth2Api:{id:Z,name:ee}},typeVersion:M},{id:"c2b93428-0dcc-4c02-bb81-496c12442284",name:bV,type:ei,position:[260,ap],parameters:{options:{}},typeVersion:b},{id:"eccf1dc8-a0bb-40f6-9471-95eac8020b02",name:aQ,type:ej,position:[2060,560],webhookId:"d44bc024-1c21-44e0-b2b4-5cff6fb9f402",parameters:{unit:"seconds"},typeVersion:b}],connections:{Wait:{main:[[{node:bV,type:c,index:a}]]},Merge:{main:[[{node:ea,type:c,index:a}]]},OpenAI:{main:[[{node:ef,type:c,index:a}]]},"Parse JSON":{main:[[{node:m,type:c,index:b}]]},"HTML Extract":{main:[[{node:d_,type:c,index:a}]]},"HTTP Request":{main:[[{node:aO,type:c,index:a}]]},"Clean Content":{main:[[{node:I,type:c,index:a}]]},"Split In Batches":{main:[[{node:n,type:c,index:a},{node:m,type:c,index:a}]]},"Read Google Sheets":{main:[[{node:bV,type:c,index:a}]]},"Update Google Sheets":{main:[[{node:aQ,type:c,index:a}]]},"When clicking \"Execute Workflow\"":{main:[[{node:eg,type:c,index:a}]]}}},name:ek,description:"Enrich your company lists with OpenAI GPT-3 ↓\n\nYou’ll get valuable information such as:\n\n- Market (B2B or B2C)\n- Industry\n- Target Audience\n- Value Proposition\n\nThis will help you to:\n\n- add more personalization to your outreach\n- make informed decisions about which accounts to target\n\nI've made the process easy with an n8n workflow.\n\nHere is what it does:\n\n- Retrieve website URLs from Google Sheets\n- Extract the content for each website\n- Analyze it with GPT-3\n- Update Google Sheets with GPT-3 data",categories:{data:[{id:Z,attributes:{name:af,slug:el}},{id:S,attributes:{name:w,slug:T}},{id:aA,attributes:{name:G,slug:aB}}]},image:{data:[]},createdAt:"2023-01-18T13:09:59.054Z",updatedAt:"2024-07-15T18:14:49.109Z",username:em,verified:d,views:36155,recentViews:b,price:e,purchaseUrl:e,nodes:{data:[{id:en,attributes:{displayName:U,name:am,iconData:{type:h,fileBuffer:f,fileName:eo},defaults:{name:U}}},{id:ai,attributes:{displayName:n,name:s,iconData:{type:h,fileBuffer:f,fileName:aj},defaults:{name:n,color:ak}}},{id:aC,attributes:{displayName:m,name:u,iconData:{type:h,fileBuffer:f,fileName:aD},defaults:{name:m}}},{id:"39",attributes:{displayName:"Loop Over Items (Split in Batches)",name:ei,iconData:{icon:"sync",type:i},defaults:{name:"Loop Over Items",color:"#007755"}}},{id:"114",attributes:{displayName:aO,name:dW,iconData:{icon:"cut",type:i},defaults:{name:aO,color:"#333377"}}},{id:"514",attributes:{displayName:aQ,name:ej,iconData:{icon:"pause-circle",type:i},defaults:{name:aQ,color:"#804050"}}},{id:cy,attributes:{displayName:aG,name:$,iconData:{type:h,fileBuffer:f,fileName:cz},defaults:{name:aG}}},{id:bK,attributes:{displayName:bL,name:J,iconData:{icon:bM,type:i},defaults:{name:bN,color:H}}},{id:"840",attributes:{displayName:I,name:dY,iconData:{type:h,fileBuffer:f,fileName:cC},defaults:{name:I}}}]},nonNativeNodes:[]},userInfo:{id:36027,name:"Lucas Perret",username:em,bio:e,verified:d,links:[],partnerKey:e,avatar:"https:\u002F\u002Fgravatar.com\u002Favatar\u002Fb0a32f127a6ad690cd4ee808cb4d1b59d3b5e53410181d54f91d10c0027ebb43?r=pg&d=retro&size=200",workflowsCount:bF}},{id:bo,attributes:{id:bo,workflow:{id:"swaWgPkq0xW1Jk0o",meta:{instanceId:"615d41e094941c09198b8ce125ed214047535a66e1c0b3e0cb2d688b4f5c9651"},name:ep,tags:[],nodes:[{id:"c3ef40df-084e-435c-9a11-3aa0a2f94f36",name:"When clicking \"Test workflow\"",type:J,position:[380,v],parameters:{},typeVersion:b},{id:"e0583472-a450-4582-83bc-84a014bea543",name:E,type:P,position:[1040,v],parameters:{options:{},fieldToSplitOut:bW},typeVersion:b},{id:"f9cbdb05-c249-4ccb-b3c5-f2eb8861f811",name:eq,type:er,position:[bX,v],parameters:{options:{}},typeVersion:cX},{id:"1ecb45ee-659e-42a9-919d-6a3ebed0b836",name:o,type:j,position:[1620,es],parameters:{height:184.90255200662574,content:"### You need to setup Microsoft Azure credentials with Microsoft Graph permissions."},typeVersion:b},{id:"1d4bcfad-feae-4317-9012-7e03a6203d91",name:ab,type:j,position:[1900,es],parameters:{height:183.1237982918667,content:"### Unlike Google Sheets where we did not need to have a certain format, here we need to create the column headers, otherwise the appending to the sheet won't work."},typeVersion:b},{id:"4248ddb3-11c0-41e3-be81-ce4ec92923ee",name:ay,type:j,position:[2020,aZ],parameters:{height:135.09744799337426,content:"### For these steps to work you will need to have Drive, Sheets and Gmail APIs enabled in your Google Cloud Account"},typeVersion:b},{id:"d17174fe-8015-453a-b439-43eb3245d7cb",name:et,type:x,position:[ah,v],parameters:{options:{},operation:aI,extractionValues:{values:[{key:bW,cssSelector:".row \u003E li",returnArray:d,returnValue:dX}]}},typeVersion:br},{id:"5de66b0a-9138-42e3-857a-3060c71776a9",name:eu,type:ev,position:[X,v],parameters:{options:{},sortFieldsUi:{sortField:[{order:"descending",fieldName:aR}]}},typeVersion:b},{id:"b8c539ce-292c-4b67-83b2-b397cfc5bb97",name:ew,type:x,position:[1260,v],parameters:{options:{},operation:aI,dataPropertyName:bW,extractionValues:{values:[{key:L,attribute:L,cssSelector:"h3 \u003E a",returnValue:dd},{key:aR,cssSelector:".price_color"}]}},typeVersion:br},{id:"b8aa573d-5b63-4669-900f-bcc915b6ad41",name:ex,type:am,position:[bX,a$],parameters:{columns:{value:{},schema:[{id:L,type:ey,display:d,removed:g,required:g,displayName:L,defaultMatch:g,canBeUsedToMatch:d},{id:aR,type:ey,display:d,removed:g,required:g,displayName:aR,defaultMatch:g,canBeUsedToMatch:d}],mappingMode:"autoMapInputData",matchingColumns:[]},options:{},operation:ez,sheetName:{__rl:d,mode:Q,value:bU,cachedResultUrl:"https:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F1zyiRT7iIlfzZiskC9vDVoAFnW_UNMVXX0-ESVU1yYxY\u002Fedit#gid=0",cachedResultName:aP},documentId:{__rl:d,mode:Q,value:"1zyiRT7iIlfzZiskC9vDVoAFnW_UNMVXX0-ESVU1yYxY",cachedResultUrl:"https:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F1zyiRT7iIlfzZiskC9vDVoAFnW_UNMVXX0-ESVU1yYxY\u002Fedit?usp=drivesdk",cachedResultName:"Scraped Data"}},credentials:{googleSheetsOAuth2Api:{id:"MMrGJCEKCWIb8jPE",name:"Google Sheets account"}},typeVersion:4.2},{id:"97bdbc85-84b3-4463-9b98-5d40b80a3a1a",name:eA,type:eB,position:[bX,al],parameters:{options:{},dataMode:"autoMap",resource:"worksheet",workbook:{__rl:d,mode:"id",value:"=EA8A73F11507ECE9!24392"},operation:ez,worksheet:{__rl:d,mode:Q,value:"{00000000-0001-0000-0000-000000000000}",cachedResultName:aP}},credentials:{microsoftExcelOAuth2Api:{id:"oSGTo5qjZHVXYiuB",name:"Microsoft Excel account"}},typeVersion:z},{id:"4078dc06-0497-4579-a6f4-8c314307aab8",name:eC,type:eD,position:[2040,v],parameters:{sendTo:"constact@mihai.ltd",message:"Hey, here's the scraped data from the online bookstore!",options:{attachmentsUi:{attachmentsBinary:[{}]}},subject:"bookstore csv"},credentials:{gmailOAuth2:{id:"18u7JrVfJgM0fhOv",name:"Gmail account"}},typeVersion:z},{id:"8ddca560-8da7-4090-b865-0523f95ca463",name:eE,type:s,position:[600,v],parameters:{url:"http:\u002F\u002Fbooks.toscrape.com",options:{allowUnauthorizedCerts:d}},typeVersion:ag},{id:"450020e6-9f43-4652-be13-25cb5eb3584c",name:az,type:j,position:[bu,aS],parameters:{width:579,height:297,content:"## Automated Web Scraping: email a CSV, save to Google Sheets & Microsoft Excel\n\nSet-up steps:\n1. Change the website to scrape in the \"Fetch website content\" node\n2. Configure Microsoft Azure credentials with Microsoft Graph permissions (required for the Save to Microsoft Excel 365 node)\n3. Configure Google Cloud credentials with access to Google Drive, Google Sheets and Gmail APIs (the latter is required for the Send CSV via e-mail node)."},typeVersion:b}],active:g,pinData:{},settings:{executionOrder:bT},versionId:"27818544-3070-4201-917d-83739ce75339",connections:{"Split Out":{main:[[{node:ew,type:c,index:a}]]},"Sort by price":{main:[[{node:eA,type:c,index:a},{node:eq,type:c,index:a},{node:ex,type:c,index:a}]]},"Convert to CSV File":{main:[[{node:eC,type:c,index:a}]]},"Fetch website content":{main:[[{node:et,type:c,index:a}]]},"Extract individual book price":{main:[[{node:eu,type:c,index:a}]]},"When clicking \"Test workflow\"":{main:[[{node:eE,type:c,index:a}]]},"Extract all books from the page":{main:[[{node:E,type:c,index:a}]]}}},name:ep,description:"How it works:\n* The workflow starts by sending a request to a website to retrieve its HTML content.\n* It then parses the HTML extracting the relevant information\n* The extracted data is storted and converted into a CSV file.\n* The CSV file is attached to an email and sent to your specified address.\n* The data is simultaneously saved to both Google Sheets and Microsoft Excel for further analysis or use.\n\nSet-up steps:\n1. Change the website to scrape in the \"Fetch website content\" node\n2. Configure Microsoft Azure credentials with Microsoft Graph permissions (required for the Save to Microsoft Excel 365 node)\n3. Configure Google Cloud credentials with access to Google Drive, Google Sheets and Gmail APIs (the latter is required for the Send CSV via e-mail node).",categories:{data:[{id:Z,attributes:{name:af,slug:el}},{id:aA,attributes:{name:G,slug:aB}}]},image:{data:[]},createdAt:"2024-05-30T06:45:48.037Z",updatedAt:"2024-05-31T08:11:34.455Z",username:eF,verified:d,views:16377,recentViews:cD,price:e,purchaseUrl:e,nodes:{data:[{id:en,attributes:{displayName:U,name:am,iconData:{type:h,fileBuffer:f,fileName:eo},defaults:{name:U}}},{id:ai,attributes:{displayName:n,name:s,iconData:{type:h,fileBuffer:f,fileName:aj},defaults:{name:n,color:ak}}},{id:"322",attributes:{displayName:bj,name:eB,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002FmicrosoftExcel.svg"},defaults:{name:bj}}},{id:"356",attributes:{displayName:aH,name:eD,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002Fgmail.svg"},defaults:{name:aH}}},{id:aE,attributes:{displayName:o,name:j,iconData:{icon:ac,type:i},defaults:{name:o,color:aF}}},{id:bK,attributes:{displayName:bL,name:J,iconData:{icon:bM,type:i},defaults:{name:bN,color:H}}},{id:bO,attributes:{displayName:t,name:x,iconData:{type:h,fileBuffer:f,fileName:bP},defaults:{name:t}}},{id:"1234",attributes:{displayName:eG,name:er,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002FconvertToFile.svg"},defaults:{name:eG}}},{id:bg,attributes:{displayName:E,name:P,iconData:{type:h,fileBuffer:f,fileName:bh},defaults:{name:E}}},{id:"1240",attributes:{displayName:eH,name:ev,iconData:{type:h,fileBuffer:f,fileName:"\u002Fimages\u002Fnodes\u002Fsort.svg"},defaults:{name:eH}}}]},nonNativeNodes:[]},userInfo:{id:91633,name:"Mihai Farcas",username:eF,bio:"Full-stack developer with 5+ years streamlining healthcare processes. Proficient in NodeJS, VueJS, MongoDB, PostgreSQL, Kubernetes, and n8n. Ready to optimize your workflows – book a consult via my link.",verified:d,links:["https:\u002F\u002Fmihai.ltd"],partnerKey:"mihaifarcas2225",avatar:"https:\u002F\u002Fgravatar.com\u002Favatar\u002Fa73ca84b07b557e95322815bc04859245e9243c7cfd5bf9a14568fd0ce3e72c5?r=pg&d=retro&size=200",workflowsCount:bF}},{id:bp,attributes:{id:bp,workflow:{id:"Z6TY8mQOfbIvN86d",meta:{instanceId:"d7d7b1e232b4091cbd27b67d20aa4c7ff54b11591e8e3f22d5db8387cc91fe3c"},name:"AI Competition – Small Business Problems – Rebound Email",tags:[],nodes:[{id:"12ef13ef-1634-4baa-88c5-2794d10cca5d",name:bA,type:J,position:[eI,an],parameters:{},typeVersion:b},{id:"c4d1116c-70e9-4161-a28a-821e91dca5c1",name:eJ,type:s,notes:"uargh.. excel",position:[-20,an],parameters:{url:"https:\u002F\u002Flet-the-work-flow.com\u002Fdummy\u002Fn8n-contest-merch.xlsx",options:{}},notesInFlow:d,typeVersion:ag},{id:"df8f6536-fa39-4d41-86b9-cafd57699089",name:o,type:j,position:[bB,dZ],parameters:{width:715.3278290432247,height:315.32782904322477,content:"## Get and prepare Dummy Data"},typeVersion:b},{id:"4c5e8173-46b4-44b9-8ee8-bd6938594de8",name:eK,type:x,position:[2700,-120],parameters:{html:"\u003C!DOCTYPE html\u003E\n\u003Chtml\u003E\n\u003Chead\u003E\n  \u003Cmeta charset=\"UTF-8\" \u002F\u003E\n  \u003Ctitle\u003E{{ $json['Headline'] }}\u003C\u002Ftitle\u003E\n\u003C\u002Fhead\u003E\n\u003Cbody\u003E\n  \u003Cdiv class=\"container\"\u003E\n    \u003Cimg class=\"logo\" src=\"https:\u002F\u002Fimg.logoipsum.com\u002F264.svg\"\u002F\u003E\n    \u003Ch1\u003EHey {{ $json['Custome Name'] ? $json['Custome Name']+', ' : '!' }}\u003C\u002Fh1\u003E\n    \u003Cp\u003E{{ $json['Body'] }}\u003C\u002Fp\u003E\n    \n  \u003Cdiv class=\"footer\"\u003E\n   \u003Cp\u003E\n    Definitely not a real company Lmt.\u003Cbr\u003E\n    Also not a real street 123\u003Cbr\u003E\n    Unreal Town\n   \u003C\u002Fp\u003E  \n\u003C\u002Fdiv\u003E \n \u003C\u002Fdiv\u003E\n \n  \n\u003C\u002Fbody\u003E\n\u003C\u002Fhtml\u003E\n\n\u003Cstyle\u003E\n.logo {\n  margin-top: 20px;\n }\n.container {\n  background-color: #ffffff;\n  font-family: sans-serif;\n  padding: 16px;\n  border-radius: 8px;\n}\n\nh1 {\n  color: #ff6d5a;\n  font-size: 24px;\n  font-weight: bold;\n  margin-top: 30px;\n}\n\np {\n  color: #606060;\n  line-height: 1.6;\n}\n\nh2 {\n  color: #909399;\n  font-size: 20px;\n  font-weight: bold;\n  padding: 8px;\n}\n\n.footer {\n  margin-top: 30px;\n}\n\n.footer \u003E p {\n    font-size: 14px;\n  color: #ccc;\n }\n\n\u003C\u002Fstyle\u003E"},typeVersion:b},{id:"541739f8-08c6-4e11-96bc-970d0bc2d81a",name:ab,type:j,position:[aZ,-359.54268546006915],parameters:{width:520.9323109877616,height:577.5426854600692,content:"## Let GPT do the heavy work\n\nFor the prompt we follow the one-shot'ish principle. Also I've decided to **_NOT_** give the AI the personal data. Keeps it simpler regarding data privacy.\n\nThe AI-Chain will generate a **Headline** and the **Text** for the Email and even **decides** if we should send the user a **Coupon**."},typeVersion:b},{id:"c09e5357-f6da-465f-a1e8-36da5a04923d",name:D,type:aw,position:[860,-160],parameters:{prompt:"=Determine the sentiment of the given product feedback. Then generate a Headline and Text without salutation or any greeting for a personalized Email Campagin after a User gave a product review. If the user seems not happy, tell them that you have a Coupon for them. The User finds the Coupon Code below this E-mail. \nThe target of the campagin: {{ $json['Campaign Target'] }}.\nRemember: {{ $json['Flavour'] }}. Avoid any greeting.",messages:{messageValues:[{type:"HumanMessagePromptTemplate",message:"=Item Purchased: {{ $json['Item Purchased'] }} \nFeedback: {{ $json.Feedback }}\nShould we send a coupon to make the customer happy? Yes\u002FNo"}]}},typeVersion:b},{id:"c2374357-b601-4b65-a01b-670960cbe5f5",name:bY,type:eL,position:[1100,aS],parameters:{jsonSchema:"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"Headline\": {\n      \"type\": \"string\"\n    },\n    \"Body\": {\n      \"type\": \"string\"\n    },\n    \"SendCoupon\": {\n      \"type\": \"boolean\"\n    }\n  }\n}"},typeVersion:b},{id:"8e29fd9f-7328-497c-ab23-af28d888bb01",name:l,type:q,position:[ah,aS],parameters:{model:"gpt-4",options:{temperature:dx}},credentials:{openAiApi:{id:"RL1de6Is2rfDFoYu",name:"Let the work flow"}},typeVersion:b},{id:"01ef334e-c6be-4e3b-a9f5-2aaccef5d6ec",name:eM,type:p,position:[co,an],parameters:{fields:{values:[{name:"Campaign Target",stringValue:"Engage the Customer"},{name:"Flavour",stringValue:"be friendly and witty but also cool and direct. Critique is valuable and embrace the feedback."}]},options:{}},typeVersion:y},{id:"e994b6c1-156d-450f-8473-d7dc64d5c4d0",name:eN,type:eO,position:[eP,an],parameters:{options:{}},typeVersion:bE},{id:"8647f374-a145-4d83-b6b4-4a4c354c3402",name:bZ,type:u,position:[dF,eP],parameters:{mode:N,options:{},combinationMode:_},typeVersion:z},{id:"7d1f6a8a-7fd5-4b3e-9d0c-15dd4d19481e",name:eQ,type:Y,position:[1580,197],parameters:{conditions:{string:[{value1:"Headline",operation:eR},{value1:"Body",operation:eR}]}},typeVersion:b},{id:"cbebe7a7-6cbd-457a-a8b7-d583927284f4",name:ay,type:j,position:[2620,eI],parameters:{width:277.60143175948906,height:324.32159412507656,content:"## HTML Email-Template without Coupon"},typeVersion:b},{id:"3f363757-a769-49b0-8652-b80457981f4a",name:az,type:j,position:[1540,aS],parameters:{width:367.0616804273918,height:405.4881010199125,content:"## Make sure we have what we need\nWe do not want to sent empty messages to our customers"},typeVersion:b},{id:"e7c01ae6-cc39-4e3e-b5c3-b99752e339ea",name:eS,type:"n8n-nodes-base.stopAndError",position:[1760,296],parameters:{errorMessage:"Unexpected Langchain Output"},typeVersion:b},{id:"5e49f4a2-e186-475d-bce1-c10b6a2fa5bd",name:eT,type:Y,position:[dD,180],parameters:{conditions:{boolean:[{value1:"={{ $json.SendCoupon }}"}]}},typeVersion:b},{id:"ccc5d0c2-fc52-4989-8107-ad2d1463d26f",name:cs,type:j,position:[2600,al],parameters:{width:369.917435648372,height:330.56011245057107,content:"## HTML Email-Template with Coupon"},typeVersion:b},{id:"31210e6c-c7e0-444a-9c83-6ce96a2fcf4f",name:ct,type:j,position:[2238,al],parameters:{width:319.84249777513367,height:330.6656654860422,content:"## Mocked: Fake a Coupon Code\nFor a real life scenario add the automated coupon generation here"},typeVersion:b},{id:"e5ca2ba0-40e1-4600-9e67-0c92527a7a3e",name:eU,type:p,position:[2318,k],parameters:{fields:{values:[{name:"Coupon",stringValue:"F4k3ItT1llY0uM4k3It"},{name:"Coupon Value",stringValue:"20% of any purchase"},{name:"Coupon Terms",stringValue:"=Valid until {{ $today.plus({days: 14}).format(\"d. MMM. y\") }} | minimum purchase amount: 20$ "}]},options:{}},typeVersion:y},{id:"402c73b1-b8f3-41d5-8e75-a0feb4b38619",name:"Sticky Note6",type:j,position:[bB,-485],parameters:{width:534.1315466553021,height:566.556517486655,content:"# Documentation\n\nThis Workflow is for the n8n AI \u002F Langchain Competition.\n\nIt solves the Problem: Personalizing marketing emails based on customer purchase history.\n\nI've found it a bit ambiguous and decided to go the \"Convert unhappy customers with a Coupon\"-Route.\n\nSo this workflow utilizes the new LangChain Node for generating personalized E-Mail campaigns and decide if the user might need a coupon to be satisfied. Classic Rebound stuff. \n\nThere is also a Node \"Some Options...\" which can be adjusted to quickly change the direction this Campaign should go.\n\nAdditionally we use n8n to generate the HTML Mails by two different Templates. One with simple text and another for that Coupon handling.\n\n![Image](https:\u002F\u002Flet-the-work-flow.com\u002Flogo-64.png)\nEnjoy the Workflow! ❤️ \nhttps:\u002F\u002Flet-the-work-flow.com\n"},typeVersion:b},{id:"b9e32086-95ca-43e2-87c2-59335e822985",name:eV,type:x,position:[2738,k],parameters:{html:"\u003C!DOCTYPE html\u003E\n\u003Chtml\u003E\n\u003Chead\u003E\n  \u003Cmeta charset=\"UTF-8\" \u002F\u003E\n  \u003Ctitle\u003E{{ $json['Headline'] }}\u003C\u002Ftitle\u003E\n\u003C\u002Fhead\u003E\n\u003Cbody\u003E\n  \u003Cdiv class=\"container\"\u003E\n    \u003Cimg class=\"logo\" src=\"https:\u002F\u002Fimg.logoipsum.com\u002F264.svg\"\u002F\u003E\n    \u003Ch1\u003EHey {{ $json['Custome Name'] ? $json['Custome Name']+', ' : '!' }}\u003C\u002Fh1\u003E\n    \u003Cp\u003E{{ $json['Body'] }}\u003C\u002Fp\u003E\n    \n    \u003Cdiv class=\"coupon\"\u003E\n        \u003Ch3\u003EHere's a Coupon for you!\u003Cbr\u003E\n        {{ $json['Coupon Value'] }}\u003C\u002Fh3\u003E\n        \u003Ch4 class=\"code\"\u003E{{ $json['Coupon'] }}\u003C\u002Fh4\u003E\n        \u003Cp\u003E{{ $json['Coupon Terms'] }}\u003C\u002Fp\u003E\n    \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"footer\"\u003E\n   \u003Cp\u003E\n    Definitely not a real company Lmt.\u003Cbr\u003E\n    Also not a real street 123\u003Cbr\u003E\n    Unreal Town\n   \u003C\u002Fp\u003E  \n\u003C\u002Fdiv\u003E \n \u003C\u002Fdiv\u003E\n \n  \n\u003C\u002Fbody\u003E\n\u003C\u002Fhtml\u003E\n\n\u003Cstyle\u003E\n.logo {\n  margin-top: 20px;\n }\n.container {\n  background-color: #ffffff;\n  font-family: sans-serif;\n  padding: 16px;\n  border-radius: 8px;\n}\n\nh1 {\n  color: #ff6d5a;\n  font-size: 24px;\n  font-weight: bold;\n  margin-top: 30px;\n}\n\np {\n  color: #606060;\n  line-height: 1.6;\n}\n\nh2 {\n  color: #909399;\n  font-size: 20px;\n  font-weight: bold;\n  padding: 8px;\n}\n\n.coupon {\n  background: #ff6d5a;\n  color: #fff;\n  padding: 20px;\n}\n.coupon p {\n  color: #fff;\n}\n  \n.coupon .code {\n  font-weight: bold;\n  font-size: 24px;\n  font-family: monospace;\n }\n\n.footer {\n  margin-top: 30px;\n}\n\n.footer \u003E p {\n    font-size: 14px;\n  color: #ccc;\n }\n\n\u003C\u002Fstyle\u003E"},typeVersion:b},{id:"ff529bdf-8253-487b-88ee-c5356ea2d102",name:ao,type:eW,position:[3540,136],parameters:{html:"={{ $json.html }}",options:{},subject:"={{ $json.Headline }}",toEmail:"={{ $json.Email }}",fromEmail:"n8n@myemail.com"},credentials:{smtp:{id:"H6ImGYBa9W6FLvMH",name:"SMTP account"}},typeVersion:z},{id:"e003ea38-f4c1-43d3-9c4e-8c8d74f6dd9b",name:"Sticky Note7",type:j,position:[3440,dk],parameters:{width:326.9476248855971,height:414.15459581943776,content:"## Send the Email to the Customer\n\nAlthough it's cool that n8n allows sending emails via SMPT I would recommend to stick to your newsletter tool for that to keep track of opt-outs and stuff."},typeVersion:b},{id:"8f84a6e8-5a8f-45de-b732-32ba6b084075",name:b_,type:u,position:[eX,eh],parameters:{mode:N,options:{},combinationMode:_},typeVersion:z},{id:"e29bd936-4e34-4a34-b666-3a0c6f0684f4",name:b$,type:u,position:[eX,an],parameters:{mode:N,options:{},combinationMode:_},typeVersion:z}],active:g,pinData:{},settings:{executionOrder:bT},versionId:"d50fed44-149e-43eb-a691-3d1de4b8b33c",connections:{"Fake Coupon":{main:[[{node:eV,type:c,index:a}]]},"Basic LLM Chain":{main:[[{node:bZ,type:c,index:a}]]},"OpenAI Chat Model":{ai_languageModel:[[{node:D,type:C,index:a}]]},"Download Dummy Data":{main:[[{node:eN,type:c,index:a}]]},"Is the result valid?":{main:[[{node:eT,type:c,index:a}],[{node:eS,type:c,index:a}]]},"AI Output + Prev Data":{main:[[{node:eQ,type:c,index:a}]]},"Structured Output Parser":{ai_outputParser:[[{node:D,type:"ai_outputParser",index:a}]]},"Html Template for our Email":{main:[[{node:b_,type:c,index:a}]]},"Some Options for the Campagin":{main:[[{node:D,type:c,index:a},{node:bZ,type:c,index:b}]]},"The composed E-Mail + Prev Data":{main:[[{node:ao,type:c,index:a}]]},"When clicking \"Execute Workflow\"":{main:[[{node:eJ,type:c,index:a}]]},"Coupon them or not to Coupon them":{main:[[{node:eK,type:c,index:a},{node:b_,type:c,index:b}],[{node:eU,type:c,index:a},{node:b$,type:c,index:a}]]},"make that excel to something usuable":{main:[[{node:eM,type:c,index:a}]]},"Html Template for our Email with a Coupon":{main:[[{node:b$,type:c,index:b}]]},"The composed E-Mail with Coupon + Prev Data":{main:[[{node:ao,type:c,index:a}]]}}},name:"Personalize marketing emails using customer data and AI",description:"This workflow uses AI to analyze customer sentiment from product feedback. If the sentiment is negative, AI will determine whether offering a coupon could improve the customer experience.\n\nUpon completing the sentiment analysis, the workflow creates a personalized email templates. This solution streamlines the process of engaging with customers post-purchase, particularly when addressing dissatisfaction, and ensures that outreach is both personalized and automated.\n\nThis workflow won the 1st place in our last AI contest.\n\nNote that to use this template, you need to be on n8n version 1.19.4 or later.",categories:{data:[{id:S,attributes:{name:w,slug:T}},{id:aA,attributes:{name:G,slug:aB}}]},image:{data:[]},createdAt:"2023-11-14T08:13:29.675Z",updatedAt:"2024-07-15T18:15:12.568Z",username:V,verified:d,views:14380,recentViews:b,price:e,purchaseUrl:e,nodes:{data:[{id:"11",attributes:{displayName:ao,name:eW,iconData:{icon:"envelope",type:i},defaults:{name:ao,color:"#00bb88"}}},{id:ai,attributes:{displayName:n,name:s,iconData:{type:h,fileBuffer:f,fileName:aj},defaults:{name:n,color:ak}}},{id:dR,attributes:{displayName:aN,name:Y,iconData:{icon:dS,type:i},defaults:{name:aN,color:dT}}},{id:aC,attributes:{displayName:m,name:u,iconData:{type:h,fileBuffer:f,fileName:aD},defaults:{name:m}}},{id:bG,attributes:{displayName:bH,name:p,iconData:{icon:bI,type:i},defaults:{name:bJ}}},{id:"41",attributes:{displayName:eY,name:eO,iconData:{icon:"table",type:i},defaults:{name:eY,color:"#2244FF"}}},{id:bO,attributes:{displayName:t,name:x,iconData:{type:h,fileBuffer:f,fileName:bP},defaults:{name:t}}},{id:cB,attributes:{displayName:D,name:aw,iconData:{icon:bf,type:i},defaults:{name:D,color:H}}},{id:ad,attributes:{displayName:l,name:q,iconData:{type:h,fileBuffer:f,fileName:ae},defaults:{name:l}}},{id:"1179",attributes:{displayName:bY,name:eL,iconData:{icon:cA,type:i},defaults:{name:bY}}}]},nonNativeNodes:[]},userInfo:{id:bv,name:bw,username:V,bio:bx,verified:d,links:[f],partnerKey:f,avatar:by,workflowsCount:bz}}]},"data-v-2dc16a66:0":{columns:[{id:eZ,columnName:"Popular integrations",autofillOptions:"popular_integrations",bottomLink:"https:\u002F\u002Fn8n.io\u002Fintegrations",bottomLinkLabel:e_,links:[{columnLinkLabel:U,columnLink:"\u002Fintegrations\u002Fgoogle-sheets\u002F"},{columnLinkLabel:cG,columnLink:"\u002Fintegrations\u002Ftelegram\u002F"},{columnLinkLabel:cH,columnLink:"\u002Fintegrations\u002Fmysql\u002F"},{columnLinkLabel:cK,columnLink:"\u002Fintegrations\u002Fslack\u002F"},{columnLinkLabel:bi,columnLink:"\u002Fintegrations\u002Fdiscord\u002F"},{columnLinkLabel:cI,columnLink:"\u002Fintegrations\u002Fpostgres\u002F"},{columnLinkLabel:cL,columnLink:"\u002Fintegrations\u002Fnotion\u002F"},{columnLinkLabel:aH,columnLink:"\u002Fintegrations\u002Fgmail\u002F"},{columnLinkLabel:"Airtable",columnLink:"\u002Fintegrations\u002Fairtable\u002F"},{columnLinkLabel:cJ,columnLink:"\u002Fintegrations\u002Fgoogle-drive\u002F"}]},{id:Z,columnName:"Trending combinations",autofillOptions:e,bottomLink:e$,bottomLinkLabel:e_,links:[{id:"3",columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Fhubspot\u002Fand\u002Fsalesforce\u002F",columnLinkLabel:"HubSpot and Salesforce"},{id:eZ,columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Ftwilio\u002Fand\u002Fwhatsapp-business-cloud\u002F",columnLinkLabel:"Twilio and WhatsApp"},{id:Z,columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Fgithub\u002Fand\u002Fjira-software\u002F",columnLinkLabel:"GitHub and Jira"},{id:fa,columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Fasana\u002Fand\u002Fslack\u002F",columnLinkLabel:"Asana and Slack"},{id:fb,columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Fasana\u002Fand\u002Fsalesforce\u002F",columnLinkLabel:"Asana and Salesforce"},{id:aV,columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Fjira-software\u002Fand\u002Fslack\u002F",columnLinkLabel:"Jira and Slack"},{id:"7",columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Fjira-software\u002Fand\u002Fsalesforce\u002F",columnLinkLabel:"Jira and Salesforce"},{id:"8",columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Fgithub\u002Fand\u002Fslack\u002F",columnLinkLabel:"GitHub and Slack"},{id:"9",columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Fhubspot\u002Fand\u002Fquickbooks-online\u002F",columnLinkLabel:"HubSpot and QuickBooks"},{id:"10",columnLink:"https:\u002F\u002Fn8n.io\u002Fintegrations\u002Fhubspot\u002Fand\u002Fslack\u002F",columnLinkLabel:"HubSpot and Slack"}]},{id:fa,columnName:"Top integration categories",autofillOptions:"top_integration_categories",bottomLink:e$,bottomLinkLabel:"Explore more categories",links:[{columnLinkLabel:"Development",columnLink:"\u002Fintegrations\u002Fcategories\u002Fdevelopment\u002F"},{columnLinkLabel:"Communication",columnLink:"\u002Fintegrations\u002Fcategories\u002Fcommunication\u002F"},{columnLinkLabel:"Langchain",columnLink:"\u002Fintegrations\u002Fcategories\u002Flangchain\u002F"},{columnLinkLabel:w,columnLink:"\u002Fintegrations\u002Fcategories\u002Fai\u002F"},{columnLinkLabel:"Data & Storage",columnLink:"\u002Fintegrations\u002Fcategories\u002Fdata-and-storage\u002F"},{columnLinkLabel:G,columnLink:"\u002Fintegrations\u002Fcategories\u002Fmarketing\u002F"},{columnLinkLabel:"Productivity",columnLink:"\u002Fintegrations\u002Fcategories\u002Fproductivity\u002F"},{columnLinkLabel:af,columnLink:"\u002Fintegrations\u002Fcategories\u002Fsales\u002F"},{columnLinkLabel:"Utility",columnLink:"\u002Fintegrations\u002Fcategories\u002Futility\u002F"},{columnLinkLabel:"Miscellaneous",columnLink:"\u002Fintegrations\u002Fcategories\u002Fmiscellaneous\u002F"}]},{id:fb,columnName:"Trending templates",autofillOptions:"top_templates",bottomLink:"https:\u002F\u002Fn8n.io\u002Fworkflows\u002F",bottomLinkLabel:"Explore 800+ workflow templates",links:[{columnLinkLabel:"Creating an API endpoint",columnLink:"\u002Fworkflows\u002F1750-creating-an-api-endpoint\u002F"},{columnLinkLabel:c_,columnLink:"\u002Fworkflows\u002F1954-ai-agent-chat\u002F"},{columnLinkLabel:dr,columnLink:"\u002Fworkflows\u002F1951-scrape-and-summarize-webpages-with-ai\u002F"},{columnLinkLabel:"Very quick quickstart",columnLink:"\u002Fworkflows\u002F1700-very-quick-quickstart\u002F"},{columnLinkLabel:"Pulling data from services that n8n doesn’t have a pre-built integration for",columnLink:"\u002Fworkflows\u002F1748-pulling-data-from-services-that-n8n-doesnt-have-a-pre-built-integration-for\u002F"},{columnLinkLabel:"Joining different datasets",columnLink:"\u002Fworkflows\u002F1747-joining-different-datasets\u002F"},{columnLinkLabel:"Back Up Your n8n Workflows To Github",columnLink:"\u002Fworkflows\u002F1534-back-up-your-n8n-workflows-to-github\u002F"},{columnLinkLabel:dP,columnLink:"\u002Fworkflows\u002F2006-ai-agent-that-can-scrape-webpages\u002F"},{columnLinkLabel:ek,columnLink:"\u002Fworkflows\u002F1862-openai-gpt-3-company-enrichment-from-website-content\u002F"},{columnLinkLabel:"Telegram AI Chatbot",columnLink:"\u002Fworkflows\u002F1934-telegram-ai-chatbot\u002F"}]},{id:aV,columnName:"Top guides",autofillOptions:e,bottomLink:"https:\u002F\u002Fblog.n8n.io\u002F",bottomLinkLabel:"Show guides",links:[{id:"51",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Ftelegram-bots\u002F",columnLinkLabel:"Telegram bots"},{id:"54",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Fopen-source-chatbot\u002F",columnLinkLabel:"Open-source chatbot"},{id:"52",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Fopen-source-llm\u002F",columnLinkLabel:"Open-source LLM"},{id:"53",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Fopen-source-low-code-platforms\u002F",columnLinkLabel:"Open-source low-code platforms"},{id:"55",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Ffree-zapier-alternatives\u002F",columnLinkLabel:"Zapier alternatives"},{id:"56",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Fmake-vs-zapier\u002F",columnLinkLabel:"Make vs Zapier"},{id:"57",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Fai-agents\u002F",columnLinkLabel:"AI agents"},{id:"58",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Fai-coding-assistants\u002F",columnLinkLabel:"AI coding assistants"},{id:"59",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Fcreate-chatgpt-discord-bot\u002F",columnLinkLabel:"ChatGPT Discord bot"},{id:"60",columnLink:"https:\u002F\u002Fblog.n8n.io\u002Fbest-ai-chatbot\u002F",columnLinkLabel:"Best AI chatbot"}]}],showAllLinks:g,limitPerColumn:B},"data-v-40ef39fe:0":{menuItems:[{MenuItemLabel:"Careers",URLSlug:"https:\u002F\u002Fapply.workable.com\u002Fn8n\u002F",isLinkExternal:d},{MenuItemLabel:"Case Studies",URLSlug:"\u002Fcase-studies",isLinkExternal:e},{MenuItemLabel:"Affiliate program",URLSlug:"\u002Faffiliates",isLinkExternal:g},{MenuItemLabel:"Contact",URLSlug:"\u002Fcontact",isLinkExternal:g},{MenuItemLabel:"Zapier vs n8n",URLSlug:"\u002Fvs\u002Fzapier",isLinkExternal:g},{MenuItemLabel:"Become an expert",URLSlug:"\u002Fbecome-an-expert",isLinkExternal:e},{MenuItemLabel:"Merch",URLSlug:"https:\u002F\u002Fmerch.n8n.io\u002F",isLinkExternal:d},{MenuItemLabel:"Make vs n8n",URLSlug:"\u002Fvs\u002Fmake",isLinkExternal:g},{MenuItemLabel:"Join user tests, get a gift",URLSlug:"https:\u002F\u002Finternal.users.n8n.cloud\u002Fform\u002Fn8n-usability-test-signup",isLinkExternal:d},{MenuItemLabel:"Press",URLSlug:"\u002Fpress",isLinkExternal:g},{MenuItemLabel:"XML to JSON converter",URLSlug:"\u002Ftools\u002Fxml-to-json",isLinkExternal:g},{MenuItemLabel:"Events",URLSlug:"https:\u002F\u002Flu.ma\u002Fn8n-events",isLinkExternal:d},{MenuItemLabel:cM,URLSlug:"\u002Flegal\u002F#security",isLinkExternal:g}],menuFirstLevels:[],iconsItems:[{Image:{img:{data:{attributes:{url:"https:\u002F\u002Fn8niostorageaccount.blob.core.windows.net\u002Fn8nio-strapi-blobs-prod\u002Fassets\u002FTwitter_b5797f12f6.svg"}}},alt:"twitter",caption:e,url:"https:\u002F\u002Ftwitter.com\u002Fn8n_io"}},{Image:{img:{data:{attributes:{url:"https:\u002F\u002Fn8niostorageaccount.blob.core.windows.net\u002Fn8nio-strapi-blobs-prod\u002Fassets\u002FGithub_e5e4b55412.svg"}}},alt:"github",caption:e,url:"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fn8n"}},{Image:{img:{data:{attributes:{url:"https:\u002F\u002Fn8niostorageaccount.blob.core.windows.net\u002Fn8nio-strapi-blobs-prod\u002Fassets\u002FDiscord_b026858c43.svg"}}},alt:"discord",caption:e,url:"https:\u002F\u002Fdiscord.gg\u002Fn8n"}},{Image:{img:{data:{attributes:{url:"https:\u002F\u002Fn8niostorageaccount.blob.core.windows.net\u002Fn8nio-strapi-blobs-prod\u002Fassets\u002FLinked_In_ac1292d890.svg"}}},alt:"linkedin",caption:e,url:"https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fn8n\u002F"}},{Image:{img:{data:{attributes:{url:"https:\u002F\u002Fn8niostorageaccount.blob.core.windows.net\u002Fn8nio-strapi-blobs-prod\u002Fassets\u002FYoutube_4efb02226a.svg"}}},alt:"youtube",caption:e,url:"https:\u002F\u002Fwww.youtube.com\u002Fc\u002Fn8n-io"}}],bottomContent:{footerTextLeft:"[Impressum](\u002Fimpressum\u002F) & [Legal](\u002Flegal\u002F)\n\n[Report a vulnerability](\u002Flegal\u002F#vulnerability)",footerTextRight:"Made with ♥ in Berlin.\n© 2024 n8n | All rights reserved."}}},mutations:void 0}}(0,1,"main",true,null,"",false,"file","icon","n8n-nodes-base.stickyNote",460,"OpenAI Chat Model","Merge","HTTP Request","Sticky Note","n8n-nodes-base.set","@n8n\u002Fn8n-nodes-langchain.lmChatOpenAi","AI Agent","n8n-nodes-base.httpRequest","HTML","n8n-nodes-base.merge",540,"AI","n8n-nodes-base.html",3.2,2.1,"@n8n\u002Fn8n-nodes-langchain.agent",5,"ai_languageModel","Basic LLM Chain","Split Out",1200,"Marketing","#909298","OpenAI","n8n-nodes-base.manualTrigger",1000,"title",3,"combine","gpt-4o-mini","n8n-nodes-base.splitOut","list",340,"25","ai","Google Sheets","n8n-team","Summarization Chain",1480,"n8n-nodes-base.if","2","mergeByPosition","n8n-nodes-base.code",640,"Sticky Note1","sticky-note","1153","\u002Fimages\u002Fnodes\u002FlmChatOpenAi.svg","Sales",4.1,820,"19","\u002Fimages\u002Fnodes\u002FhttpRequest.svg","#0004F5",320,"n8n-nodes-base.googleSheets",220,"Send Email",300,"Extract from File","5oYe8Cxj7liOPAKk","Derek T","Ghost","define",1.6,"@n8n\u002Fn8n-nodes-langchain.chainLlm",1160,"Sticky Note2","Sticky Note3","27","marketing","24","\u002Fimages\u002Fnodes\u002Fmerge.svg","565","#FFD233","Code","Gmail","extractHtmlContent",980,"Default Data Loader","page_content","ReAct AI Agent","If","HTML Extract","Sheet1","Wait","price",60,"Merge chapters title and text","n8n Form Trigger","6","Editor","conversationalAgent","Create title",740,"Content Analyst",760,1780,"Writers","1119","robot","#404040","link","1239","\u002Fimages\u002Fnodes\u002FsplitOut.svg","Discord","Microsoft Excel 365","1954","1951","2006","1862","2275","1978","OpenAi account",1.2,920,"When chat message received",360,39668,"n8n Team","Meet the official n8n team. We specialize in building workflows that transform intricate tasks into seamless operations.","https:\u002F\u002Fgravatar.com\u002Favatar\u002Fb3d1a47322f05a8be3d2e7bad6a80c29161bd58b91e4762cbb3ac25e5d0db5a8?r=pg&d=retro&size=200",86,"When clicking \"Execute Workflow\"",-300,"url","Recursive Character Text Splitter",2,4,"38","Edit Fields (Set)","pen","Edit Fields","838","Manual Trigger","mouse-pointer","When clicking ‘Test workflow’","842","\u002Fimages\u002Fnodes\u002Fhtml.svg","selected","Execute Workflow Trigger","Convert to Markdown","v1","gid=0","Split In Batches","books",1820,"Structured Output Parser","AI Output + Prev Data","The composed E-Mail + Prev Data","The composed E-Mail with Coupon + Prev Data","2457","Final article text",2540,"n8n-nodes-base.formTrigger","f3822072-36a2-4f5a-8fe8-ca4b513f354c","File","n8n-nodes-base.extractFromFile","OpenAI Chat Model1","n8n-nodes-base.ghost","={{ $json.text }}","Delegate to Writers",1560,"Project Planner","@n8n\u002Fn8n-nodes-langchain.openAi",520,430.74703747002076,1840,428.9420572202205,"Sticky Note4","Sticky Note5","Multi-Agent PDF-to-Blog Content Generation","**Purpose of workflow:**\n\nThe purpose of this workflow is to automatically transform complex, lengthy PDFs into concise, insightful blog posts. This process aims to make dense information more accessible and understandable to a broader audience.\n\n**How it works:**\n\nMulti-agent team:\n\nWorking together to transform PDF to insightful blog\n- Content Analyst: Extracts key information and structure from the PDF.\n- Project Planner: Organizes the workflow and ensures efficient processing.\n- Writers: Multiple agents that craft engaging content based on the analyzed information.\n- Editor: Polishes the final output for accuracy, reliability, and readability.\n\n\n**Step by step**\n1. User inputs parameters via a n8n form (tone, word count, sections, PDF file).\n2. System extracts text from the PDF.\n3. Content Analyst AI agent analyzes the extracted text, identifying main topics and key points.\n4. Project Planner AI agent organizes the workflow, creating a structure for the blog post.\n5. Multiple Writer AI agents (based on the number of sections specified) each write a portion of the blog post.\n6. Editor AI agent combines all sections and polishes the final draft.\n7. Generates a title for the blog post.\n8. Final content is uploaded to a publishing Ghost platform\n",{},"derekcheungsa","834","\u002Fimages\u002Fnodes\u002Fcode.svg","code","1123","\u002Fimages\u002Fnodes\u002FopenAi.svg",7,"Engineering","DevOps","Telegram","MySQL","Postgres","Google Drive","Slack","Notion","Security","\u002Ffeatures","https:\u002F\u002Fdocs.n8n.io","408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9","8gccIjcuf3gvaoEr","Window Buffer Memory","@n8n\u002Fn8n-nodes-langchain.memoryBufferWindow","SerpAPI","@n8n\u002Fn8n-nodes-langchain.toolSerpApi","@n8n\u002Fn8n-nodes-langchain.chatTrigger",240,1.1,680,"ai_tool","AI agent chat","comments","Fetch essay list","Extract essay names","essay","attribute","Fetch essay texts","Extract title",700,"Clean up",1360,"Split out into items",-80,"Limit to first 3","n8n-nodes-base.limit","@n8n\u002Fn8n-nodes-langchain.documentDefaultDataLoader","@n8n\u002Fn8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","@n8n\u002Fn8n-nodes-langchain.chainSummarization",720,"Scrape and summarize webpages with AI","Limit","@n8n\u002Fn8n-nodes-langchain.manualChatTrigger",676,983,896,.7,"Exctract HTML Body","Is error?","Stringify error message","n8n-nodes-base.executeWorkflowTrigger","Remove extra tags",1980,"Simplify output",1380,"Simplify?","QUERY_PARAMS","CONFIG","numberValue",1720,"n8n-nodes-base.markdown","Send Page Content","HTTP_Request_Tool","@n8n\u002Fn8n-nodes-langchain.toolWorkflow","AI agent that can scrape webpages","eduard","20","map-signs","#408000","Markdown","Call n8n Workflow Tool","n8n-nodes-base.htmlExtract","html","n8n-nodes-base.openAi",120,"Clean Content","runOnceForEachItem","Update Google Sheets","https:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F13h8HPWKha5kZHDeKxAPQvQqAOonof5cgpxzh79tIQfY\u002Fedit#gid=0","https:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F18iZ59I0q2AeElqcEpyJECNlSv4M6iJll9PQzXQkqEUk\u002Fedit#gid=0","https:\\\u002F\\\u002F(?:drive|docs)\\.google\\.com\\\u002F\\w+\\\u002Fd\\\u002F([0-9a-zA-Z\\-_]+)(?:\\\u002F.*|)","Google Sheets account lucas","Parse JSON","Read Google Sheets",40,"n8n-nodes-base.splitInBatches","n8n-nodes-base.wait","OpenAI GPT-3: Company Enrichment from website content","sales","lempire","18","\u002Fimages\u002Fnodes\u002FgoogleSheets.svg","Automated Web Scraping: email a CSV, save to Google Sheets & Microsoft Excel","Convert to CSV File","n8n-nodes-base.convertToFile",100,"Extract all books from the page","Sort by price","n8n-nodes-base.sort","Extract individual book price","Save to Google Sheets","string","append","Save to Microsoft Excel 365","n8n-nodes-base.microsoftExcel","Send CSV via e-mail","n8n-nodes-base.gmail","Fetch website content","mihailtd","Convert to File","Sort",-240,"Download Dummy Data","Html Template for our Email","@n8n\u002Fn8n-nodes-langchain.outputParserStructured","Some Options for the Campagin","make that excel to something usuable","n8n-nodes-base.spreadsheetFile",200,"Is the result valid?","isNotEmpty","AI did fail us","Coupon them or not to Coupon them","Fake Coupon","Html Template for our Email with a Coupon","n8n-nodes-base.emailSend",3120,"Spreadsheet File","1","Show more integrations","https:\u002F\u002Fn8n.io\u002Fintegrations\u002F","4","5")));