OpenAI -> Blog Ghost
Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 8 nœuds.Utilise principalement des nœuds comme Code, HttpRequest, ScheduleTrigger, OpenAi. Génération automatisée d'articles de blog et publication vers Ghost CMS, basée sur GPT-4
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
- •Clé API OpenAI
Nœuds utilisés (8)
Catégorie
{
"id": "ePvpXpyW3KKPjM4x",
"meta": {
"instanceId": "256e0224567a81ad2d19d67041dccb4aba84a3ec55947042e28c6efa76b21434"
},
"name": "OpenAI->Ghost Blog",
"tags": [],
"nodes": [
{
"id": "d3434c5a-8579-47cf-ac05-a4cfef3fd3c4",
"name": "Déclencheur Planifié",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 12,
"triggerAtMinute": 34
}
]
}
},
"typeVersion": 1.2
},
{
"id": "54953abf-38c2-4d1a-a4e2-13ee43a6e4db",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
220,
0
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini-2025-04-14",
"cachedResultName": "GPT-4.1-MINI-2025-04-14"
},
"options": {},
"messages": {
"values": [
{
"content": "Write a high-quality blog post on a creative or thought-provoking topic. The tone should be engaging and immersive. Length: 2–4 paragraphs.\n\nThen add a brief paragraph offering an alternative perspective or logical counterpoint.\n\nFinally, generate:\n- Blog post title\n- Meta description\n- 5 tags"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "63a4cf0d-1fdd-435c-a477-d6880590c42e",
"name": "HTTP Requête1",
"type": "n8n-nodes-base.httpRequest",
"position": [
1040,
0
],
"parameters": {
"url": "https://yourcustomurl.com/ghost/api/admin/posts/",
"method": "POST",
"options": {},
"jsonBody": "={{ JSON.stringify($json) }}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"nodeCredentialType": "ghostAdminApi"
},
"credentials": {
"ghostAdminApi": {
"id": "pQKSsgQ9aBN9P1fA",
"name": "Ghost - Transcripspiracy"
}
},
"typeVersion": 4.2
},
{
"id": "4c460c9f-0074-4b9a-be5c-f0cfb8bae9bd",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
600,
0
],
"parameters": {
"jsCode": "const content = $json.message.content;\n\n// Extract Blog Post Title\nconst titleMatch = content.match(/\\*\\*Blog Post Title:\\*\\*\\s*(.+)/i);\nconst title = titleMatch ? titleMatch[1].trim() : 'Untitled';\n\n// Extract Meta Description\nconst metaMatch = content.match(/\\*\\*Meta Description:\\*\\*\\s*(.+)/i);\nconst meta = metaMatch ? metaMatch[1].trim() : '';\n\n// Extract Tags\nconst tagsMatch = content.match(/\\*\\*Tags:\\*\\*\\s*(.+)/i);\nconst rawTags = tagsMatch ? tagsMatch[1] : '';\nconst tags = rawTags.split(',').map(t => t.trim()).filter(t => t);\n\n// Strip metadata from the body\nconst body = content\n .split('\\n\\n')\n .filter(p => !/\\*\\*Blog Post Title:\\*\\*/i.test(p) && !/\\*\\*Meta Description:\\*\\*/i.test(p) && !/\\*\\*Tags:\\*\\*/i.test(p))\n .join('\\n\\n');\n\n// Wrap in clean HTML\nconst html = `<div style=\"text-align:center; white-space:pre-line;\">${body.trim()}</div>`;\n\n// Return Ghost-compatible JSON\nreturn [\n {\n json: {\n title,\n html,\n status: 'published',\n tags,\n meta_description: meta\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "cb384074-daf5-4945-adf6-40657498493d",
"name": "Code1",
"type": "n8n-nodes-base.code",
"position": [
820,
0
],
"parameters": {
"jsCode": "const title = $json.title;\nconst status = $json.status || 'published';\nconst tags = ($json.tags || []).map(tag => ({ name: tag }));\n\n// Already wrapped with styling and line breaks — use as-is\nconst htmlContent = $json.html;\n\nconst mobiledoc = JSON.stringify({\n version: '0.3.1',\n atoms: [],\n cards: [['html', { html: htmlContent }]],\n markups: [],\n sections: [[10, 0]]\n});\n\nreturn [\n {\n posts: [\n {\n title,\n mobiledoc,\n status,\n tags\n }\n ]\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "59c2276c-1ea7-4c95-929f-4fd894289909",
"name": "Note Adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-180,
-180
],
"parameters": {
"width": 280,
"height": 140,
"content": "🚀 This workflow runs every 12 hours and creates a blog post using OpenAI."
},
"typeVersion": 1
},
{
"id": "842d8b2e-bc1c-43cd-9555-9117f1bdc5e1",
"name": "Note Adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
220,
-200
],
"parameters": {
"content": "✍️ The AI generates content + metadata (title, tags, meta desc)."
},
"typeVersion": 1
},
{
"id": "19550cb9-26ed-4aae-b17c-1d9e2a46db2a",
"name": "Note Adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
900,
-240
],
"parameters": {
"content": "📤 Posts are sent to your Ghost CMS via authenticated API."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d05670de-d0e0-4dfe-9338-2c219515e6d4",
"connections": {
"4c460c9f-0074-4b9a-be5c-f0cfb8bae9bd": {
"main": [
[
{
"node": "cb384074-daf5-4945-adf6-40657498493d",
"type": "main",
"index": 0
}
]
]
},
"cb384074-daf5-4945-adf6-40657498493d": {
"main": [
[
{
"node": "63a4cf0d-1fdd-435c-a477-d6880590c42e",
"type": "main",
"index": 0
}
]
]
},
"54953abf-38c2-4d1a-a4e2-13ee43a6e4db": {
"main": [
[
{
"node": "4c460c9f-0074-4b9a-be5c-f0cfb8bae9bd",
"type": "main",
"index": 0
}
]
]
},
"d3434c5a-8579-47cf-ac05-a4cfef3fd3c4": {
"main": [
[
{
"node": "54953abf-38c2-4d1a-a4e2-13ee43a6e4db",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Intermédiaire - Création de contenu, IA Multimodale
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Thomas
@darkrangeholdingsPartager ce workflow