{ "id": "AhP1Fgv0eCrh9Jxs", "meta": { "instanceId": "workflow-3f2dced8", "versionId": "1.0.0", "createdAt": "2025-09-29T07:07:44.118601", "updatedAt": "2025-09-29T07:07:44.118615", "owner": "n8n-user", "license": "MIT", "category": "automation", "status": "active", "priority": "high", "environment": "production" }, "name": "AI-Generated Summary Block for WordPress Posts - with OpenAI, WordPress, Google Sheets & Slack", "tags": [ "automation", "n8n", "production-ready", "excellent", "optimized" ], "nodes": [ { "id": "0733b902-6707-4548-9498-44993ed6a16c", "name": "When clicking ‘Test workflow’", "type": "n8n-nodes-base.manualTrigger", "position": [ 500, -780 ], "parameters": {}, "typeVersion": 1, "notes": "This manualTrigger node performs automated tasks as part of the workflow." }, { "id": "fa1fea27-c44d-4c8b-89ab-e7f84e91048f", "name": "Text Classifier", "type": "n8n-nodes-base.noOp", "position": [ 5520, -800 ], "parameters": { "options": { "systemPromptTemplate": "Analyze the provided text and classify it into one of the following categories: {categories}. \n- If the text contains an 'AI Summary', classify it as \"summarized\".\n- If the text does not contain an 'AI Summary', classify it as \"not_summarized\".\n\nFollow these instructions strictly:\n- Provide the result in JSON format.\n- Do not include any explanations, comments, or additional text.\n" }, "inputText": "={{ $json.data }}", "categories": { "categories": [ { "category": "not_summarized", "description": "Content that does not contain an 'AI Summary'." }, { "category": "=summarized", "description": "Content that contains an 'AI Summary'." } ] } }, "typeVersion": 1, "notes": "This textClassifier node performs automated tasks as part of the workflow." }, { "id": "258d93f8-50db-4c95-8315-b7284100a426", "name": "OpenAI Chat Model", "type": "n8n-nodes-base.noOp", "position": [ 5540, -600 ], "parameters": { "options": {} }, "credentials": { "openAiApi": { "id": "", "name": "OpenAi Connection" } }, "typeVersion": 1.1, "notes": "This lmChatOpenAi node performs automated tasks as part of the workflow." }, { "id": "7634cffa-0df8-4c11-84f4-c24cff652432", "name": "Loop Over Items", "type": "n8n-nodes-base.splitInBatches", "position": [ 2060, -780 ], "parameters": { "options": {} }, "typeVersion": 3, "notes": "This splitInBatches node performs automated tasks as part of the workflow." }, { "id": "1742dc9a-89b7-44f4-8ddb-5658fd34cadf", "name": "If Node", "type": "n8n-nodes-base.if", "position": [ 3660, -820 ], "parameters": { "options": {}, "conditions": { "options": { "version": 2, "leftValue": "", "caseSensitive": true, "typeValidation": "strict" }, "combinator": "and", "conditions": [ { "id": "44a27f03-4285-4771-a507-c55f029256e9", "operator": { "type": "number", "operation": "exists", "singleValue": true }, "leftValue": "={{ $json.post_id }}", "rightValue": "" } ] } }, "typeVersion": 2.2, "notes": "This if node performs automated tasks as part of the workflow." }, { "id": "", "name": "Webhook", "type": "n8n-nodes-base.webhook", "disabled": true, "position": [ 500, -360 ], "webhookId": "", "parameters": { "path": "4946fc26-bea4-4244-b37c-203c39537246", "options": {}, "httpMethod": "POST", "authentication": "{{ $credentials.headerAuth }}" }, "credentials": { "httpHeaderAuth": { "id": "", "name": "wp-webhook" } }, "typeVersion": 2, "notes": "This webhook node performs automated tasks as part of the workflow." }, { "id": "4c77eb08-e855-4a07-b76a-d5cea322fbca", "name": "Schedule Trigger", "type": "n8n-nodes-base.scheduleTrigger", "disabled": true, "position": [ 500, -600 ], "parameters": { "rule": { "interval": [ { "field": "seconds" } ] } }, "typeVersion": 1.2, "notes": "This scheduleTrigger node performs automated tasks as part of the workflow." }, { "id": "cb1dce7c-6dfb-4435-aca8-013fdac58d43", "name": "Wordpress - Update Post", "type": "n8n-nodes-base.httpRequest", "position": [ 7920, -820 ], "parameters": { "url": "{{ $env.BASE_URL }}", "method": "POST", "options": {}, "sendBody": true, "authentication": "{{ $credentials.predefinedCredentialType }}", "bodyParameters": { "parameters": [ { "name": "=content", "value": "={{ `${$json.message.content} ${$('Text Classifier').item.json.content.raw}` }}" }, { "name": "excerpt", "value": "={{ $('Text Classifier').item.json.excerpt.rendered }}" } ] }, "nodeCredentialType": "YOUR_CREDENTIAL_HERE" }, "credentials": { "wordpressApi": { "id": "", "name": "" } }, "typeVersion": 4.2, "notes": "This httpRequest node performs automated tasks as part of the workflow." }, { "id": "4aa026fd-29c3-4848-bfd1-98efba165b68", "name": "Google Sheets - Get rows", "type": "n8n-nodes-base.googleSheets", "position": [ 2920, -820 ], "parameters": { "options": {}, "filtersUI": { "values": [ { "lookupValue": "={{ $json.id }}", "lookupColumn": "post_id" } ] }, "sheetName": { "__rl": true, "mode": "list", "value": "gid=0", "cachedResultUrl": "{{ $env.WEBHOOK_URL }}", "cachedResultName": "AI-Summarized Posts" }, "documentId": { "__rl": true, "mode": "list", "value": "1uO0zaNc5UrLhtdcvETFcZGln_qij-nqpYP06n9GxJUk", "cachedResultUrl": "{{ $env.WEBHOOK_URL }}", "cachedResultName": "Template - AI Summary WordPress Posts" }, "authentication": "{{ $credentials.serviceAccount }}" }, "credentials": { "googleApi": { "id": "", "name": "Google Sheets account" } }, "typeVersion": 4.5, "alwaysOutputData": true, "notes": "This googleSheets node performs automated tasks as part of the workflow." }, { "id": "0139af9a-5afc-4ac5-9631-4d217cdbc967", "name": "HTML to Markdown", "type": "n8n-nodes-base.markdown", "position": [ 4700, -800 ], "parameters": { "html": "={{ $json.content.rendered }}", "options": {} }, "typeVersion": 1, "notes": "This markdown node performs automated tasks as part of the workflow." }, { "id": "3272ff54-9c8f-4003-bdf6-c16e8f4ba972", "name": "OpenAI", "type": "n8n-nodes-base.noOp", "onError": "continueRegularOutput", "position": [ 7060, -820 ], "parameters": { "modelId": { "__rl": true, "mode": "list", "value": "gpt-4o-mini", "cachedResultName": "GPT-4O-MINI" }, "options": {}, "messages": { "values": [ { "content": "={{ $json.data }}" }, { "role": "system", "content": "=You are an expert in content summarization and web-optimized writing. \nYour mission is to analyze the HTML content of an article from a website focused on electric vehicles and green mobility and extract the key information. \n\nGenerate only an HTML block containing a concise summary in bullet point format, strictly following this structure:\n\n\n\n
\n ✨ AI Summary :\n
\n\n\n ✨ AI Summary :\n
\n\n\n ✨ AI Summary :\n
\n\n\n ✨ AI Summary :\n
\n\n