아래가 n8n Import용 workflow.json 입니다.

이 코드를 통째로 저장해서 workflow.json로 Import 하세요.
(이 파일은 {로 시작하는 게 맞습니다)

{
"name": "Blogger Series Auto Publisher (Ep1 now, Ep2+ queued)",
"nodes": [
{
"parameters": {},
"id": "manualTrigger",
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
240,
300
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "blogId",
"value": "YOUR_BLOGGER_BLOG_ID"
}
]
}
},
"id": "setConfig",
"name": "Set Config",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
460,
300
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "postsJson",
"value": "[{\"episode\":1,\"title\":\"1편 제목\",\"intro\":\"1편 인트로\",\"sections\":[{\"h2\":\"소제목 1\",\"body\":\"본문 1\"},{\"h2\":\"소제목 2\",\"body\":\"본문 2\"},{\"h2\":\"소제목 3\",\"body\":\"본문 3\"}],\"summary\":\"1편 요약\",\"next_preview\":\"다음 편 예고\",\"publishAt\":\"2026-04-15T09:00:00+09:00\"}]"
}
]
}
},
"id": "setPosts",
"name": "Set Posts",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
680,
300
]
},
{
"parameters": {
"jsCode": "const blogId = $json.blogId;\nconst raw = $json.postsJson;\nlet posts = [];\n\ntry {\n posts = JSON.parse(raw);\n} catch (e) {\n throw new Error('postsJson 파싱 실패: ' + e.message);\n}\n\nif (!Array.isArray(posts) || posts.length === 0) {\n throw new Error('postsJson은 비어있지 않은 배열이어야 합니다.');\n}\n\nposts.sort((a,b) => Number(a.episode) - Number(b.episode));\n\nfunction buildContent(p) {\n const sections = (p.sections || []).slice(0, 4);\n const sectionHtml = sections.map(s => `<h2>${s.h2}</h2><p>${s.body}</p>`).join('\\n');\n return `\n<p>${p.intro || ''}</p>\n${sectionHtml}\n<h2>결론(요약)</h2>\n<p>${p.summary || ''}</p>\n<p><strong>다음 편 예고:</strong> ${p.next_preview || ''}</p>\n<hr/>\n<p>읽어주셔서 감사합니다. 다음 편에서 더 실무적인 내용으로 이어가겠습니다.</p>\n`.trim();\n}\n\nreturn posts.map(p => ({\n json: {\n blogId,\n episode: Number(p.episode),\n title: p.title,\n publishAt: p.publishAt,\n content: buildContent(p)\n }\n}));"
},
"id": "codePrepare",
"name": "Prepare Posts",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
920,
300
]
},
{
"parameters": {
"conditions": {
"number": [
{
"value1": "={{$json.episode}}",
"operation": "equal",
"value2": 1
}
]
}
},
"id": "ifEpisode1",
"name": "IF Episode 1",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1140,
300
]
},
{
"parameters": {
"authentication": "oAuth2",
"url": "=https://www.googleapis.com/blogger/v3/blogs/{{$json.blogId}}/posts?isDraft=false",
"options": {},
"responseFormat": "json",
"requestMethod": "POST",
"jsonParameters": true,
"sendBody": true,
"specifyBody": "json",
"bodyParametersJson": "={\n \"kind\": \"blogger#post\",\n \"title\": $json.title,\n \"content\": $json.content\n}"
},
"id": "publishNow",
"name": "Publish Now (Episode 1)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1380,
200
],
"credentials": {}
},
{
"parameters": {
"resume": "specificTime",
"dateTime": "={{$json.publishAt}}"
},
"id": "waitUntil",
"name": "Wait Until publishAt",
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1380,
400
]
},
{
"parameters": {
"authentication": "oAuth2",
"url": "=https://www.googleapis.com/blogger/v3/blogs/{{$json.blogId}}/posts?isDraft=false",
"options": {},
"responseFormat": "json",
"requestMethod": "POST",
"jsonParameters": true,
"sendBody": true,
"specifyBody": "json",
"bodyParametersJson": "={\n \"kind\": \"blogger#post\",\n \"title\": $json.title,\n \"content\": $json.content\n}"
},
"id": "publishScheduled",
"name": "Publish Scheduled (Episode 2+)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1620,
400
],
"credentials": {}
},
{
"parameters": {
"mode": "append"
},
"id": "mergeResults",
"name": "Merge Results",
"type": "n8n-nodes-base.merge",
"typeVersion": 3.1,
"position": [
1860,
300
]
}
],
"connections": {
"Manual Trigger": {
"main": [
[
{
"node": "Set Config",
"type": "main",
"index": 0
}
]
]
},
"Set Config": {
"main": [
[
{
"node": "Set Posts",
"type": "main",
"index": 0
}
]
]
},
"Set Posts": {
"main": [
[
{
"node": "Prepare Posts",
"type": "main",
"index": 0
}
]
]
},
"Prepare Posts": {
"main": [
[
{
"node": "IF Episode 1",
"type": "main",
"index": 0
}
]
]
},
"IF Episode 1": {
"main": [
[
{
"node": "Publish Now (Episode 1)",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait Until publishAt",
"type": "main",
"index": 0
}
]
]
},
"Publish Now (Episode 1)": {
"main": [
[
{
"node": "Merge Results",
"type": "main",
"index": 0
}
]
]
},
"Wait Until publishAt": {
"main": [
[
{
"node": "Publish Scheduled (Episode 2+)",
"type": "main",
"index": 0
}
]
]
},
"Publish Scheduled (Episode 2+)": {
"main": [
[
{
"node": "Merge Results",
"type": "main",
"index": 1
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "1"
}

다음 순서:

  1. 이 파일 Import
  2. Set Posts의 postsJson에 8편 원고 배열 붙여넣기
  3. Set Config.blogId 입력
  4. HTTP Request 2개에 Google OAuth2 Credential 연결
  5. 실행 테스트 (1편 발행 확인)

댓글

이 블로그의 인기 게시물

n8n자동화 첫걸음 - JSON으로 만든글을 자동화 해보자