{"workflow":{"id":13465,"name":"Publish LinkedIn posts from tech trends with Ollama AI quality checks","views":71,"recentViews":0,"totalViews":71,"createdAt":"2026-02-17T11:50:24.788Z","description":"## **Who is this for?**\n\nThis workflow is for solopreneurs, founders, creators, and marketers who want a consistent LinkedIn presence without spending hours writing posts. Ideal for anyone in tech, SaaS, or AI who wants trend-aware content on autopilot.\n\n## **What it does**\n\n**Flow 1 — Daily Research (6 AM):**\n- Fetches trending topics from Hacker News, Reddit (8 subreddits), and Product Hunt in parallel\n- Merges all sources, runs 7-layer deduplication, and ranks by relevance\n- AI generates 3 LinkedIn post drafts with different angles\n- Saves all drafts to a Google Sheets queue with status tracking\n\n**Flow 2 — Smart Publish (Tue/Wed/Thu at 9:30 AM):**\n- Reads all unpublished drafts from Google Sheets\n- AI Selector picks the single best draft for today\n- Selected post passes through an AI Quality Gate (scored 1–10)\n- Approved posts publish to LinkedIn with a hashtag comment\n- Posts needing revision get auto-rewritten, then published\n- Rejected posts are skipped; Telegram notifications on every action\n\n## **Setup steps**\n\n1. **Google Sheets** — Create a spreadsheet with columns: Post ID, Angle, Hook Line, Full Post, Hashtags, Trend Referenced, Word Count, Best Day, Posting Notes, Status, Created Date, Published Date, LinkedIn URL, AI Review, Revised Post, Dedup Stats, Generated At\n2. **Ollama** — Install locally and pull your preferred model (e.g., `ollama pull mistral`)\n3. **LinkedIn OAuth** — Register an app at developer.linkedin.com with `w_member_social` scope, get your Person URN\n4. **Telegram Bot** — Create via @BotFather, get your bot token and chat ID\n5. **AI Prompts** — Edit the system prompts in AI Writer, AI Selector, and AI Quality Gate nodes to match your persona and brand voice\n6. **Test** — Run the research flow manually first, verify drafts appear in your sheet, then test the publish flow\n\n## **Requirements**\n\n- Self-hosted n8n (uses Ollama nodes)\n- Ollama running locally with at least one model installed\n- Google Sheets OAuth2 credentials\n- LinkedIn OAuth2 credentials with `w_member_social` permission\n- Telegram Bot credentials\n\n## **How to customize**\n\n- Tweak AI Selector weights in its system prompt (day alignment, angle variety, engagement potential)\n- Adjust Quality Gate thresholds (hook strength, value density, authenticity, engagement, brand safety)\n- Set any draft status to `force_publish` in Google Sheets to override AI selection\n- Add more sources by duplicating the fetch/normalize pattern\n- Change posting schedule by editing the cron expressions in the Schedule Trigger nodes","workflow":{"id":"OaJZv61mZgAxF68I","meta":{"instanceId":"8f8ee4eb853c20789e317beb113798e3d078c0c7ef754b4b9fad98c2eee7e79d","templateCredsSetupCompleted":true},"name":"Automatically publish LinkedIn posts using trends and AI quality checks","tags":[{"id":"mHQntpbppFUpZPGm","name":"template","createdAt":"2026-02-17T08:30:26.885Z","updatedAt":"2026-02-17T08:30:26.885Z"}],"nodes":[{"id":"28905460-bb4c-4447-ba62-deb4d546861c","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1440,864],"parameters":{"width":700,"height":1060,"content":"## Automatically publish LinkedIn posts using trends and AI quality checks\n\nAutomate your LinkedIn content pipeline: scan trending tech topics daily, generate drafts with AI, then let an AI selector and quality gate pick and publish the best one.\n\n## How it works\n\n**Flow 1 — Daily Research (6 AM):**\n1. Fetches trending topics from Hacker News, Reddit (8 subreddits), and Product Hunt in parallel\n2. Merges all sources, runs 7-layer deduplication, and ranks by relevance\n3. AI generates 3 LinkedIn post drafts with different angles (build story, insight, how-to)\n4. Saves all drafts to a Google Sheets queue with status tracking\n\n**Flow 2 — Smart Publish (Tue–Thu 9:30 AM):**\n1. Reads all unpublished drafts from Google Sheets\n2. AI Selector picks the single best draft for today\n3. Selected post passes through an AI Quality Gate (scored 1–10)\n4. Approved → publish to LinkedIn + hashtag comment\n5. Needs revision → AI rewrites, then publishes\n6. Rejected → skipped, next best queued\n7. Telegram notification on every action\n\n## Setup steps\n\n1. **Google Sheets** — Create spreadsheet with columns: Post ID, Angle, Hook Line, Full Post, Hashtags, Trend Referenced, Word Count, Best Day, Posting Notes, Status, Created Date, Published Date, LinkedIn URL, AI Review, Revised Post, Dedup Stats, Generated At\n2. **Ollama** — Install locally and pull your model (e.g., `ollama pull mistral`)\n3. **LinkedIn OAuth** — Register app at developer.linkedin.com with `w_member_social` scope, get Person URN\n4. **Telegram Bot** — Create via @BotFather, get bot token and chat ID\n5. **AI Prompts** — Edit all 3 system prompts (Writer, Selector, Quality Gate) with your name, expertise, and tone\n6. **Test** — Run research flow manually first, then test publish flow\n\n## Customization\n\n- Tweak AI Selector weights in its system prompt\n- Adjust Quality Gate score thresholds as needed\n- Set any draft status to `force_publish` to override\n- Add more sources by duplicating the fetch/normalize pattern\n- Change schedule via cron expressions in Schedule Trigger nodes"},"typeVersion":1},{"id":"453d29b4-33aa-47f0-bf85-7593e80f2ca9","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-256,720],"parameters":{"color":7,"width":344,"height":616,"content":"## Fetch trending topics\nHacker News, Reddit, and Product Hunt fetched in parallel."},"typeVersion":1},{"id":"06951d31-821b-4bac-ad83-6b172cd7c3a5","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[112,720],"parameters":{"color":7,"width":300,"height":600,"content":"## Normalize fetched data\nStandardize output format from each source."},"typeVersion":1},{"id":"9d91bd5e-9b7c-4f87-b6f8-2969b7bfe292","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[608,496],"parameters":{"color":7,"width":1200,"height":420,"content":"## Merge, deduplicate, and generate drafts\nWait for all sources, run 7-layer dedup, rank, then AI writes 3 drafts."},"typeVersion":1},{"id":"e98844f7-48e2-456e-a60a-fd0cb043b742","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[2096,576],"parameters":{"color":7,"width":380,"height":324,"content":"## Save drafts to Google Sheets\nAppend generated posts to the queue with status \"draft\"."},"typeVersion":1},{"id":"9abded7f-8f92-40c8-b43a-f85801b49218","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","position":[-464,2240],"parameters":{"color":7,"width":692,"height":344,"content":"## Read drafts and select best post\nLoad all drafts, filter unpublished, AI Selector picks the best one for today."},"typeVersion":1},{"id":"6310c9eb-b360-48fb-ba2e-40787cb06b3e","name":"Sticky Note11","type":"n8n-nodes-base.stickyNote","position":[480,2080],"parameters":{"color":7,"width":1004,"height":636,"content":"## AI Quality Gate and review\nScore the selected post across 5 criteria, then route to approve, revise, or reject."},"typeVersion":1},{"id":"b07ad6a2-3f61-44ef-be78-718ad08854c7","name":"Sticky Note12","type":"n8n-nodes-base.stickyNote","position":[1856,2144],"parameters":{"color":7,"width":1452,"height":636,"content":"## Publish to LinkedIn and notify\nPublish approved or revised post, add hashtag comment, update sheet, send Telegram notification."},"typeVersion":1},{"id":"56d71465-5a9a-4ee5-b98c-675cccb9b783","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[2320,1920],"parameters":{"color":2,"width":484,"height":152,"content":"## ⚠️ Replace YOUR_LINKEDIN_PERSON_ID\nUpdate the Publish and Comment nodes with your LinkedIn Person URN."},"typeVersion":1},{"id":"96b5a172-1663-4e41-9f96-e71b41b5f3cd","name":"⏰ Daily 6 AM — Research","type":"n8n-nodes-base.scheduleTrigger","position":[-448,992],"parameters":{"rule":{"interval":[{"field":"cronExpression","expression":"0 6 * * *"}]}},"typeVersion":1.2},{"id":"c9e2a585-79cd-4b96-a924-bac5a004e99e","name":"🟠 Fetch Hacker News","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","position":[-176,832],"parameters":{"url":"https://hn.algolia.com/api/v1/search?tags=front_page&hitsPerPage=30","options":{"timeout":15000,"response":{"response":{"responseFormat":"json"}}}},"typeVersion":4.2},{"id":"d9abf24d-14a5-4956-8a8b-193ae12c5c8f","name":"🔴 Fetch Reddit","type":"n8n-nodes-base.code","position":[-176,1008],"parameters":{"jsCode":"const subreddits = ['technology','programming','startups','machinelearning','artificial','SaaS','webdev','entrepreneurship'];\nconst results = [];\nfor (const sub of subreddits) {\n  try {\n    const response = await this.helpers.httpRequest({ method:'GET', url:`https://www.reddit.com/r/${sub}/hot.json?limit=8`, headers:{'User-Agent':'n8n-linkedin-poster/1.0'}, timeout:10000, json:true });\n    if (response?.data?.children) {\n      for (const post of response.data.children) {\n        const d = post.data;\n        if (d?.title && !d.stickied) {\n          results.push({json:{title:d.title,url:d.url||`https://reddit.com${d.permalink}`,permalink:`https://reddit.com${d.permalink}`,score:d.score||0,comments:d.num_comments||0,subreddit:sub,selftext:(d.selftext||'').substring(0,300),source:'reddit',sourceLabel:`r/${sub}`,created:d.created_utc?new Date(d.created_utc*1000).toISOString():new Date().toISOString()}});\n        }\n      }\n    }\n  } catch(e) {}\n}\nreturn results.length>0?results:[{json:{source:'reddit',noData:true,items:0}}];"},"typeVersion":2},{"id":"1122d916-99b6-4b30-a24d-63517f1f6d99","name":"🟣 Fetch Product Hunt","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","position":[-176,1184],"parameters":{"url":"https://www.producthunt.com/feed","options":{"timeout":15000,"response":{"response":{"responseFormat":"text"}}},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"User-Agent","value":"Mozilla/5.0"},{"name":"Accept","value":"application/rss+xml,text/xml,*/*"}]}},"typeVersion":4.2},{"id":"466b92a7-9003-4945-9244-08354bd22f66","name":"🔧 Normalize HN","type":"n8n-nodes-base.code","position":[176,816],"parameters":{"jsCode":"const items=$input.all();const n=[];\nfor(const item of items){const d=item.json;if(d.hits&&Array.isArray(d.hits)){for(const h of d.hits){if(h.title&&h.title.length>3){n.push({json:{title:h.title,url:h.url||`https://news.ycombinator.com/item?id=${h.objectID}`,discussionUrl:`https://news.ycombinator.com/item?id=${h.objectID}`,score:h.points||0,comments:h.num_comments||0,author:h.author||'',source:'hackernews',sourceLabel:'Hacker News',created:h.created_at||new Date().toISOString(),_normalized:true}});}}}else if(d.title){n.push({json:{title:d.title,url:d.url||'',score:d.points||d.score||0,comments:d.num_comments||0,source:'hackernews',sourceLabel:'Hacker News',created:d.created_at||new Date().toISOString(),_normalized:true}});}}\nreturn n.length>0?n:[{json:{source:'hackernews',noData:true,_normalized:true}}];"},"typeVersion":2},{"id":"3da3f175-2a43-4cc9-8c7c-405aca3fcef4","name":"🔧 Normalize Reddit","type":"n8n-nodes-base.code","position":[176,1008],"parameters":{"jsCode":"const items=$input.all();const n=[];\nfor(const item of items){const d=item.json;if(d.title&&!d.noData){n.push({json:{...d,_normalized:true}});}}\nreturn n.length>0?n:[{json:{source:'reddit',noData:true,_normalized:true}}];"},"typeVersion":2},{"id":"c20ba66a-0cf5-4af0-86c5-f41d86527c09","name":"🔧 Normalize PH","type":"n8n-nodes-base.code","position":[176,1200],"parameters":{"jsCode":"const items=$input.all();const n=[];\nfor(const item of items){let raw=typeof item.json==='string'?item.json:(item.json.data||item.json.body||JSON.stringify(item.json));raw=String(raw);const ms=raw.match(/<item[\\s\\S]*?<\\/item>/gi)||[];\nfor(const xml of ms.slice(0,20)){const g=(tag)=>{const m=xml.match(new RegExp(`<${tag}[^>]*><!\\\\[CDATA\\\\[([^\\\\]]*?)\\\\]\\\\]><\\\\/${tag}>`,'i'))||xml.match(new RegExp(`<${tag}[^>]*>([^<]*)<\\\\/${tag}>`,'i'));return m?m[1].trim():'';};const t=g('title'),l=g('link')||g('guid');\nif(t&&l){n.push({json:{title:t,url:l,description:g('description').replace(/<[^>]+>/g,' ').substring(0,300),score:0,comments:0,source:'producthunt',sourceLabel:'Product Hunt',created:g('pubDate')||new Date().toISOString(),_normalized:true}});}}}\nreturn n.length>0?n:[{json:{source:'producthunt',noData:true,_normalized:true}}];"},"typeVersion":2},{"id":"f4cb691e-9351-4965-8412-9932bf9d275c","name":"⏳ Wait for ALL Sources","type":"n8n-nodes-base.merge","position":[432,960],"parameters":{"numberInputs":3},"typeVersion":3.1},{"id":"913e3121-6adb-43b3-8e62-3a6e7160d7d4","name":"📦 Collect All Items","type":"n8n-nodes-base.code","position":[688,688],"parameters":{"jsCode":"const all=$input.all();const c=[];\nfor(const item of all){const d=item.json;if(d.noData||!d.title||!d._normalized||d.title.length<5)continue;c.push({title:d.title||'',url:d.url||'',discussionUrl:d.discussionUrl||d.permalink||'',score:d.score||0,comments:d.comments||0,source:d.source||'unknown',sourceLabel:d.sourceLabel||d.source||'Unknown',created:d.created||new Date().toISOString(),description:d.description||d.selftext||'',author:d.author||'',subreddit:d.subreddit||''});}\nconst sc={};for(const i of c){sc[i.source]=(sc[i.source]||0)+1;}\nreturn{json:{allItems:c,totalCollected:c.length,sourceCounts:sc,collectedAt:new Date().toISOString()}};"},"typeVersion":2},{"id":"a0e55c6e-91e8-4e6a-b874-e56fd0a4761e","name":"🧹 Deduplicate + Rank","type":"n8n-nodes-base.code","position":[880,672],"parameters":{"jsCode":"const input=$json;const allItems=input.allItems||[];\nif(!allItems.length)return{json:{itemCount:0,totalScanned:0,topItems:[],topItemsFormatted:'No items.',stats:{totalFetched:0,duplicatesRemoved:0,afterDedup:0},scannedAt:new Date().toISOString()}};\nconst sw=new Set(['the','and','for','are','but','not','you','all','can','has','its','may','new','now','old','see','way','who','did','get','got','had','her','him','his','how','let','our','own','say','she','too','use','was','why','with','from','that','this','what','when','will','your','been','have','just','more','most','much','than','them','then','they','very','about','after','being','could','every','first','their','there','these','thing','those','using','which','would','should','into','some','also','like','over','such','take','only','come','make','know','year','back','even','give','many']);\nfunction nu(u){if(!u)return'';return u.toLowerCase().replace(/https?:\\/\\//,'').replace(/^www\\./,'').replace(/\\/+$/,'').replace(/\\?.*$/,'').replace(/#.*$/,'').replace(/\\/amp\\/?$/,'').trim();}\nfunction ec(u){if(!u)return'';const n=nu(u);if(n.includes('reddit.com/r/'))return'';if(n.includes('news.ycombinator.com'))return'';if(n.includes('producthunt.com/posts/')){const m=n.match(/producthunt\\.com\\/posts\\/([a-z0-9-]+)/);return m?m[1]:n;}return n;}\nfunction nt(t){return(t||'').toLowerCase().replace(/^(show hn|ask hn|tell hn|launch hn):\\s*/i,'').replace(/^\\[.*?\\]\\s*/,'').replace(/\\(.*?\\)/g,'').replace(/[^a-z0-9\\s]/g,' ').replace(/\\s+/g,' ').trim();}\nfunction gw(t){return nt(t).split(' ').filter(w=>w.length>2&&!sw.has(w));}\nfunction jc(a,b){const sA=new Set(a),sB=new Set(b);if(!sA.size||!sB.size)return 0;let i=0;for(const w of sA)if(sB.has(w))i++;return i/(sA.size+sB.size-i);}\nconst su=new Set(),sc=new Set(),ac=[],cr={};\nfor(const item of allItems){const nurl=nu(item.url),cu=ec(item.url),ntl=nt(item.title),ws=gw(item.title),p4=ws.slice(0,4).join(' '),p3=ws.slice(0,3).join(' ');\nlet dup=false,mi=-1;\nif(nurl&&su.has(nurl)){dup=true;mi=ac.findIndex(a=>nu(a.item.url)===nurl);}\nif(!dup&&cu&&cu.length>5&&sc.has(cu)){dup=true;mi=ac.findIndex(a=>ec(a.item.url)===cu);}\nif(!dup&&ntl.length>10){for(let i=0;i<ac.length;i++)if(ac[i].nt===ntl){dup=true;mi=i;break;}}\nif(!dup&&p4.length>12){for(let i=0;i<ac.length;i++)if(ac[i].p4.length>12&&ac[i].p4===p4){dup=true;mi=i;break;}}\nif(!dup&&p3.length>8){for(let i=0;i<ac.length;i++)if(ac[i].p3.length>8&&ac[i].p3===p3){dup=true;mi=i;break;}}\nif(!dup&&ws.length>=3){for(let i=0;i<ac.length;i++)if(ac[i].ws.length>=3&&jc(ws,ac[i].ws)>0.6){dup=true;mi=i;break;}}\nif(!dup&&ntl.length>15){for(let i=0;i<ac.length;i++)if(ac[i].nt.length>15&&(ntl.includes(ac[i].nt)||ac[i].nt.includes(ntl))){dup=true;mi=i;break;}}\nif(dup&&mi>=0){const tk=ac[mi].p4||ac[mi].nt;if(!cr[tk])cr[tk]={sources:new Set([ac[mi].item.source]),ms:ac[mi].item.score||0,tc:ac[mi].item.comments||0};cr[tk].sources.add(item.source);cr[tk].ms=Math.max(cr[tk].ms,item.score||0);cr[tk].tc+=(item.comments||0);continue;}\nif(nurl)su.add(nurl);if(cu&&cu.length>5)sc.add(cu);const tk=p4||ntl;cr[tk]={sources:new Set([item.source]),ms:item.score||0,tc:item.comments||0};ac.push({item,nt:ntl,ws,p4,p3});}\nconst en=ac.map(e=>{const tk=e.p4||e.nt,tr=cr[tk]||{sources:new Set([e.item.source]),ms:e.item.score,tc:e.item.comments};const s=tr.sources.size,sn=Math.min((tr.ms||0)/100,10),cn=Math.min((tr.tc||0)/50,10);const rel=Math.round(sn*3+cn*2+(s-1)*8+(e.item.created&&Date.now()-new Date(e.item.created).getTime()<12*3600000?3:0));return{...e.item,relevanceScore:rel,crossSourceCount:s,crossSources:Array.from(tr.sources).join(', '),isMultiSource:s>1,combinedScore:tr.ms,combinedComments:tr.tc};});\nen.sort((a,b)=>b.relevanceScore-a.relevanceScore);const top20=en.slice(0,20);const dr=allItems.length-ac.length;\nreturn{json:{stats:{totalFetched:allItems.length,duplicatesRemoved:dr,deduplicationRate:`${Math.round(dr/Math.max(allItems.length,1)*100)}%`,afterDedup:ac.length,topItemsCount:top20.length,multiSourceItems:en.filter(i=>i.isMultiSource).length,sourceCounts:input.sourceCounts},itemCount:top20.length,totalScanned:allItems.length,topItems:top20,topItemsFormatted:top20.map((item,i)=>{const m=item.isMultiSource?` ⭐ [TRENDING on ${item.crossSources}]`:'';return`${i+1}. [${item.sourceLabel}] ${item.title}${m}\\n   Score: ${item.combinedScore} | Comments: ${item.combinedComments} | Relevance: ${item.relevanceScore}\\n   URL: ${item.url}`;}).join('\\n\\n'),scannedAt:new Date().toISOString()}};"},"typeVersion":2},{"id":"f52fe204-cd16-4e46-a943-35c6e483ff57","name":"📊 Has Items?","type":"n8n-nodes-base.if","position":[1104,672],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"has-items","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.itemCount }}","rightValue":0}]}},"typeVersion":2.2},{"id":"c638109c-0e58-427f-aefc-06d92c2b1ebb","name":"🤖 AI LinkedIn Writer","type":"@n8n/n8n-nodes-langchain.agent","position":[1440,528],"parameters":{"text":"=Top {{ $json.itemCount }} trending topics:\n\n{{ $json.topItemsFormatted }}\n\nGenerate 3 LinkedIn post drafts. Each DIFFERENT angle.","options":{"systemMessage":"You are a LinkedIn content strategist writing for: [YOUR NAME]\nExpertise: [YOUR EXPERTISE]\nProduct: [YOUR PRODUCT]\nTone: Smart, conversational, no corporate speak.\n\nGENERATE 3 POSTS:\n1. BUILD STORY — \"I built X that does Y.\"\n2. INSIGHT — \"Everyone talks about X. Here's what they miss.\"\n3. HOW-TO — \"How to do X in 5 steps.\"\n\nRULES: 150-250 words. Hook first line. Short paragraphs. Max 3 emoji. No hashtags in body. Soft CTA. Include specifics. Human tone. Reference real trends. ⭐ items = prioritize.\n\nRAW JSON ONLY. No markdown fences.\n{\"posts\":[{\"angle\":\"build_story\",\"hookLine\":\"...\",\"fullPost\":\"...\",\"hashtags\":[\"#tag\"],\"trendReferenced\":\"...\",\"estimatedWordCount\":180,\"bestPostingDay\":\"Tuesday\",\"postingNotes\":\"...\"},{\"angle\":\"insight_opinion\",\"hookLine\":\"...\",\"fullPost\":\"...\",\"hashtags\":[],\"trendReferenced\":\"...\",\"estimatedWordCount\":200,\"bestPostingDay\":\"Wednesday\",\"postingNotes\":\"...\"},{\"angle\":\"howto_tutorial\",\"hookLine\":\"...\",\"fullPost\":\"...\",\"hashtags\":[],\"trendReferenced\":\"...\",\"estimatedWordCount\":220,\"bestPostingDay\":\"Thursday\",\"postingNotes\":\"...\"}],\"weekTheme\":\"...\",\"contentCalendarNote\":\"...\"}"},"promptType":"define","hasOutputParser":true},"typeVersion":2.1},{"id":"80f18a69-b090-437e-9343-7d7486fe9a85","name":"📝 Extract Posts","type":"n8n-nodes-base.code","position":[1936,720],"parameters":{"jsCode":"const sourceData=$('📊 Has Items?').item.json;const raw=$json;let pd={};\nfunction ej(s){if(typeof s!=='string')return null;let c=s.replace(/```json\\s*/gi,'').replace(/```\\s*/g,'').trim();try{return JSON.parse(c);}catch(e){const m=c.match(/\\{[\\s\\S]*\"posts\"\\s*:[\\s\\S]*\\}/);if(m){try{return JSON.parse(m[0]);}catch(e2){return null;}}return null;}}\nfunction fa(o,d=0){if(d>5||!o||typeof o!=='object')return null;if(o.posts&&Array.isArray(o.posts))return o;const ps=['output','text','message','content','response','result','data','json','kwargs','lc_kwargs'];for(const p of ps){if(o[p]!==undefined){if(typeof o[p]==='string'){const r=ej(o[p]);if(r&&r.posts)return r;}else if(typeof o[p]==='object'){const f=fa(o[p],d+1);if(f)return f;}}}for(const k of Object.keys(o)){if(ps.includes(k))continue;const v=o[k];if(typeof v==='string'&&v.includes('\"posts\"')){const r=ej(v);if(r&&r.posts)return r;}else if(typeof v==='object'&&v!==null){const f=fa(v,d+1);if(f)return f;}}return null;}\ntry{if(raw&&raw.posts)pd=raw;else{const f=fa(raw);if(f)pd=f;}if(!pd.posts){const s=JSON.stringify(raw);const p=ej(s);if(p&&p.posts)pd=p;}}catch(e){}\nif(!pd.posts||!Array.isArray(pd.posts)||pd.posts.length===0){pd={posts:[{angle:'build_story',hookLine:'AI failed',fullPost:'Manual draft needed.',hashtags:['#n8n'],trendReferenced:'N/A',estimatedWordCount:0,bestPostingDay:'Tuesday',postingNotes:'AI failed'}],weekTheme:'N/A',contentCalendarNote:'Check AI'};}\nconst today=new Date().toISOString().split('T')[0];const results=[];\nfor(let i=0;i<pd.posts.length;i++){const p=pd.posts[i];results.push({json:{postId:`${today}-${i+1}-${p.angle}`,angle:p.angle||'unknown',hookLine:p.hookLine||'',fullPost:p.fullPost||'',hashtags:Array.isArray(p.hashtags)?p.hashtags.join(' '):(p.hashtags||''),trendReferenced:p.trendReferenced||'',wordCount:p.estimatedWordCount||0,bestPostingDay:p.bestPostingDay||'Tuesday',postingNotes:p.postingNotes||'',status:'draft',createdDate:today,weekTheme:pd.weekTheme||'',dedupStats:`${sourceData.stats.totalFetched}→${sourceData.stats.duplicatesRemoved} dupes (${sourceData.stats.deduplicationRate})→${sourceData.stats.afterDedup} unique`,generatedAt:new Date().toISOString()}});}\nreturn results;"},"typeVersion":2},{"id":"4137872b-da6d-43c9-a027-e2fec38881a5","name":"📋 Save to Queue","type":"n8n-nodes-base.googleSheets","position":[2208,720],"parameters":{"columns":{"value":{"Angle":"={{ $json.angle }}","Status":"={{ $json.status }}","Post ID":"={{ $json.postId }}","Best Day":"={{ $json.bestPostingDay }}","Hashtags":"={{ $json.hashtags }}","AI Review":"","Full Post":"={{ $json.fullPost }}","Hook Line":"={{ $json.hookLine }}","Word Count":"={{ $json.wordCount }}","Dedup Stats":"={{ $json.dedupStats }}","Created Date":"={{ $json.createdDate }}","Generated At":"={{ $json.generatedAt }}","LinkedIn URL":"","Revised Post":"","Posting Notes":"={{ $json.postingNotes }}","Published Date":"","Trend Referenced":"={{ $json.trendReferenced }}"},"schema":[{"id":"Post ID","type":"string","display":true,"required":false,"displayName":"Post ID","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Angle","type":"string","display":true,"required":false,"displayName":"Angle","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Hook Line","type":"string","display":true,"required":false,"displayName":"Hook Line","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Full Post","type":"string","display":true,"required":false,"displayName":"Full Post","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Hashtags","type":"string","display":true,"required":false,"displayName":"Hashtags","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Trend Referenced","type":"string","display":true,"required":false,"displayName":"Trend Referenced","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Word Count","type":"string","display":true,"required":false,"displayName":"Word Count","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Best Day","type":"string","display":true,"required":false,"displayName":"Best Day","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Posting Notes","type":"string","display":true,"required":false,"displayName":"Posting Notes","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Status","type":"string","display":true,"required":false,"displayName":"Status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Created Date","type":"string","display":true,"required":false,"displayName":"Created Date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Published Date","type":"string","display":true,"required":false,"displayName":"Published Date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"LinkedIn URL","type":"string","display":true,"required":false,"displayName":"LinkedIn URL","defaultMatch":false,"canBeUsedToMatch":true},{"id":"AI Review","type":"string","display":true,"required":false,"displayName":"AI Review","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Revised Post","type":"string","display":true,"required":false,"displayName":"Revised Post","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Dedup Stats","type":"string","display":true,"required":false,"displayName":"Dedup Stats","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Generated At","type":"string","display":true,"required":false,"displayName":"Generated At","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":true},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultName":"Post Queue"},"documentId":{"__rl":true,"mode":"id","value":"YOUR_GOOGLE_SHEET_ID"}},"typeVersion":4.6},{"id":"9b689f0a-f4d5-4ccd-9c69-88735a88501b","name":"💤 No Items","type":"n8n-nodes-base.code","position":[1472,832],"parameters":{"jsCode":"return{json:{status:'no_trends',message:'No items after dedup.',checkedAt:new Date().toISOString()}};"},"typeVersion":2},{"id":"2168cdbf-bf4c-4fc9-abe7-c3f1486b042f","name":"⏰ Tue-Thu 9:30 AM — Publish","type":"n8n-nodes-base.scheduleTrigger","position":[-608,2368],"parameters":{"rule":{"interval":[{"field":"cronExpression","expression":"30 9 * * 2,3,4"}]}},"typeVersion":1.2},{"id":"86b157cb-dcc5-447f-bc4a-301d673d47e6","name":"📋 Read ALL Drafts","type":"n8n-nodes-base.googleSheets","position":[-384,2368],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"YOUR_SHEET_GID","cachedResultName":"Post Queue"},"documentId":{"__rl":true,"mode":"id","value":"YOUR_GOOGLE_SHEET_ID"}},"typeVersion":4.6},{"id":"1fcae955-f777-407e-bc67-dcc4175b059b","name":"📦 Collect All Drafts","type":"n8n-nodes-base.code","position":[-160,2368],"parameters":{"jsCode":"// ============================================\n// COLLECT ALL UNPUBLISHED DRAFTS FOR AI SELECTION\n// ============================================\n\nconst allRows = $input.all();\nconst drafts = [];\nconst recentlyPublished = [];\n\nconst dayNames = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];\nconst today = new Date();\nconst todayName = dayNames[today.getDay()];\nconst todayDate = today.toISOString().split('T')[0];\n\nfor (const row of allRows) {\n  const r = row.json;\n  const status = (r.Status || r.status || '').toLowerCase().trim();\n  const published = r['Published Date'] || r.publishedDate || '';\n  \n  // Collect unpublished drafts\n  if ((status === 'draft' || status === 'pending_review' || status === 'approved') && !published) {\n    drafts.push({\n      postId: r['Post ID'] || r.postId || '',\n      angle: r.Angle || r.angle || '',\n      hookLine: r['Hook Line'] || r.hookLine || '',\n      fullPost: r['Full Post'] || r.fullPost || '',\n      hashtags: r.Hashtags || r.hashtags || '',\n      trendReferenced: r['Trend Referenced'] || r.trendReferenced || '',\n      wordCount: r['Word Count'] || r.wordCount || 0,\n      bestDay: r['Best Day'] || r.bestPostingDay || '',\n      postingNotes: r['Posting Notes'] || r.postingNotes || '',\n      createdDate: r['Created Date'] || r.createdDate || '',\n      status: status\n    });\n  }\n  \n  // Track recently published to avoid similar angles\n  if (status === 'published' || status === 'revised_and_published') {\n    recentlyPublished.push({\n      angle: r.Angle || r.angle || '',\n      publishedDate: published,\n      trendReferenced: r['Trend Referenced'] || ''\n    });\n  }\n}\n\nif (drafts.length === 0) {\n  return { json: {\n    hasDrafts: false,\n    message: 'No unpublished drafts in queue.',\n    checkedAt: new Date().toISOString()\n  }};\n}\n\n// Format drafts for AI selection\nconst draftsFormatted = drafts.map((d, i) => {\n  const dayMatch = d.bestDay === todayName ? ' ✅ BEST DAY MATCH' : '';\n  return `--- DRAFT ${i + 1} ---\\nPost ID: ${d.postId}\\nAngle: ${d.angle}\\nHook: ${d.hookLine}\\nTrend: ${d.trendReferenced}\\nWord Count: ${d.wordCount}\\nBest Day: ${d.bestDay}${dayMatch}\\nCreated: ${d.createdDate}\\nStatus: ${d.status}\\n\\nFull Post:\\n${d.fullPost}\\n`;\n}).join('\\n');\n\n// Format recent posts for context\nconst recentContext = recentlyPublished.slice(-5).map(p => \n  `- ${p.angle} about \"${p.trendReferenced}\" on ${p.publishedDate}`\n).join('\\n') || 'No recent posts.';\n\nreturn { json: {\n  hasDrafts: true,\n  totalDrafts: drafts.length,\n  drafts: drafts,\n  draftsFormatted: draftsFormatted,\n  recentPostsContext: recentContext,\n  todayName: todayName,\n  todayDate: todayDate,\n  checkedAt: new Date().toISOString()\n}};"},"typeVersion":2},{"id":"33472742-2b39-4a52-b0fd-835a09682c84","name":"📄 Has Drafts?","type":"n8n-nodes-base.if","position":[64,2368],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"has-drafts","operator":{"type":"boolean","operation":"true"},"leftValue":"={{ $json.hasDrafts }}","rightValue":true}]}},"typeVersion":2.2},{"id":"4869d6b6-cdc5-4915-9c53-6c9cba6898f0","name":"🧠 AI Post Selector","type":"@n8n/n8n-nodes-langchain.agent","position":[544,2176],"parameters":{"text":"=You have {{ $json.totalDrafts }} unpublished LinkedIn post drafts to choose from.\nToday is {{ $json.todayName }}, {{ $json.todayDate }}.\n\n--- AVAILABLE DRAFTS ---\n{{ $json.draftsFormatted }}\n\n--- RECENTLY PUBLISHED (avoid repeating) ---\n{{ $json.recentPostsContext }}\n\n--- SELECT THE BEST POST FOR TODAY ---","options":{"systemMessage":"You are a LinkedIn content strategist. Your job is to analyze ALL available post drafts and select the SINGLE BEST one to publish today.\n\nYou are selecting for: [YOUR NAME]\nAudience: [YOUR AUDIENCE — e.g., founders, developers, tech leaders]\n\n---\n\nSELECTION CRITERIA (rank by importance):\n\n1. TODAY'S DAY ALIGNMENT (30% weight)\n   - If a post has bestDay matching today, it gets a strong boost\n   - Tuesday = build stories work best\n   - Wednesday = insights/opinions peak\n   - Thursday = how-to/tutorials perform well\n   - But don't blindly follow this — a great post beats a day-matched mediocre one\n\n2. HOOK STRENGTH (25% weight)\n   - Which draft has the most scroll-stopping first line?\n   - Specific > generic\n   - Curiosity/tension > announcement\n   - Does it make you want to read more?\n\n3. ANGLE VARIETY (20% weight)\n   - Look at recently published posts\n   - DO NOT pick the same angle as the last 2 posts\n   - Rotate: build_story → insight → howto → build_story\n   - If last post was insight, prefer build_story or howto\n\n4. TREND FRESHNESS (15% weight)\n   - Prefer posts about current/recent trends\n   - Older trends lose relevance fast\n   - Check the created date\n\n5. ENGAGEMENT POTENTIAL (10% weight)\n   - Will this generate comments?\n   - Is there a discussion hook?\n   - Is it polarizing enough to get reactions but not controversial?\n\n---\n\nDECISION OUTPUT:\n\nYou MUST select exactly ONE post. Provide the Post ID of your selection.\n\nIf ALL drafts are terrible, still pick the best one — the Quality Gate will catch truly bad posts.\n\nIf a post has status \"approved\" or \"force_publish\", prioritize it (human override).\n\n---\n\nRESPOND WITH ONLY RAW JSON. No markdown fences.\n\n{\n  \"selectedPostId\": \"the Post ID of the chosen draft\",\n  \"selectionReason\": \"2-3 sentences explaining why this post was chosen over others\",\n  \"dayAlignment\": \"matches\" or \"acceptable\" or \"mismatched\",\n  \"angleVariety\": \"good_rotation\" or \"acceptable\" or \"repetitive\",\n  \"hookRating\": 1 to 10,\n  \"trendFreshness\": \"fresh\" or \"recent\" or \"stale\",\n  \"engagementPrediction\": \"high\" or \"medium\" or \"low\",\n  \"overallConfidence\": 0.0 to 1.0,\n  \"alternatePostId\": \"backup Post ID in case primary is rejected by quality gate\",\n  \"alternateReason\": \"Why this is the backup choice\"\n}"},"promptType":"define","hasOutputParser":true},"typeVersion":2.1},{"id":"e9e97a87-8755-4bfb-819f-22fb0302c9b2","name":"🎯 Extract Selection","type":"n8n-nodes-base.code","position":[896,2272],"parameters":{"jsCode":"// Extract AI selection and prepare the chosen post\nconst draftsData = $('📄 Has Drafts?').item.json;\nconst rawAiOutput = $json;\n\nlet selectionData = {};\n\nfunction extractJSON(str) { if(typeof str!=='string')return null;let c=str.replace(/```json\\s*/gi,'').replace(/```\\s*/g,'').trim();try{return JSON.parse(c);}catch(e){const m=c.match(/\\{[\\s\\S]*\"selectedPostId\"\\s*:[\\s\\S]*\\}/);if(m){try{return JSON.parse(m[0]);}catch(e2){return null;}}return null;}}\nfunction findAI(obj,d=0){if(d>5||!obj||typeof obj!=='object')return null;if(obj.selectedPostId&&typeof obj.selectedPostId==='string')return obj;const ps=['output','text','message','content','response','result','data','json','kwargs','lc_kwargs'];for(const p of ps){if(obj[p]!==undefined){if(typeof obj[p]==='string'){const r=extractJSON(obj[p]);if(r&&r.selectedPostId)return r;}else if(typeof obj[p]==='object'){const f=findAI(obj[p],d+1);if(f)return f;}}}for(const k of Object.keys(obj)){if(ps.includes(k))continue;const v=obj[k];if(typeof v==='string'&&v.includes('\"selectedPostId\"')){const r=extractJSON(v);if(r&&r.selectedPostId)return r;}else if(typeof v==='object'&&v!==null){const f=findAI(v,d+1);if(f)return f;}}return null;}\n\ntry {\n  if (rawAiOutput && rawAiOutput.selectedPostId) selectionData = rawAiOutput;\n  else { const f = findAI(rawAiOutput); if (f) selectionData = f; }\n  if (!selectionData.selectedPostId) { const s = JSON.stringify(rawAiOutput); const p = extractJSON(s); if (p && p.selectedPostId) selectionData = p; }\n} catch (e) {}\n\n// Fallback: pick the first draft\nif (!selectionData.selectedPostId) {\n  selectionData = {\n    selectedPostId: draftsData.drafts[0].postId,\n    selectionReason: 'AI selector failed to parse — defaulting to first available draft.',\n    dayAlignment: 'unknown',\n    hookRating: 5,\n    overallConfidence: 0.3,\n    alternatePostId: draftsData.drafts.length > 1 ? draftsData.drafts[1].postId : '',\n    alternateReason: 'Backup in case primary fails.'\n  };\n}\n\n// Find the selected draft\nconst selectedDraft = draftsData.drafts.find(d => d.postId === selectionData.selectedPostId);\n\n// If selected post not found, use first draft\nconst finalDraft = selectedDraft || draftsData.drafts[0];\n\nreturn { json: {\n  // Selected post content\n  postId: finalDraft.postId,\n  fullPost: finalDraft.fullPost,\n  hookLine: finalDraft.hookLine,\n  hashtags: finalDraft.hashtags,\n  angle: finalDraft.angle,\n  trendReferenced: finalDraft.trendReferenced,\n  wordCount: finalDraft.wordCount,\n  postingNotes: finalDraft.postingNotes,\n  \n  // AI selection metadata\n  selectionReason: selectionData.selectionReason || '',\n  dayAlignment: selectionData.dayAlignment || '',\n  hookRating: selectionData.hookRating || 0,\n  engagementPrediction: selectionData.engagementPrediction || '',\n  overallConfidence: selectionData.overallConfidence || 0,\n  alternatePostId: selectionData.alternatePostId || '',\n  alternateReason: selectionData.alternateReason || '',\n  \n  // Context\n  totalDraftsConsidered: draftsData.totalDrafts,\n  todayName: draftsData.todayName,\n  selectedAt: new Date().toISOString()\n}};"},"typeVersion":2},{"id":"c43512d3-fcc5-4cca-9ba7-38a8609b5dd7","name":"🛡️ AI Quality Gate","type":"@n8n/n8n-nodes-langchain.agent","position":[1120,2272],"parameters":{"text":"=Review this LinkedIn post selected for publishing today.\n\n--- AI SELECTOR CONTEXT ---\nWhy selected: {{ $json.selectionReason }}\nDay alignment: {{ $json.dayAlignment }}\nHook rating: {{ $json.hookRating }}/10\nEngagement prediction: {{ $json.engagementPrediction }}\nConfidence: {{ $json.overallConfidence }}\n\n--- POST DETAILS ---\nAngle: {{ $json.angle }}\nHook: {{ $json.hookLine }}\nTrend: {{ $json.trendReferenced }}\nWord Count: {{ $json.wordCount }}\n\n--- FULL POST ---\n{{ $json.fullPost }}\n\n--- REVIEW NOW ---","options":{"systemMessage":"You are a senior LinkedIn content quality reviewer for: [YOUR NAME]\nBrand voice: [YOUR TONE]\nAudience: [YOUR AUDIENCE]\n\nREVIEW CRITERIA (1-10 each):\n1. HOOK STRENGTH — Does it stop the scroll? Specific, not generic?\n2. VALUE DENSITY — Every sentence adds value? No fluff?\n3. AUTHENTICITY — Sounds human, not AI? Has specifics?\n4. ENGAGEMENT POTENTIAL — Will people comment/share?\n5. BRAND SAFETY — Nothing risky or off-brand?\n\nDECISION:\n- approve: Average ≥ 7, no score below 5\n- revise: Average 5-7 OR fixable issues. MUST provide complete revised post.\n- reject: Average < 5 OR brand safety < 5\n\nIF REVISE: Keep same angle/trend. Fix issues. Make MORE human. Improve hook if < 7. Return COMPLETE revised post.\n\nRAW JSON ONLY. No markdown fences.\n{\"decision\":\"approve\",\"scores\":{\"hookStrength\":8,\"valueDensity\":7,\"authenticity\":9,\"engagementPotential\":7,\"brandSafety\":10},\"averageScore\":8.2,\"reviewSummary\":\"2-3 sentences\",\"issuesFound\":[],\"revisedPost\":\"\",\"revisedHookLine\":\"\",\"confidenceLevel\":\"high\",\"publishRecommendation\":\"One sentence\"}"},"promptType":"define","hasOutputParser":true},"typeVersion":2.1},{"id":"3f282eb2-d920-4c0b-888c-3a30625450aa","name":"🎯 Extract Review","type":"n8n-nodes-base.code","position":[1920,2272],"parameters":{"jsCode":"const postData = $('🎯 Extract Selection').item.json;\nconst raw = $json;\nlet rv = {};\n\nfunction ej(s){if(typeof s!=='string')return null;let c=s.replace(/```json\\s*/gi,'').replace(/```\\s*/g,'').trim();try{return JSON.parse(c);}catch(e){const m=c.match(/\\{[\\s\\S]*\"decision\"\\s*:[\\s\\S]*\\}/);if(m){try{return JSON.parse(m[0]);}catch(e2){return null;}}return null;}}\nfunction fa(o,d=0){if(d>5||!o||typeof o!=='object')return null;if(o.decision&&typeof o.decision==='string')return o;const ps=['output','text','message','content','response','result','data','json','kwargs','lc_kwargs'];for(const p of ps){if(o[p]!==undefined){if(typeof o[p]==='string'){const r=ej(o[p]);if(r&&r.decision)return r;}else if(typeof o[p]==='object'){const f=fa(o[p],d+1);if(f)return f;}}}for(const k of Object.keys(o)){if(ps.includes(k))continue;const v=o[k];if(typeof v==='string'&&v.includes('\"decision\"')){const r=ej(v);if(r&&r.decision)return r;}else if(typeof v==='object'&&v!==null){const f=fa(v,d+1);if(f)return f;}}return null;}\ntry{if(raw&&raw.decision)rv=raw;else{const f=fa(raw);if(f)rv=f;}if(!rv.decision){const s=JSON.stringify(raw);const p=ej(s);if(p&&p.decision)rv=p;}}catch(e){}\n\nif(!rv.decision||!['approve','revise','reject'].includes(rv.decision)){\n  rv={decision:'approve',scores:{hookStrength:7,valueDensity:7,authenticity:7,engagementPotential:7,brandSafety:8},averageScore:7.2,reviewSummary:'AI review parse failed — defaulting to approve.',issuesFound:['parse failed'],revisedPost:'',revisedHookLine:'',confidenceLevel:'low',publishRecommendation:'Review manually.'};\n}\n\nlet finalPost=postData.fullPost;\nlet finalHook=postData.hookLine;\nlet wasRevised=false;\n\nif(rv.decision==='revise'&&rv.revisedPost){\n  finalPost=rv.revisedPost;\n  finalHook=rv.revisedHookLine||rv.revisedPost.split('\\n')[0];\n  wasRevised=true;\n}\n\nreturn{json:{\n  postId:postData.postId,angle:postData.angle,hashtags:postData.hashtags,trendReferenced:postData.trendReferenced,\n  fullPost:finalPost,hookLine:finalHook,wasRevised:wasRevised,\n  decision:rv.decision,scores:rv.scores||{},averageScore:rv.averageScore||0,\n  reviewSummary:rv.reviewSummary||'',issuesFound:Array.isArray(rv.issuesFound)?rv.issuesFound.join('; '):'',\n  confidenceLevel:rv.confidenceLevel||'medium',publishRecommendation:rv.publishRecommendation||'',\n  selectionReason:postData.selectionReason,totalDraftsConsidered:postData.totalDraftsConsidered,\n  alternatePostId:postData.alternatePostId,\n  reviewedAt:new Date().toISOString()\n}};"},"typeVersion":2},{"id":"847a584d-db26-49f3-96c2-843182055170","name":"🔀 Review Decision","type":"n8n-nodes-base.switch","position":[2080,2272],"parameters":{"rules":{"values":[{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"strict"},"combinator":"and","conditions":[{"operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.decision }}","rightValue":"approve"}]},"renameOutput":true},{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"strict"},"combinator":"and","conditions":[{"operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.decision }}","rightValue":"revise"}]},"renameOutput":true},{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"strict"},"combinator":"and","conditions":[{"operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.decision }}","rightValue":"reject"}]},"renameOutput":true}]},"options":{"allMatchingOutputs":false}},"typeVersion":3.2},{"id":"7904330d-bbeb-46a8-9b47-df4daaacd0b7","name":"📤 Publish to LinkedIn","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","position":[2528,2256],"parameters":{"url":"https://api.linkedin.com/v2/ugcPosts","method":"POST","options":{"timeout":30000},"jsonBody":"={\n  \"author\": \"urn:li:person:YOUR_LINKEDIN_PERSON_ID\",\n  \"lifecycleState\": \"PUBLISHED\",\n  \"specificContent\": {\n    \"com.linkedin.ugc.ShareContent\": {\n      \"shareCommentary\": {\n        \"text\": {{ JSON.stringify($json.fullPost) }}\n      },\n      \"shareMediaCategory\": \"NONE\"\n    }\n  },\n  \"visibility\": {\n    \"com.linkedin.ugc.MemberNetworkVisibility\": \"PUBLIC\"\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"oAuth2Api","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"},{"name":"X-Restli-Protocol-Version","value":"2.0.0"}]}},"typeVersion":4.2},{"id":"2b8ea7f7-8be2-4147-924b-ab200d877d5c","name":"💬 Hashtags Comment","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","position":[2752,2256],"parameters":{"url":"=https://api.linkedin.com/v2/socialActions/{{ encodeURIComponent($json.id) }}/comments","method":"POST","options":{"timeout":15000},"jsonBody":"={\n  \"actor\": \"urn:li:person:YOUR_LINKEDIN_PERSON_ID\",\n  \"message\": {\n    \"text\": {{ JSON.stringify($('🎯 Extract Review').item.json.hashtags) }}\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"oAuth2Api","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]}},"typeVersion":4.2},{"id":"e58d4a3e-13a9-4711-bbcf-6c59deba9aa6","name":"✅ Mark Published","type":"n8n-nodes-base.googleSheets","position":[2976,2368],"parameters":{"columns":{"value":{"Status":"={{ $('🎯 Extract Review').item.json.wasRevised ? 'revised_and_published' : 'published' }}","Post ID":"={{ $('🎯 Extract Review').item.json.postId }}","AI Review":"=Selected: {{ $('🎯 Extract Review').item.json.selectionReason }} | Review: {{ $('🎯 Extract Review').item.json.reviewSummary }} | Score: {{ $('🎯 Extract Review').item.json.averageScore }}","LinkedIn URL":"={{ $('📤 Publish to LinkedIn').item.json.id || 'published' }}","Revised Post":"={{ $('🎯 Extract Review').item.json.wasRevised ? $('🎯 Extract Review').item.json.fullPost : '' }}","Published Date":"={{ new Date().toISOString() }}"},"schema":[{"id":"Post ID","type":"string","display":true,"removed":false,"required":false,"displayName":"Post ID","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Status","type":"string","display":true,"required":false,"displayName":"Status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Published Date","type":"string","display":true,"required":false,"displayName":"Published Date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"LinkedIn URL","type":"string","display":true,"required":false,"displayName":"LinkedIn URL","defaultMatch":false,"canBeUsedToMatch":true},{"id":"AI Review","type":"string","display":true,"required":false,"displayName":"AI Review","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Revised Post","type":"string","display":true,"required":false,"displayName":"Revised Post","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["Post ID"],"attemptToConvertTypes":false,"convertFieldsToString":true},"options":{},"operation":"appendOrUpdate","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultName":"Post Queue"},"documentId":{"__rl":true,"mode":"id","value":"YOUR_GOOGLE_SHEET_ID"}},"typeVersion":4.6},{"id":"84d1f3f2-5b8c-4508-81d4-9d8b4c1966ad","name":"📲 Published ✅","type":"n8n-nodes-base.telegram","position":[2976,2176],"webhookId":"befae0d8-860e-4c38-87e4-56eed353ff8b","parameters":{"text":"={{ (() => {\nconst r=$('🎯 Extract Review').item.json;\nconst rev=r.wasRevised?'\\n✏️ *Auto-revised by AI*':'';\nconst sel=r.selectionReason?`\\n🧠 *Why selected:* ${r.selectionReason}`:'';\nreturn `✅ *LinkedIn Post Published!*\\n\\n📝 *Angle:* ${r.angle}\\n🎣 *Hook:* ${r.hookLine}\\n📊 *Trend:* ${r.trendReferenced}\\n\\n🛡️ *Quality Score:* ${r.averageScore}/10\\n💬 ${r.reviewSummary}${rev}${sel}\\n\\n📋 *Selected from ${r.totalDraftsConsidered} drafts*\\n⏰ ${new Date().toISOString()}`;\n})() }}","chatId":"YOUR_TELEGRAM_CHAT_ID","additionalFields":{"parse_mode":"Markdown"}},"typeVersion":1.2},{"id":"b82b0d8e-4f37-4287-9179-2dc988442031","name":"💾 Save Revised","type":"n8n-nodes-base.googleSheets","position":[2304,2352],"parameters":{"columns":{"value":{"Status":"revised_and_published","Post ID":"={{ $json.postId }}","AI Review":"=REVISED | {{ $json.reviewSummary }} | Score: {{ $json.averageScore }} | Issues: {{ $json.issuesFound }}","Full Post":"={{ $json.fullPost }}","Hook Line":"={{ $json.hookLine }}"},"schema":[{"id":"Post ID","type":"string","display":true,"removed":false,"required":false,"displayName":"Post ID","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Status","type":"string","display":true,"required":false,"displayName":"Status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Full Post","type":"string","display":true,"required":false,"displayName":"Full Post","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Hook Line","type":"string","display":true,"required":false,"displayName":"Hook Line","defaultMatch":false,"canBeUsedToMatch":true},{"id":"AI Review","type":"string","display":true,"required":false,"displayName":"AI Review","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["Post ID"],"attemptToConvertTypes":false,"convertFieldsToString":true},"options":{},"operation":"appendOrUpdate","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultName":"Post Queue"},"documentId":{"__rl":true,"mode":"id","value":"YOUR_GOOGLE_SHEET_ID"}},"typeVersion":4.6},{"id":"51003564-ba71-482d-8d7a-b8001acf4e13","name":"❌ Mark Rejected","type":"n8n-nodes-base.googleSheets","position":[2304,2544],"parameters":{"columns":{"value":{"Status":"rejected","Post ID":"={{ $json.postId }}","AI Review":"=REJECTED | {{ $json.reviewSummary }} | Score: {{ $json.averageScore }} | Issues: {{ $json.issuesFound }}"},"schema":[{"id":"Post ID","type":"string","display":true,"removed":false,"required":false,"displayName":"Post ID","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Status","type":"string","display":true,"required":false,"displayName":"Status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"AI Review","type":"string","display":true,"required":false,"displayName":"AI Review","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["Post ID"],"attemptToConvertTypes":false,"convertFieldsToString":true},"options":{},"operation":"appendOrUpdate","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultName":"Post Queue"},"documentId":{"__rl":true,"mode":"id","value":"YOUR_GOOGLE_SHEET_ID"}},"typeVersion":4.6},{"id":"1cb07995-533d-4bcc-a0aa-03937a8e0317","name":"📲 Rejected ❌","type":"n8n-nodes-base.telegram","position":[2528,2544],"webhookId":"c89cff82-e3a5-4260-a7aa-04b61c44ea6c","parameters":{"text":"=❌ *Post Rejected by AI Quality Gate*\n\n📝 *Post ID:* {{ $json.postId }}\n📊 *Score:* {{ $json.averageScore }}/10\n💬 {{ $json.reviewSummary }}\n⚠️ *Issues:* {{ $json.issuesFound }}\n🔄 *Backup post:* {{ $json.alternatePostId || 'None' }}\n\n_Rejected posts are skipped. Next run will try a different post._","chatId":"YOUR_TELEGRAM_CHAT_ID","additionalFields":{"parse_mode":"Markdown"}},"typeVersion":1.2},{"id":"4a5a2e9f-88b8-4866-abe5-df05c0aa7e2b","name":"💤 No Drafts","type":"n8n-nodes-base.code","position":[608,2576],"parameters":{"jsCode":"return{json:{status:'no_drafts',message:'No unpublished drafts. Run the research flow to generate new posts.',checkedAt:new Date().toISOString()}};"},"typeVersion":2},{"id":"b490df19-a139-49d3-babf-af1ea76ce356","name":"Ollama Writer","type":"@n8n/n8n-nodes-langchain.lmChatOllama","position":[1376,672],"parameters":{"model":"mistral","options":{}},"typeVersion":1},{"id":"daee9f27-0977-4fc2-a54e-bf620e9a5baf","name":"Ollama Selector","type":"@n8n/n8n-nodes-langchain.lmChatOllama","position":[544,2400],"parameters":{"model":"YOUR_MODEL_NAME","options":{}},"typeVersion":1},{"id":"855f88fb-9cd0-434f-b9b9-dd9dd66e21db","name":"Ollama Reviewer","type":"@n8n/n8n-nodes-langchain.lmChatOllama","position":[1200,2496],"parameters":{"model":"YOUR_MODEL_NAME","options":{}},"typeVersion":1},{"id":"52662271-9a72-4ca1-a89d-e0c2fd39f027","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[448,1792],"parameters":{"color":2,"width":404,"height":216,"content":"##  **⚠️ Edit all 3 AI system prompts**\n**Update Writer, Selector, and Quality Gate with your name, expertise, and tone.**"},"typeVersion":1},{"id":"0fd1bd37-522d-46d0-b0fc-da7198b6f22c","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-288,512],"parameters":{"width":400,"height":80,"content":"## **Flow 1 — Daily Research (6 AM):**"},"typeVersion":1},{"id":"843d3376-3979-4c95-b4a8-1dc0d737a235","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-416,2096],"parameters":{"width":400,"height":80,"content":"## **Flow 2 — Smart Publish (Tue–Thu 9:30 AM):**"},"typeVersion":1},{"id":"dcf66211-40c8-4075-bd32-4039780723b3","name":"Sticky Note13","type":"n8n-nodes-base.stickyNote","position":[1248,1792],"parameters":{"color":2,"width":404,"height":216,"content":"##  **⚠️ Edit all 3 AI system prompts**\n**Update Writer, Selector, and Quality Gate with your name, expertise, and tone.**"},"typeVersion":1},{"id":"94ed6818-7093-4d7d-9ded-ddb127cf3476","name":"Sticky Note14","type":"n8n-nodes-base.stickyNote","position":[1408,1040],"parameters":{"color":2,"width":404,"height":216,"content":"##  **⚠️ Edit all 3 AI system prompts**\n**Update Writer, Selector, and Quality Gate with your name, expertise, and tone.**"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"binaryMode":"separate","availableInMCP":false,"executionOrder":"v1"},"versionId":"c7512fc2-2c1c-4b0e-8007-d050d456d091","connections":{"Ollama Writer":{"ai_languageModel":[[{"node":"🤖 AI LinkedIn Writer","type":"ai_languageModel","index":0}]]},"Ollama Reviewer":{"ai_languageModel":[[{"node":"🛡️ AI Quality Gate","type":"ai_languageModel","index":0}]]},"Ollama Selector":{"ai_languageModel":[[{"node":"🧠 AI Post Selector","type":"ai_languageModel","index":0}]]},"📊 Has Items?":{"main":[[{"node":"🤖 AI LinkedIn Writer","type":"main","index":0}],[{"node":"💤 No Items","type":"main","index":0}]]},"📄 Has Drafts?":{"main":[[{"node":"🧠 AI Post Selector","type":"main","index":0}],[{"node":"💤 No Drafts","type":"main","index":0}]]},"❌ Mark Rejected":{"main":[[{"node":"📲 Rejected ❌","type":"main","index":0}]]},"💾 Save Revised":{"main":[[{"node":"📤 Publish to LinkedIn","type":"main","index":0}]]},"🔧 Normalize HN":{"main":[[{"node":"⏳ Wait for ALL Sources","type":"main","index":0}]]},"🔧 Normalize PH":{"main":[[{"node":"⏳ Wait for ALL Sources","type":"main","index":2}]]},"🔴 Fetch Reddit":{"main":[[{"node":"🔧 Normalize Reddit","type":"main","index":0}]]},"📝 Extract Posts":{"main":[[{"node":"📋 Save to Queue","type":"main","index":0}]]},"🎯 Extract Review":{"main":[[{"node":"🔀 Review Decision","type":"main","index":0}]]},"📋 Read ALL Drafts":{"main":[[{"node":"📦 Collect All Drafts","type":"main","index":0}]]},"🔀 Review Decision":{"main":[[{"node":"📤 Publish to LinkedIn","type":"main","index":0}],[{"node":"💾 Save Revised","type":"main","index":0}],[{"node":"❌ Mark Rejected","type":"main","index":0}]]},"💬 Hashtags Comment":{"main":[[{"node":"✅ Mark Published","type":"main","index":0},{"node":"📲 Published ✅","type":"main","index":0}]]},"🔧 Normalize Reddit":{"main":[[{"node":"⏳ Wait for ALL Sources","type":"main","index":1}]]},"🧠 AI Post Selector":{"main":[[{"node":"🎯 Extract Selection","type":"main","index":0}]]},"🎯 Extract Selection":{"main":[[{"node":"🛡️ AI Quality Gate","type":"main","index":0}]]},"📦 Collect All Items":{"main":[[{"node":"🧹 Deduplicate + Rank","type":"main","index":0}]]},"🟠 Fetch Hacker News":{"main":[[{"node":"🔧 Normalize HN","type":"main","index":0}]]},"📦 Collect All Drafts":{"main":[[{"node":"📄 Has Drafts?","type":"main","index":0}]]},"🛡️ AI Quality Gate":{"main":[[{"node":"🎯 Extract Review","type":"main","index":0}]]},"🟣 Fetch Product Hunt":{"main":[[{"node":"🔧 Normalize PH","type":"main","index":0}]]},"🤖 AI LinkedIn Writer":{"main":[[{"node":"📝 Extract Posts","type":"main","index":0}]]},"🧹 Deduplicate + Rank":{"main":[[{"node":"📊 Has Items?","type":"main","index":0}]]},"⏳ Wait for ALL Sources":{"main":[[{"node":"📦 Collect All Items","type":"main","index":0}]]},"📤 Publish to LinkedIn":{"main":[[{"node":"💬 Hashtags Comment","type":"main","index":0}]]},"⏰ Daily 6 AM — Research":{"main":[[{"node":"🟠 Fetch Hacker News","type":"main","index":0},{"node":"🔴 Fetch Reddit","type":"main","index":0},{"node":"🟣 Fetch Product Hunt","type":"main","index":0}]]},"⏰ Tue-Thu 9:30 AM — Publish":{"main":[[{"node":"📋 Read ALL Drafts","type":"main","index":0}]]}}},"lastUpdatedBy":1,"workflowInfo":{"nodeCount":49,"nodeTypes":{"n8n-nodes-base.if":{"count":2},"n8n-nodes-base.code":{"count":12},"n8n-nodes-base.merge":{"count":1},"n8n-nodes-base.switch":{"count":1},"n8n-nodes-base.telegram":{"count":2},"n8n-nodes-base.stickyNote":{"count":14},"n8n-nodes-base.httpRequest":{"count":4},"n8n-nodes-base.googleSheets":{"count":5},"@n8n/n8n-nodes-langchain.agent":{"count":3},"n8n-nodes-base.scheduleTrigger":{"count":2},"@n8n/n8n-nodes-langchain.lmChatOllama":{"count":3}}},"status":"published","readyToDemo":null,"user":{"name":"Tony Adijah","username":"togo","bio":"Automating the boring stuff so you don’t have to. 🤖 📐 n8n Workflows & Templates 🚀 Helping you save 10+ hours a week. 👇 Grab free workflows below.","verified":true,"links":["https://www.linkedin.com/in/tony-adijah-965903131/"],"avatar":"https://gravatar.com/avatar/e2635712dd01a1dae354636c1a925735948ada9697e9d55824f24558a3eab732?r=pg&d=retro&size=200"},"nodes":[{"id":18,"icon":"file:googleSheets.svg","name":"n8n-nodes-base.googleSheets","codex":{"data":{"alias":["CSV","Sheet","Spreadsheet","GS"],"resources":{"generic":[{"url":"https://n8n.io/blog/love-at-first-sight-ricardos-n8n-journey/","icon":"❤️","label":"Love at first sight: Ricardo’s n8n journey"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/creating-triggers-for-n8n-workflows-using-polling/","icon":"⏲","label":"Creating triggers for n8n workflows using polling"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n/","icon":"📈","label":"Migrating Community Metrics to Orbit using n8n"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/your-business-doesnt-need-you-to-operate/","icon":" 🖥️","label":"Hey founders! Your business doesn't need you to operate"},{"url":"https://n8n.io/blog/how-honest-burgers-use-automation-to-save-100k-per-year/","icon":"🍔","label":"How Honest Burgers Use Automation to Save $100k per year"},{"url":"https://n8n.io/blog/how-a-digital-strategist-uses-n8n-for-online-marketing/","icon":"💻","label":"How a digital strategist uses n8n for online marketing"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/","icon":"📈","label":"How a Membership Development Manager automates his work and investments"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Data & Storage","Productivity"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"input\",\"output\"]","defaults":{"name":"Google Sheets"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGZpbGw9IiMyOEI0NDYiIGQ9Ik0zNS42OSAxIDUyIDE3LjIyNXYzOS4wODdhMy42NyAzLjY3IDAgMCAxLTEuMDg0IDIuNjFBMy43IDMuNyAwIDAgMSA0OC4yOTMgNjBIMTIuNzA3YTMuNyAzLjcgMCAwIDEtMi42MjMt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yLjYxQTMuNyAzLjcgMCAwIDEgMTEuNzA3IDB6Ii8+PHBhdGggZmlsbD0iIzZBQ0U3QyIgZD0iTTM0LjY5IDAgNTEgMTYuMjI1SDM4LjM5N2MtMi4wNTQgMC0zLjcwNy0xLjgyOS0zLjcwNy0zLjg3MnoiLz48cGF0aCBmaWxsPSIjMjE5QjM4IiBkPSJNMzguMjExIDE2LjIyNSA1MSAyMS40OHYtNS4yNTV6Ii8+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTE5LjEyIDMwLjk3NWMwLS44MTcuNjYyLTEuNDc1IDEuNDgzLTEuNDc1aDE3Ljc5NGMuODIxIDAgMS40ODIuNjU4IDEuNDgyIDEuNDc1djE1LjQ4N2MwIC44MTgtLjY2MSAxLjQ3NS0xLjQ4MiAxLjQ3NUgyMC42MDNhMS40NzYgMS40NzYgMCAwIDEtMS40ODItMS40NzRWMzAuOTc0em0yLjIyNSAxLjQ3NWg2LjY3MnYyLjIxMmgtNi42NzJ6bTAgNS4xNjJoNi42NzJ2Mi4yMTNoLTYuNjcyem0wIDUuMTYzaDYuNjcydjIuMjEyaC02LjY3MnptOS42MzgtMTAuMzI1aDYuNjcydjIuMjEyaC02LjY3MnptMCA1LjE2Mmg2LjY3MnYyLjIxM2gtNi42NzJ6bTAgNS4xNjNoNi42NzJ2Mi4yMTJoLTYuNjcyeiIvPjwvZz48L3N2Zz4="},"displayName":"Google Sheets","typeVersion":5,"nodeCategories":[{"id":3,"name":"Data & Storage"},{"id":4,"name":"Productivity"}]},{"id":19,"icon":"file:httprequest.svg","name":"n8n-nodes-base.httpRequest","codex":{"data":{"alias":["API","Request","URL","Build","cURL"],"resources":{"generic":[{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/automatically-pulling-and-visualizing-data-with-n8n/","icon":"📈","label":"Automatically pulling and visualizing data with n8n"},{"url":"https://n8n.io/blog/learn-how-to-automatically-cross-post-your-content-with-n8n/","icon":"✍️","label":"Learn how to automatically cross-post your content with n8n"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/running-n8n-on-ships-an-interview-with-maranics/","icon":"🛳","label":"Running n8n on ships: An interview with Maranics"},{"url":"https://n8n.io/blog/what-are-apis-how-to-use-them-with-no-code/","icon":" 🪢","label":"What are APIs and how to use them with no code"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/world-poetry-day-workflow/","icon":"📜","label":"Celebrating World Poetry Day with a daily poem in Telegram"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/automate-designs-with-bannerbear-and-n8n/","icon":"🎨","label":"Automate Designs with Bannerbear and n8n"},{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/building-an-expense-tracking-app-in-10-minutes/","icon":"📱","label":"Building an expense tracking app in 10 minutes"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/how-to-use-the-http-request-node-the-swiss-army-knife-for-workflow-automation/","icon":"🧰","label":"How to use the HTTP Request Node - The Swiss Army Knife for Workflow Automation"},{"url":"https://n8n.io/blog/learn-how-to-use-webhooks-with-mattermost-slash-commands/","icon":"🦄","label":"Learn how to use webhooks with Mattermost slash commands"},{"url":"https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/","icon":"📈","label":"How a Membership Development Manager automates his work and investments"},{"url":"https://n8n.io/blog/a-low-code-bitcoin-ticker-built-with-questdb-and-n8n-io/","icon":"📈","label":"A low-code bitcoin ticker built with QuestDB and n8n.io"},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/automations-for-activists/","icon":"✨","label":"How Common Knowledge use workflow automation for activism"},{"url":"https://n8n.io/blog/creating-scheduled-text-affirmations-with-n8n/","icon":"🤟","label":"Creating scheduled text affirmations with n8n"},{"url":"https://n8n.io/blog/how-goomer-automated-their-operations-with-over-200-n8n-workflows/","icon":"🛵","label":"How Goomer automated their operations with over 200 n8n workflows"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"output\"]","defaults":{"name":"HTTP Request","color":"#0004F5"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00MCAyMEM0MCA4Ljk1MzE0IDMxLjA0NjkgMCAyMCAwQzguOTUzMTQgMCAwIDguOTUzMTQgMCAyMEMwIDMxLjA0NjkgOC45NTMxNCA0MCAyMCA0MEMzMS4wNDY5IDQwIDQwIDMxLjA0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"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":20,"icon":"fa:map-signs","name":"n8n-nodes-base.if","codex":{"data":{"alias":["Router","Filter","Condition","Logic","Boolean","Branch"],"details":"The IF node can be used to implement binary conditional logic in your workflow. You can set up one-to-many conditions to evaluate each item of data being inputted into the node. That data will either evaluate to TRUE or FALSE and route out of the node accordingly.\n\nThis node has multiple types of conditions: Bool, String, Number, and Date & Time.","resources":{"generic":[{"url":"https://n8n.io/blog/learn-to-automate-your-factorys-incident-reporting-a-step-by-step-guide/","icon":"🏭","label":"Learn to Automate Your Factory's Incident Reporting: A Step by Step Guide"},{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/create-a-toxic-language-detector-for-telegram/","icon":"🤬","label":"Create a toxic language detector for Telegram in 4 step"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/","icon":"🔗","label":"How to build a low-code, self-hosted URL shortener in 3 steps"},{"url":"https://n8n.io/blog/automate-your-data-processing-pipeline-in-9-steps-with-n8n/","icon":"⚙️","label":"Automate your data processing pipeline in 9 steps"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/automation-for-maintainers-of-open-source-projects/","icon":"🏷️","label":"How to automatically manage contributions to open-source projects"},{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/","icon":"🎖","label":"Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.if/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow"]}}},"group":"[\"transform\"]","defaults":{"name":"If","color":"#408000"},"iconData":{"icon":"map-signs","type":"icon"},"displayName":"If","typeVersion":2,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":24,"icon":"file:merge.svg","name":"n8n-nodes-base.merge","codex":{"data":{"alias":["Join","Concatenate","Wait"],"resources":{"generic":[{"url":"https://n8n.io/blog/how-to-sync-data-between-two-systems/","icon":"🏬","label":"How to synchronize data between two systems (one-way vs. two-way sync"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n/","icon":"📈","label":"Migrating Community Metrics to Orbit using n8n"},{"url":"https://n8n.io/blog/build-your-own-virtual-assistant-with-n8n-a-step-by-step-guide/","icon":"👦","label":"Build your own virtual assistant with n8n: A step by step guide"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.merge/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Merge"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTc3XzUxOCkiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTAgNDhDMCAyMS40OTAzIDIxLjQ5MDMgMCA0OCAwSDExMkMxMzguNTEgMCAxNjAgMjEuNDkwMyAxNjAgNDhWNTZIMTk2LjI1MkMyNDAuNDM1IDU2IDI3Ni4yNTIgOTEuODE3MiAyNzYuMjUyIDEzNlYxOTJDMjc2LjI1MiAyMTQuMDkxIDI5NC4xNjEgMjMyIDMxNi4yNTIgMjMySDM1MlYyMjRDMzUyIDE5Ny40OSAzNzMuNDkgMTc2IDQwMCAxNzZINDY0QzQ5MC41MSAxNzYgNTEyIDE5Ny40OSA1MTIgMjI0VjI4OEM1MTIgMzE0LjUxIDQ5MC41MSAzMzYgND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QwMCAyMjcuNTgyIDQwMy41ODIgMjI0IDQwOCAyMjRINDU2Wk0xMTIgNDA4QzExMiA0MDMuNTgyIDEwOC40MTggNDAwIDEwNCA0MDBINTZDNTEuNTgxNyA0MDAgNDggNDAzLjU4MiA0OCA0MDhWNDU2QzQ4IDQ2MC40MTggNTEuNTgxNyA0NjQgNTYgNDY0SDEwNEMxMDguNDE4IDQ2NCAxMTIgNDYwLjQxOCAxMTIgNDU2VjQwOFoiIGZpbGw9IiM1NEI4QzkiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTc3XzUxOCI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},"displayName":"Merge","typeVersion":3,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":49,"icon":"file:telegram.svg","name":"n8n-nodes-base.telegram","codex":{"data":{"alias":["human","form","wait","hitl","approval"],"resources":{"generic":[{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/create-a-toxic-language-detector-for-telegram/","icon":"🤬","label":"Create a toxic language detector for Telegram in 4 step"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/world-poetry-day-workflow/","icon":"📜","label":"Celebrating World Poetry Day with a daily poem in Telegram"},{"url":"https://n8n.io/blog/using-automation-to-boost-productivity-in-the-workplace/","icon":"💪","label":"Using Automation to Boost Productivity in the Workplace"},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/creating-scheduled-text-affirmations-with-n8n/","icon":"🤟","label":"Creating scheduled text affirmations with n8n"},{"url":"https://n8n.io/blog/creating-telegram-bots-with-n8n-a-no-code-platform/","icon":"💬","label":"Creating Telegram Bots with n8n, a No-Code Platform"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.telegram/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/telegram/"}]},"categories":["Communication","HITL"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"HITL":["Human in the Loop"]}}},"group":"[\"output\"]","defaults":{"name":"Telegram"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiB2aWV3Qm94PSIwIDAgNjYgNjYiPjx1c2UgeGxpbms6aHJlZj0iI2EiIHg9Ii41IiB5PSIuNSIvPjxzeW1ib2wgaWQ9ImEiIG92ZXJmbG93PSJ2aXNpYmxlIj48ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0ibm9uZSI+PHBhdGggZmlsbD0iIzM3YWVlMiIgZD0iTTAgMzJjMCAxNy42NzMgMTQuMzI3IDMyIDMyIDMyczMyLTE0LjMyNyAzMi0zMlM0OS42NzMgMCAzMiAwIDAgMTQuMzI3IDAgMzIiLz48cGF0aCBmaWxsPSI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map-signs","name":"n8n-nodes-base.switch","codex":{"data":{"alias":["Router","If","Path","Filter","Condition","Logic","Branch","Case"],"resources":{"generic":[{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/build-your-own-virtual-assistant-with-n8n-a-step-by-step-guide/","icon":"👦","label":"Build your own virtual assistant with n8n: A step by step guide"},{"url":"https://n8n.io/blog/automation-for-maintainers-of-open-source-projects/","icon":"🏷️","label":"How to automatically manage contributions to open-source projects"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.switch/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow"]}}},"group":"[\"transform\"]","defaults":{"name":"Switch","color":"#506000"},"iconData":{"icon":"map-signs","type":"icon"},"displayName":"Switch","typeVersion":3,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":565,"icon":"fa:sticky-note","name":"n8n-nodes-base.stickyNote","codex":{"data":{"alias":["Comments","Notes","Sticky"],"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"input\"]","defaults":{"name":"Sticky Note","color":"#FFD233"},"iconData":{"icon":"sticky-note","type":"icon"},"displayName":"Sticky Note","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":834,"icon":"file:code.svg","name":"n8n-nodes-base.code","codex":{"data":{"alias":["cpde","Javascript","JS","Python","Script","Custom Code","Function"],"details":"The Code node allows you to execute JavaScript in your workflow.","resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Code"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTcxXzQ0MSkiPgo8cGF0aCBkPSJNMTcwLjI4MyA0OEgxOTYuNUMyMDMuMTI3IDQ4IDIwOC41IDQyLjYyNzQgMjA4LjUgMzZWMTJDMjA4LjUgNS4zNzI1OCAyMDMuMTI3IDAgMTk2LjUgMEgxNzAuMjgzQzEyNi4xIDAgOTAuMjgzIDM1LjgxNzIgOTAuMjgzIDgwVjE3NkM5MC4yODMgMjA2LjkyOCA2NS4yMTA5IDIzMiAzNC4yODMgMjMySDIzQzE2LjM3MjYgMjMyIDExIDIzNy4zNzIgMTEgMjQ0VjI2OEMxMSAyNzQuNjI3IDE2LjM3MjQgMjgwIDIyLjk5OTYgMjgwTDM0LjI4MyAyODBDNjUuMjEwOSAyODAgOTAuMjgzIDMwNS4wNzIgOTAuMjgzIDMzNlY0NDBDOTAuMjgzIDQ3OS43NjQgMTIyLjUxOCA1MTIgMTYyLjI4MyA1MTJIMTk2LjVDMjAzLjEyNyA1MTIgMjA4LjUgNTA2LjYyNyAyMDguNSA1MDBWNDc2QzIwOC41IDQ2OS4zNzMgMjAzLjEyNyA0NjQgMTk2LjUgNDY0SDE2Mi4yODNDMTQ5LjAyOCA0NjQgMTM4LjI4MyA0NTMuMjU1IDEzOC4yODMgNDQwVjMzNkMxMzguMjgzIDMwOS4wMjIgMTI4LjAxMSAyODQuNDQzIDExMS4xNjQgMjY1Ljk2MUMxMDYuMTA5IDI2MC40MTYgMTA2LjEwOSAyNTEuNTg0IDExMS4xN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PC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTcxXzQ0MSI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},"displayName":"Code","typeVersion":2,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":839,"icon":"fa:clock","name":"n8n-nodes-base.scheduleTrigger","codex":{"data":{"alias":["Time","Scheduler","Polling","Cron","Interval"],"resources":{"generic":[],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"trigger\",\"schedule\"]","defaults":{"name":"Schedule Trigger","color":"#31C49F"},"iconData":{"icon":"clock","type":"icon"},"displayName":"Schedule Trigger","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":1119,"icon":"fa:robot","name":"@n8n/n8n-nodes-langchain.agent","codex":{"data":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Agents","Root Nodes"]}}},"group":"[\"transform\"]","defaults":{"name":"AI Agent","color":"#404040"},"iconData":{"icon":"robot","type":"icon"},"displayName":"AI Agent","typeVersion":3,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]},{"id":1151,"icon":"file:ollama.svg","name":"@n8n/n8n-nodes-langchain.lmChatOllama","codex":{"data":{"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatollama/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]}}},"group":"[\"transform\"]","defaults":{"name":"Ollama Chat Model"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNDEuMzMzIiBoZWlnaHQ9IjM0MS4zMzMiIHZlcnNpb249IjEuMCIgdmlld0JveD0iMCAwIDE4MSAyNTYiPjxnIGZpbGw9IiM3RDdEODciPjxwYXRoIGQ9Ik0zNy43IDE5LjVjLTUuMiAxLjgtOC4zIDQuOS0xMS43IDExLjYtNC41IDguOS02LjIgMTkuMi01LjggMzUuNWwuMyAxNC4yLTUuOCA2LjFjLTE0LjggMTUuNS0xOC41IDM4LjctOS4yIDU3LjRsMy40IDYuOS0yIDQuNGMtMy40IDguMi01IDE2LjQtNSAyNi4zIDAgMTAuOCAxLjggMTkgNS44IDI2LjJsMi42IDQuOC0yLjEgNC45Yy0xLjIgMi43LTIuNiA3LjEtMy4yIDkuOC0xLjQgNi4yLTEuNSAyMi4xLS4xIDI1LjcgMSAyLjYgMS40IDIuNyA3LjYgMi43IDcuMyAwIDcgLjQgNS4zLTguNi0xLjUtOC4yLjItMTguOCA0LjItMjYuNiAzLjctNyAzLjgtMTAuNC41LTE0LjgtNC43LTYuNC02LjgtMTMuNi02LjktMjQtLjEtMTAuMyAxLjQtMTYgNi42LTI2LjEgMy4xLTYuMSAyLjktOC43LTEtMTIuMi0xLjEtMS0zLjEtNC4yLTQuMy03LTEuOS00LjItMi40LTYuOS0yLjMtMTQuMiAwLTExLjQgMi41LTE4LjMgOS41LTI2IDctNy42IDE0LjItMTEgMjMuOS0xMS4yIDQuMSAwIDcuOC0uMiA4LjItLjIuNC0uMSAxLjctMi4yIDIuOS00LjcgMy01LjkgOS42LTExLjkgMTYuNy0xNS4yIDQuOS0yLjMgNy0yLjcgMTQuNy0yLjcgNy45IDAgOS43LjQgMTQuOSAyLjkgNi44IDMuMyAxMy4zIDku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y4yLTIgMC00LjUuNi01LjQgMS4ybTg5LjggMmMtMy4yIDMuOC0yLjkgNy44IDEuMSAxMS45IDMuMiAzLjMgNC45IDMuOCA5LjIgMi43IDQuOS0xLjMgNi44LTYuMiA0LjYtMTEuOC0xLjktNC43LTMuOC02LTguNy02LTIuNyAwLTQuMS43LTYuMiAzLjIiLz48L2c+PC9zdmc+"},"displayName":"Ollama Chat Model","typeVersion":1,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]}],"categories":[{"id":33,"name":"Social Media"},{"id":49,"name":"AI Summarization"}],"image":[]}}