[{"data":1,"prerenderedAt":1023},["ShallowReactive",2],{"article-alternates":3,"article-\u002Fen\u002Fai\u002Fn8n-claude-api-marketing-operations-autonomy":13},{"i18nKey":4,"paths":5},"ai-005-2026-08",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11,"tr":12},"\u002Fde\u002Fai\u002Fn8n-claude-api-marketing-operations-autonomy","\u002Fen\u002Fai\u002Fn8n-claude-api-marketing-operations-autonomy","\u002Fes\u002Fai\u002Fn8n-claude-api-autonomia-operaciones-marketing","\u002Ffr\u002Fai\u002Fn8n-claude-api-automatisation-operationnelle-marketing","\u002Fit\u002Fai\u002Fn8n-claude-api-automazione-operazioni-marketing","\u002Fru\u002Fai\u002Fn8n-claude-api-avtonomiya-v-marketingovykh-operatsiyakh","\u002Ftr\u002Fai\u002Fn8n-claude-api-pazarlama-operasyonunda-otonomi",{"_path":7,"_dir":14,"_draft":15,"_partial":15,"_locale":16,"title":17,"description":18,"publishedAt":19,"modifiedAt":19,"category":14,"i18nKey":4,"tags":20,"readingTime":26,"author":27,"body":28,"_type":1017,"_id":1018,"_source":1019,"_file":1020,"_stem":1021,"_extension":1022},"ai",false,"","n8n + Claude API: Autonomy in Marketing Operations","Production architecture for autonomous workflows: idempotency, error handling, and state tracking. Design that powered 200+ articles without manual intervention.","2026-08-01",[21,22,23,24,25],"n8n","claude-api","workflow-automation","idempotency","llm-engineering",8,"Roibase",{"type":29,"children":30,"toc":1008},"root",[31,39,46,51,56,61,67,72,86,304,309,315,320,333,530,535,541,546,582,611,616,818,831,837,842,888,893,912,917,923,928,970,976,981,986,1002],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36],{"type":37,"value":38},"text","Automation in marketing operations has moved beyond \"send email on schedule.\" When LLMs like Claude 3.5 Sonnet enter production, the real question isn't how many seconds your workflow completes in — it's how you've architected error handling. The n8n + Claude API combination gave us the ability to generate 200+ articles without manual intervention. But that outcome came from proper idempotency design, retry strategy, and state tracking.",{"type":32,"tag":40,"props":41,"children":43},"h2",{"id":42},"defining-an-autonomous-workflow",[44],{"type":37,"value":45},"Defining an autonomous workflow",{"type":32,"tag":33,"props":47,"children":48},{},[49],{"type":37,"value":50},"An autonomous workflow completes end-to-end without human intervention. If you can \"run and forget,\" it's autonomous. In marketing operations, this means: pull keywords from Google Search Console, send to Claude, receive content, commit to GitHub, manage versioning — all triggered once.",{"type":32,"tag":33,"props":52,"children":53},{},[54],{"type":37,"value":55},"n8n is the orchestrator here. It's triggered via webhook, maintains state between steps, and deploys retry logic on failure. Claude API is the content generator — but you need to structure generation so it never requires manual supervision. If you hardcode your prompt inside n8n, every refinement means updating the workflow in 15 places. Version your prompt from the start.",{"type":32,"tag":33,"props":57,"children":58},{},[59],{"type":37,"value":60},"Our setup runs on a self-hosted n8n instance. Five workflow nodes: webhook trigger, HTTP request to Claude API, data transformation, GitHub API commit, Supabase logging. Total execution: ~3 minutes. 90 seconds is Claude generating 1,500 words; the rest is I\u002FO.",{"type":32,"tag":40,"props":62,"children":64},{"id":63},"idempotency-same-input-same-output-guarantee",[65],{"type":37,"value":66},"Idempotency: same input, same output guarantee",{"type":32,"tag":33,"props":68,"children":69},{},[70],{"type":37,"value":71},"Idempotency means running the same operation multiple times yields an identical result set. LLM-based workflows don't naturally provide this — the same prompt produces different output. But your file system and commit logic must be idempotent.",{"type":32,"tag":33,"props":73,"children":74},{},[75,77,84],{"type":37,"value":76},"Our approach: every piece of content is tied to a unique identifier (i18nKey). Format: ",{"type":32,"tag":78,"props":79,"children":81},"code",{"className":80},[],[82],{"type":37,"value":83},"{category}-{seq}-{YYYY-MM}",{"type":37,"value":85},". The n8n workflow generates this key, passes it to Claude, and uses it for the file path. If triggered a second time with the same keyword, Supabase checks for the key — if present, SKIP; if absent, PROCESS.",{"type":32,"tag":87,"props":88,"children":92},"pre",{"className":89,"code":90,"language":91,"meta":16,"style":16},"language-javascript shiki shiki-themes github-dark","\u002F\u002F n8n Function node — idempotency check\nconst existingRecord = await $('Supabase').first().json.data.find(\n  (r) => r.i18n_key === $json.i18nKey\n);\nif (existingRecord) {\n  return { skip: true, reason: 'already_published' };\n}\nreturn { skip: false };\n","javascript",[93],{"type":32,"tag":78,"props":94,"children":95},{"__ignoreMap":16},[96,108,177,217,226,240,274,283],{"type":32,"tag":97,"props":98,"children":101},"span",{"class":99,"line":100},"line",1,[102],{"type":32,"tag":97,"props":103,"children":105},{"style":104},"--shiki-default:#6A737D",[106],{"type":37,"value":107},"\u002F\u002F n8n Function node — idempotency check\n",{"type":32,"tag":97,"props":109,"children":111},{"class":99,"line":110},2,[112,118,124,129,134,140,146,152,157,162,167,172],{"type":32,"tag":97,"props":113,"children":115},{"style":114},"--shiki-default:#F97583",[116],{"type":37,"value":117},"const",{"type":32,"tag":97,"props":119,"children":121},{"style":120},"--shiki-default:#79B8FF",[122],{"type":37,"value":123}," existingRecord",{"type":32,"tag":97,"props":125,"children":126},{"style":114},[127],{"type":37,"value":128}," =",{"type":32,"tag":97,"props":130,"children":131},{"style":114},[132],{"type":37,"value":133}," await",{"type":32,"tag":97,"props":135,"children":137},{"style":136},"--shiki-default:#B392F0",[138],{"type":37,"value":139}," $",{"type":32,"tag":97,"props":141,"children":143},{"style":142},"--shiki-default:#E1E4E8",[144],{"type":37,"value":145},"(",{"type":32,"tag":97,"props":147,"children":149},{"style":148},"--shiki-default:#9ECBFF",[150],{"type":37,"value":151},"'Supabase'",{"type":32,"tag":97,"props":153,"children":154},{"style":142},[155],{"type":37,"value":156},").",{"type":32,"tag":97,"props":158,"children":159},{"style":136},[160],{"type":37,"value":161},"first",{"type":32,"tag":97,"props":163,"children":164},{"style":142},[165],{"type":37,"value":166},"().json.data.",{"type":32,"tag":97,"props":168,"children":169},{"style":136},[170],{"type":37,"value":171},"find",{"type":32,"tag":97,"props":173,"children":174},{"style":142},[175],{"type":37,"value":176},"(\n",{"type":32,"tag":97,"props":178,"children":180},{"class":99,"line":179},3,[181,186,192,197,202,207,212],{"type":32,"tag":97,"props":182,"children":183},{"style":142},[184],{"type":37,"value":185},"  (",{"type":32,"tag":97,"props":187,"children":189},{"style":188},"--shiki-default:#FFAB70",[190],{"type":37,"value":191},"r",{"type":32,"tag":97,"props":193,"children":194},{"style":142},[195],{"type":37,"value":196},") ",{"type":32,"tag":97,"props":198,"children":199},{"style":114},[200],{"type":37,"value":201},"=>",{"type":32,"tag":97,"props":203,"children":204},{"style":142},[205],{"type":37,"value":206}," r.i18n_key ",{"type":32,"tag":97,"props":208,"children":209},{"style":114},[210],{"type":37,"value":211},"===",{"type":32,"tag":97,"props":213,"children":214},{"style":142},[215],{"type":37,"value":216}," $json.i18nKey\n",{"type":32,"tag":97,"props":218,"children":220},{"class":99,"line":219},4,[221],{"type":32,"tag":97,"props":222,"children":223},{"style":142},[224],{"type":37,"value":225},");\n",{"type":32,"tag":97,"props":227,"children":229},{"class":99,"line":228},5,[230,235],{"type":32,"tag":97,"props":231,"children":232},{"style":114},[233],{"type":37,"value":234},"if",{"type":32,"tag":97,"props":236,"children":237},{"style":142},[238],{"type":37,"value":239}," (existingRecord) {\n",{"type":32,"tag":97,"props":241,"children":243},{"class":99,"line":242},6,[244,249,254,259,264,269],{"type":32,"tag":97,"props":245,"children":246},{"style":114},[247],{"type":37,"value":248},"  return",{"type":32,"tag":97,"props":250,"children":251},{"style":142},[252],{"type":37,"value":253}," { skip: ",{"type":32,"tag":97,"props":255,"children":256},{"style":120},[257],{"type":37,"value":258},"true",{"type":32,"tag":97,"props":260,"children":261},{"style":142},[262],{"type":37,"value":263},", reason: ",{"type":32,"tag":97,"props":265,"children":266},{"style":148},[267],{"type":37,"value":268},"'already_published'",{"type":32,"tag":97,"props":270,"children":271},{"style":142},[272],{"type":37,"value":273}," };\n",{"type":32,"tag":97,"props":275,"children":277},{"class":99,"line":276},7,[278],{"type":32,"tag":97,"props":279,"children":280},{"style":142},[281],{"type":37,"value":282},"}\n",{"type":32,"tag":97,"props":284,"children":285},{"class":99,"line":26},[286,291,295,300],{"type":32,"tag":97,"props":287,"children":288},{"style":114},[289],{"type":37,"value":290},"return",{"type":32,"tag":97,"props":292,"children":293},{"style":142},[294],{"type":37,"value":253},{"type":32,"tag":97,"props":296,"children":297},{"style":120},[298],{"type":37,"value":299},"false",{"type":32,"tag":97,"props":301,"children":302},{"style":142},[303],{"type":37,"value":273},{"type":32,"tag":33,"props":305,"children":306},{},[307],{"type":37,"value":308},"When committing to GitHub, the same filename is checked. If the file exists, GitHub returns a 409 Conflict. The n8n error handler catches this and logs it — the workflow doesn't crash. In a batch of 50 keywords, if 3 were already generated, only 47 are processed.",{"type":32,"tag":40,"props":310,"children":312},{"id":311},"claude-api-prompt-versioning-and-token-budget",[313],{"type":37,"value":314},"Claude API: prompt versioning and token budget",{"type":32,"tag":33,"props":316,"children":317},{},[318],{"type":37,"value":319},"Running Claude API in production requires one critical thing: prompt stability. Hardcoding your prompt inside n8n means manual workflow edits on every iteration. Instead, store your prompt as a Markdown file in GitHub and fetch it via raw URL.",{"type":32,"tag":33,"props":321,"children":322},{},[323,325,331],{"type":37,"value":324},"Our setup: ",{"type":32,"tag":78,"props":326,"children":328},{"className":327},[],[329],{"type":37,"value":330},"prompts\u002Froibase-master-en.md",{"type":37,"value":332}," lives in GitHub. An n8n HTTP Request node fetches this URL, passes its content as the SYSTEM message to Claude. The USER message is dynamically populated in the workflow — keyword, category, internal link list, today's date, and other contextual variables.",{"type":32,"tag":87,"props":334,"children":338},{"className":335,"code":336,"language":337,"meta":16,"style":16},"language-json shiki shiki-themes github-dark","{\n  \"model\": \"claude-3-5-sonnet-20241022\",\n  \"max_tokens\": 200000,\n  \"system\": \"{{$node[\"Fetch_Prompt\"].json.content}}\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"KEYWORD: {{$json.keyword}}\\nCATEGORY: {{$json.category}}\\n...\"\n    }\n  ]\n}\n","json",[339],{"type":32,"tag":78,"props":340,"children":341},{"__ignoreMap":16},[342,350,373,394,426,439,447,468,504,513,522],{"type":32,"tag":97,"props":343,"children":344},{"class":99,"line":100},[345],{"type":32,"tag":97,"props":346,"children":347},{"style":142},[348],{"type":37,"value":349},"{\n",{"type":32,"tag":97,"props":351,"children":352},{"class":99,"line":110},[353,358,363,368],{"type":32,"tag":97,"props":354,"children":355},{"style":120},[356],{"type":37,"value":357},"  \"model\"",{"type":32,"tag":97,"props":359,"children":360},{"style":142},[361],{"type":37,"value":362},": ",{"type":32,"tag":97,"props":364,"children":365},{"style":148},[366],{"type":37,"value":367},"\"claude-3-5-sonnet-20241022\"",{"type":32,"tag":97,"props":369,"children":370},{"style":142},[371],{"type":37,"value":372},",\n",{"type":32,"tag":97,"props":374,"children":375},{"class":99,"line":179},[376,381,385,390],{"type":32,"tag":97,"props":377,"children":378},{"style":120},[379],{"type":37,"value":380},"  \"max_tokens\"",{"type":32,"tag":97,"props":382,"children":383},{"style":142},[384],{"type":37,"value":362},{"type":32,"tag":97,"props":386,"children":387},{"style":120},[388],{"type":37,"value":389},"200000",{"type":32,"tag":97,"props":391,"children":392},{"style":142},[393],{"type":37,"value":372},{"type":32,"tag":97,"props":395,"children":396},{"class":99,"line":219},[397,402,406,411,417,422],{"type":32,"tag":97,"props":398,"children":399},{"style":120},[400],{"type":37,"value":401},"  \"system\"",{"type":32,"tag":97,"props":403,"children":404},{"style":142},[405],{"type":37,"value":362},{"type":32,"tag":97,"props":407,"children":408},{"style":148},[409],{"type":37,"value":410},"\"{{$node[\"",{"type":32,"tag":97,"props":412,"children":414},{"style":413},"--shiki-default:#FDAEB7;--shiki-default-font-style:italic",[415],{"type":37,"value":416},"Fetch_Prompt",{"type":32,"tag":97,"props":418,"children":419},{"style":148},[420],{"type":37,"value":421},"\"].json.content}}\"",{"type":32,"tag":97,"props":423,"children":424},{"style":142},[425],{"type":37,"value":372},{"type":32,"tag":97,"props":427,"children":428},{"class":99,"line":228},[429,434],{"type":32,"tag":97,"props":430,"children":431},{"style":120},[432],{"type":37,"value":433},"  \"messages\"",{"type":32,"tag":97,"props":435,"children":436},{"style":142},[437],{"type":37,"value":438},": [\n",{"type":32,"tag":97,"props":440,"children":441},{"class":99,"line":242},[442],{"type":32,"tag":97,"props":443,"children":444},{"style":142},[445],{"type":37,"value":446},"    {\n",{"type":32,"tag":97,"props":448,"children":449},{"class":99,"line":276},[450,455,459,464],{"type":32,"tag":97,"props":451,"children":452},{"style":120},[453],{"type":37,"value":454},"      \"role\"",{"type":32,"tag":97,"props":456,"children":457},{"style":142},[458],{"type":37,"value":362},{"type":32,"tag":97,"props":460,"children":461},{"style":148},[462],{"type":37,"value":463},"\"user\"",{"type":32,"tag":97,"props":465,"children":466},{"style":142},[467],{"type":37,"value":372},{"type":32,"tag":97,"props":469,"children":470},{"class":99,"line":26},[471,476,480,485,490,495,499],{"type":32,"tag":97,"props":472,"children":473},{"style":120},[474],{"type":37,"value":475},"      \"content\"",{"type":32,"tag":97,"props":477,"children":478},{"style":142},[479],{"type":37,"value":362},{"type":32,"tag":97,"props":481,"children":482},{"style":148},[483],{"type":37,"value":484},"\"KEYWORD: {{$json.keyword}}",{"type":32,"tag":97,"props":486,"children":487},{"style":120},[488],{"type":37,"value":489},"\\n",{"type":32,"tag":97,"props":491,"children":492},{"style":148},[493],{"type":37,"value":494},"CATEGORY: {{$json.category}}",{"type":32,"tag":97,"props":496,"children":497},{"style":120},[498],{"type":37,"value":489},{"type":32,"tag":97,"props":500,"children":501},{"style":148},[502],{"type":37,"value":503},"...\"\n",{"type":32,"tag":97,"props":505,"children":507},{"class":99,"line":506},9,[508],{"type":32,"tag":97,"props":509,"children":510},{"style":142},[511],{"type":37,"value":512},"    }\n",{"type":32,"tag":97,"props":514,"children":516},{"class":99,"line":515},10,[517],{"type":32,"tag":97,"props":518,"children":519},{"style":142},[520],{"type":37,"value":521},"  ]\n",{"type":32,"tag":97,"props":523,"children":525},{"class":99,"line":524},11,[526],{"type":32,"tag":97,"props":527,"children":528},{"style":142},[529],{"type":37,"value":282},{"type":32,"tag":33,"props":531,"children":532},{},[533],{"type":37,"value":534},"Token budget: Claude 3.5 Sonnet's context window is 200K tokens. Our prompt consumes ~8K (master prompt + category guidance), USER message ~500 tokens, Claude's output ~2.5K tokens (1,500 words). Total: ~11K tokens per run. With batch pricing, cost per run is ~$0.04. 200 articles = $8 in API costs.",{"type":32,"tag":40,"props":536,"children":538},{"id":537},"error-handling-retry-fallback-and-state-logging",[539],{"type":37,"value":540},"Error handling: retry, fallback, and state logging",{"type":32,"tag":33,"props":542,"children":543},{},[544],{"type":37,"value":545},"LLM workflows encounter three error classes: transient (rate limit), permanent (malformed output), and unexpected (network timeout). n8n's error handler can't distinguish between them — you must architect the retry strategy.",{"type":32,"tag":33,"props":547,"children":548},{},[549,551,557,559,565,566,572,574,580],{"type":37,"value":550},"Our approach: explicit retry settings on each node. The HTTP Request (Claude API) node has ",{"type":32,"tag":78,"props":552,"children":554},{"className":553},[],[555],{"type":37,"value":556},"retryOnFail: true",{"type":37,"value":558},", ",{"type":32,"tag":78,"props":560,"children":562},{"className":561},[],[563],{"type":37,"value":564},"maxRetries: 3",{"type":37,"value":558},{"type":32,"tag":78,"props":567,"children":569},{"className":568},[],[570],{"type":37,"value":571},"waitBetweenTries: 5000ms",{"type":37,"value":573},". On rate limit (429), exponential backoff applies. If all 3 attempts fail, an error catching node fires — it writes a ",{"type":32,"tag":78,"props":575,"children":577},{"className":576},[],[578],{"type":37,"value":579},"failed_generation",{"type":37,"value":581}," log to Supabase, the workflow halts, but other keywords continue processing.",{"type":32,"tag":33,"props":583,"children":584},{},[585,587,593,595,601,603,609],{"type":37,"value":586},"For malformed output (Claude produces fewer than 1,400 words or missing frontmatter), a validation node activates. It parses JSON, checks ",{"type":32,"tag":78,"props":588,"children":590},{"className":589},[],[591],{"type":37,"value":592},"readingTime",{"type":37,"value":594}," and ",{"type":32,"tag":78,"props":596,"children":598},{"className":597},[],[599],{"type":37,"value":600},"title",{"type":37,"value":602}," fields. If validation fails, Claude receives: \"regenerate with stricter length constraint\" — this time ",{"type":32,"tag":78,"props":604,"children":606},{"className":605},[],[607],{"type":37,"value":608},"max_tokens",{"type":37,"value":610}," increases. On the second attempt, if still invalid, the item falls into a manual review queue.",{"type":32,"tag":33,"props":612,"children":613},{},[614],{"type":37,"value":615},"State logging in Supabase uses this schema:",{"type":32,"tag":617,"props":618,"children":619},"table",{},[620,644],{"type":32,"tag":621,"props":622,"children":623},"thead",{},[624],{"type":32,"tag":625,"props":626,"children":627},"tr",{},[628,634,639],{"type":32,"tag":629,"props":630,"children":631},"th",{},[632],{"type":37,"value":633},"Field",{"type":32,"tag":629,"props":635,"children":636},{},[637],{"type":37,"value":638},"Type",{"type":32,"tag":629,"props":640,"children":641},{},[642],{"type":37,"value":643},"Purpose",{"type":32,"tag":645,"props":646,"children":647},"tbody",{},[648,670,691,731,753,775,797],{"type":32,"tag":625,"props":649,"children":650},{},[651,661,665],{"type":32,"tag":652,"props":653,"children":654},"td",{},[655],{"type":32,"tag":78,"props":656,"children":658},{"className":657},[],[659],{"type":37,"value":660},"i18n_key",{"type":32,"tag":652,"props":662,"children":663},{},[664],{"type":37,"value":37},{"type":32,"tag":652,"props":666,"children":667},{},[668],{"type":37,"value":669},"Unique identifier",{"type":32,"tag":625,"props":671,"children":672},{},[673,682,686],{"type":32,"tag":652,"props":674,"children":675},{},[676],{"type":32,"tag":78,"props":677,"children":679},{"className":678},[],[680],{"type":37,"value":681},"keyword",{"type":32,"tag":652,"props":683,"children":684},{},[685],{"type":37,"value":37},{"type":32,"tag":652,"props":687,"children":688},{},[689],{"type":37,"value":690},"GSC query",{"type":32,"tag":625,"props":692,"children":693},{},[694,703,708],{"type":32,"tag":652,"props":695,"children":696},{},[697],{"type":32,"tag":78,"props":698,"children":700},{"className":699},[],[701],{"type":37,"value":702},"status",{"type":32,"tag":652,"props":704,"children":705},{},[706],{"type":37,"value":707},"enum",{"type":32,"tag":652,"props":709,"children":710},{},[711,717,718,724,725],{"type":32,"tag":78,"props":712,"children":714},{"className":713},[],[715],{"type":37,"value":716},"pending",{"type":37,"value":558},{"type":32,"tag":78,"props":719,"children":721},{"className":720},[],[722],{"type":37,"value":723},"generated",{"type":37,"value":558},{"type":32,"tag":78,"props":726,"children":728},{"className":727},[],[729],{"type":37,"value":730},"failed",{"type":32,"tag":625,"props":732,"children":733},{},[734,743,748],{"type":32,"tag":652,"props":735,"children":736},{},[737],{"type":32,"tag":78,"props":738,"children":740},{"className":739},[],[741],{"type":37,"value":742},"retry_count",{"type":32,"tag":652,"props":744,"children":745},{},[746],{"type":37,"value":747},"int",{"type":32,"tag":652,"props":749,"children":750},{},[751],{"type":37,"value":752},"Number of retries performed",{"type":32,"tag":625,"props":754,"children":755},{},[756,765,770],{"type":32,"tag":652,"props":757,"children":758},{},[759],{"type":32,"tag":78,"props":760,"children":762},{"className":761},[],[763],{"type":37,"value":764},"error_log",{"type":32,"tag":652,"props":766,"children":767},{},[768],{"type":37,"value":769},"jsonb",{"type":32,"tag":652,"props":771,"children":772},{},[773],{"type":37,"value":774},"Error details",{"type":32,"tag":625,"props":776,"children":777},{},[778,787,792],{"type":32,"tag":652,"props":779,"children":780},{},[781],{"type":32,"tag":78,"props":782,"children":784},{"className":783},[],[785],{"type":37,"value":786},"created_at",{"type":32,"tag":652,"props":788,"children":789},{},[790],{"type":37,"value":791},"timestamp",{"type":32,"tag":652,"props":793,"children":794},{},[795],{"type":37,"value":796},"First run timestamp",{"type":32,"tag":625,"props":798,"children":799},{},[800,809,813],{"type":32,"tag":652,"props":801,"children":802},{},[803],{"type":32,"tag":78,"props":804,"children":806},{"className":805},[],[807],{"type":37,"value":808},"completed_at",{"type":32,"tag":652,"props":810,"children":811},{},[812],{"type":37,"value":791},{"type":32,"tag":652,"props":814,"children":815},{},[816],{"type":37,"value":817},"Completion time (null if ongoing)",{"type":32,"tag":33,"props":819,"children":820},{},[821,823,829],{"type":37,"value":822},"This table serves both monitoring and debugging. In Grafana, records with ",{"type":32,"tag":78,"props":824,"children":826},{"className":825},[],[827],{"type":37,"value":828},"retry_count > 2",{"type":37,"value":830}," appear on the dashboard — showing which keywords consistently cause Claude to stall.",{"type":32,"tag":40,"props":832,"children":834},{"id":833},"production-results-200-articles-4-failure-rate",[835],{"type":37,"value":836},"Production results: 200+ articles, 4% failure rate",{"type":32,"tag":33,"props":838,"children":839},{},[840],{"type":37,"value":841},"We manually supervised the first 50 articles. The next 150 ran fully autonomous. Results:",{"type":32,"tag":843,"props":844,"children":845},"ul",{},[846,858,868,878],{"type":32,"tag":847,"props":848,"children":849},"li",{},[850,856],{"type":32,"tag":851,"props":852,"children":853},"strong",{},[854],{"type":37,"value":855},"Success rate:",{"type":37,"value":857}," 96% (192\u002F200)",{"type":32,"tag":847,"props":859,"children":860},{},[861,866],{"type":32,"tag":851,"props":862,"children":863},{},[864],{"type":37,"value":865},"Average completion time:",{"type":37,"value":867}," 3.2 minutes",{"type":32,"tag":847,"props":869,"children":870},{},[871,876],{"type":32,"tag":851,"props":872,"children":873},{},[874],{"type":37,"value":875},"Rate limit hits:",{"type":37,"value":877}," 7 (all recovered via retry)",{"type":32,"tag":847,"props":879,"children":880},{},[881,886],{"type":32,"tag":851,"props":882,"children":883},{},[884],{"type":37,"value":885},"Manual intervention required:",{"type":37,"value":887}," 8 articles (malformed output + keyword ambiguity)",{"type":32,"tag":33,"props":889,"children":890},{},[891],{"type":37,"value":892},"Half the failures came from overly generic keywords (\"digital marketing\" equivalents). Claude struggles to reach 1,500 words on such broad topics — it generates filler. The validation node catches this but regeneration can't fix it. Solution: blacklist the keyword.",{"type":32,"tag":33,"props":894,"children":895},{},[896,898,903,905,910],{"type":37,"value":897},"The other half: GitHub API returned 409 Conflict (file exists but no Supabase record — race condition). We fixed this by adding an atomicity check: write ",{"type":32,"tag":78,"props":899,"children":901},{"className":900},[],[902],{"type":37,"value":716},{"type":37,"value":904}," status to Supabase before committing to GitHub; only update to ",{"type":32,"tag":78,"props":906,"children":908},{"className":907},[],[909],{"type":37,"value":723},{"type":37,"value":911}," after successful commit. Failure rate dropped from 4% to 1.5%.",{"type":32,"tag":33,"props":913,"children":914},{},[915],{"type":37,"value":916},"Latency breakdown: 90 seconds Claude API, 45 seconds GitHub commit (large Markdown files), 15 seconds Supabase write, 30 seconds n8n internal processing. Claude is the bottleneck — but parallelization isn't worth it due to rate limits. We batch process: 10 keywords per hour, 240 per day capacity.",{"type":32,"tag":40,"props":918,"children":920},{"id":919},"tradeoffs-what-we-gained-what-we-lost",[921],{"type":37,"value":922},"Tradeoffs: what we gained, what we lost",{"type":32,"tag":33,"props":924,"children":925},{},[926],{"type":37,"value":927},"Building autonomous workflows involves three major tradeoffs:",{"type":32,"tag":929,"props":930,"children":931},"ol",{},[932,942,952],{"type":32,"tag":847,"props":933,"children":934},{},[935,940],{"type":32,"tag":851,"props":936,"children":937},{},[938],{"type":37,"value":939},"Quality vs speed:",{"type":37,"value":941}," Claude's output quality depends on prompt tuning. Early versions had 40% rejection — adding \"1,400–1,600 words MANDATORY\" to the prompt dropped it to 4%. But Claude sometimes generates filler to hit the target. Humans notice; automation doesn't.",{"type":32,"tag":847,"props":943,"children":944},{},[945,950],{"type":32,"tag":851,"props":946,"children":947},{},[948],{"type":37,"value":949},"Cost vs reliability:",{"type":37,"value":951}," Aggressive retry logic increases token spend. Initially, every retry sent the full prompt (8K tokens × 3 = 24K). Now retries send only the USER message; the SYSTEM prompt is cached (Claude's prompt caching feature, available since May 2025). Cost dropped 60%.",{"type":32,"tag":847,"props":953,"children":954},{},[955,960,962,968],{"type":32,"tag":851,"props":956,"children":957},{},[958],{"type":37,"value":959},"Flexibility vs complexity:",{"type":37,"value":961}," We wanted category-specific prompts (AI content more technical, marketing content more business-focused). That's 6 separate prompt files — versioning nightmare. Solution: single master prompt + category-specific ",{"type":32,"tag":78,"props":963,"children":965},{"className":964},[],[966],{"type":37,"value":967},"CATEGORY_GUIDANCE",{"type":37,"value":969}," block appended to USER message. Complexity increased, but flexibility improved.",{"type":32,"tag":40,"props":971,"children":973},{"id":972},"next-steps-multi-agent-and-self-healing",[974],{"type":37,"value":975},"Next steps: multi-agent and self-healing",{"type":32,"tag":33,"props":977,"children":978},{},[979],{"type":37,"value":980},"Current setup is single-agent — Claude works alone. Next iteration tests multi-agent architecture: one agent generates content, another reviews, a third optimizes for SEO. n8n's sub-workflow feature supports this, but token cost triples.",{"type":32,"tag":33,"props":982,"children":983},{},[984],{"type":37,"value":985},"Self-healing means: when a workflow fails, analyze root cause and fix itself. Example: if Claude consistently produces short content, append \"output length must increase\" to the prompt and retry. Meta-optimization — the LLM evolving its own prompt. Risky but effective.",{"type":32,"tag":33,"props":987,"children":988},{},[989,991,1000],{"type":37,"value":990},"In Roibase's ",{"type":32,"tag":992,"props":993,"children":997},"a",{"href":994,"rel":995},"https:\u002F\u002Fwww.roibase.com.tr\u002Fen\u002Ffirstparty",[996],"nofollow",[998],{"type":37,"value":999},"First-Party Data & Measurement Architecture",{"type":37,"value":1001}," work, we use similar principles: autonomously collect conversion signals, detect anomalies, self-correct. Building autonomous systems in production boils down to one core principle: architect error handling from day one, log state thoroughly, and make retry logic idempotent.",{"type":32,"tag":1003,"props":1004,"children":1005},"style",{},[1006],{"type":37,"value":1007},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":16,"searchDepth":179,"depth":179,"links":1009},[1010,1011,1012,1013,1014,1015,1016],{"id":42,"depth":110,"text":45},{"id":63,"depth":110,"text":66},{"id":311,"depth":110,"text":314},{"id":537,"depth":110,"text":540},{"id":833,"depth":110,"text":836},{"id":919,"depth":110,"text":922},{"id":972,"depth":110,"text":975},"markdown","content:en:ai:n8n-claude-api-marketing-operations-autonomy.md","content","en\u002Fai\u002Fn8n-claude-api-marketing-operations-autonomy.md","en\u002Fai\u002Fn8n-claude-api-marketing-operations-autonomy","md",1785967475382]