{"id": "b0KRVIuuUxE5afHo", "name": "Blog Automation TEMPLATE", "nodes": [{"id": "20e00146-6bda-4a8a-9544-bf7e5fd4e12e", "name": "Settings", "type": "n8n-nodes-base.set", "position": [-420, -160], "parameters": {"options": {}, "assignments": {"assignments": [{"id": "528b371f-0fba-4be1-9801-0502652da23e", "name": "urlSpreadsheet", "type": "string", "value": "https://docs.google.com/spreadsheets/d/1Kg1-U6mJF4bahH1jCw8kT48MiKz1UMC5n-9q77BHM3Q/edit?gid=0#gid=0"}, {"id": "1be018c7-51fe-4ea2-967d-ce47a2e8795c", "name": "urlWordpress", "type": "string", "value": "SUBDOMAIN.wordpress.com"}, {"id": "95377f4f-184b-46a7-94c7-b2313c314cb2", "name": "wordpressUsername", "type": "string", "value": "YourUserName"}, {"id": "fdc99dc6-d9b0-4d2f-b770-1d8b6b360cad", "name": "wordpressApplicationPassword", "type": "string", "value": "y0ur app1 p4ss w0rd"}, {"id": "517cb9ff-24fc-41d6-8bcc-253078f56356", "name": "sheetSchedule", "type": "string", "value": "=Schedule"}, {"id": "584e11da-546b-4472-8674-33ca7e8f4f30", "name": "sheetConfig", "type": "string", "value": "Config"}, {"id": "ba38cb1e-fd97-4aed-9147-1946c318ddab", "name": "actionPublish", "type": "string", "value": "publish"}, {"id": "678394b5-20af-4718-9249-4ff6a3c77018", "name": "actionUpdate", "type": "string", "value": ""}, {"id": "f375b2fa-8772-4313-9d6b-a104edd918b3", "name": "sheetLog", "type": "string", "value": "Log"}, {"id": "3d7f9677-c753-4126-b33a-d78ef701771f", "name": "", "type": "string", "value": ""}]}}, "typeVersion": 3.4}, {"id": "35731842-9215-43df-9009-9b130d663237", "name": "ScheduleTrigger", "type": "n8n-nodes-base.scheduleTrigger", "position": [-620, -280], "parameters": {"rule": {"interval": [{"field": "hours"}]}}, "typeVersion": 1.2}, {"id": "4c284d44-ac46-4cdf-9dcb-727b464269a0", "name": "ManualTrigger", "type": "n8n-nodes-base.manualTrigger", "position": [-620, -100], "parameters": {}, "typeVersion": 1}, {"id": "b63e7345-67d0-4761-8c1a-49275f34e88d", "name": "Schedule", "type": "n8n-nodes-base.googleSheets", "position": [-220, -80], "parameters": {"options": {}, "sheetName": {"__rl": true, "mode": "name", "value": "={{ $('Settings').item.json.sheetSchedule }}"}, "documentId": {"__rl": true, "mode": "url", "value": "={{ $('Settings').item.json.urlSpreadsheet }}"}}, "credentials": {"googleSheetsOAuth2Api": {"id": "XeXufn5uZvHp3lcX", "name": "Google Sheets account 2"}}, "notesInFlow": true, "typeVersion": 4.5}, {"id": "5fed06a3-3188-4aed-8040-04e245b74e20", "name": "Config", "type": "n8n-nodes-base.code", "position": [40, -220], "parameters": {"jsCode": "let a = $(\"fetchConfig\").all();\nlet params = {};\na.forEach(p => params[p.json.Key] = p.json.Value);\n\nreturn params;\n"}, "typeVersion": 2}, {"id": "685490c8-6b45-40c2-b4db-e97a81c4be8e", "name": "fetchConfig", "type": "n8n-nodes-base.googleSheets", "position": [-220, -220], "parameters": {"options": {}, "sheetName": {"__rl": true, "mode": "name", "value": "={{ $('Settings').item.json.sheetConfig }}"}, "documentId": {"__rl": true, "mode": "url", "value": "={{ $('Settings').item.json.urlSpreadsheet }}"}}, "credentials": {"googleSheetsOAuth2Api": {"id": "XeXufn5uZvHp3lcX", "name": "Google Sheets account 2"}}, "notesInFlow": true, "typeVersion": 4.5}, {"id": "52a39db8-f9cc-44bb-9c3e-a9abf5821a04", "name": "AgentLLM", "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "position": [-400, 440], "parameters": {"model": "={{ $json.model }}", "options": {}}, "credentials": {"openAiApi": {"id": "66JEQJ5kJel1P9t3", "name": "OpenRouter"}}, "typeVersion": 1.1}, {"id": "6a311ac4-032b-42da-b06e-c916209d2843", "name": "IfScheduledNow", "type": "n8n-nodes-base.if", "position": [-620, 780], "parameters": {"options": {}, "conditions": {"options": {"version": 2, "leftValue": "", "caseSensitive": true, "typeValidation": "loose"}, "combinator": "and", "conditions": [{"id": "bb707069-b372-4bbd-8ba5-b7f6b492ab9d", "operator": {"type": "number", "operation": "gte"}, "leftValue": "={{ DateTime.now().ts }}", "rightValue": "={{ DateTime.fromFormat($json.row.Scheduled, \"yyyy-MM-dd HH:mm:ss\").ts }}"}]}, "looseTypeValidation": true}, "typeVersion": 2.2}, {"id": "845e419b-15ad-4548-86c5-44bda0433b71", "name": "PreparedData", "type": "n8n-nodes-base.code", "position": [40, -80], "parameters": {"mode": "runOnceForEachItem", "jsCode": "function replacePlaceholders(text, row, config) {\n function checkProp(prop, lookup) {\n // console.log('checkProp:' + prop);\n if (!lookup.hasOwnProperty(prop)) return false;\n let value = lookup[prop];\n if (typeof(value) == 'string') {\n value = value.trim();\n if (value == '') return false;\n }\n // console.log('checkProp found:', value)\n return value;\n }\n function replaceMatch(fullMatch, prop) { \n prop = prop.trim();\n // Return the corresponding value\n return checkProp(prop, row)\n