Airtable到HashNode
这是一个Social Media领域的自动化工作流,包含 16 个节点。主要使用 If, Airtable, HttpRequest, ManualTrigger, SplitInBatches 等节点。 通过API集成自动化从Airtable到Hashnode的博客发布
- •Airtable API Key
- •可能需要目标 API 的认证凭证
分类
{
"id": "NKH75Yw8BamfkKSH",
"meta": {
"instanceId": "57c6ae2839a35415c47c2c780dda3195de041953069a0948855f595fc6dcad27",
"templateCredsSetupCompleted": true
},
"name": "Airtable 到 HashNode",
"tags": [
{
"id": "fouVh2Y0OYqejpLm",
"name": "Template_shared",
"createdAt": "2025-07-29T14:31:26.567Z",
"updatedAt": "2025-07-29T14:31:26.567Z"
}
],
"nodes": [
{
"id": "7e5e97e9-f9b4-451c-8f0d-796da1e9c5e2",
"name": "便签 9",
"type": "n8n-nodes-base.stickyNote",
"position": [
4592,
720
],
"parameters": {
"color": 7,
"width": 288,
"height": 272,
"content": "## 5. 发布草稿"
},
"typeVersion": 1
},
{
"id": "2594eda3-f5cd-4fdd-b9ab-5630c852e164",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
3232,
720
],
"parameters": {
"color": 7,
"width": 324,
"height": 260,
"content": "## 1. 获取博客文章"
},
"typeVersion": 1
},
{
"id": "a872841f-48bc-4548-91bc-634fd352e876",
"name": "获取出版物 ID",
"type": "n8n-nodes-base.httpRequest",
"position": [
4000,
832
],
"parameters": {
"url": "https://gql.hashnode.com",
"method": "POST",
"options": {},
"jsonBody": "={\n \"query\": \"query GetPublication($host: String!) { publication(host: $host) { id title } }\",\n \"variables\": {\n \"host\": \"{{ $json.HashNode_Publication_Domain }}\"\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $json.Hashnode_Token }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "280f1bdb-a467-44dc-896f-c6cf23a6724b",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
3920,
720
],
"parameters": {
"color": 7,
"width": 272,
"height": 272,
"content": "## 3. 获取 Publication_ID"
},
"typeVersion": 1
},
{
"id": "f4cd172e-3dd4-45f6-b021-04ab76f92a31",
"name": "获取帖子",
"type": "n8n-nodes-base.airtable",
"position": [
3344,
816
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appWkeQWqFgNbvHuB",
"cachedResultUrl": "https://airtable.com/appWkeQWqFgNbvHuB",
"cachedResultName": "ATO_AESA"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tbluWDZPDOsCs39aS",
"cachedResultUrl": "https://airtable.com/appWkeQWqFgNbvHuB/tbluWDZPDOsCs39aS",
"cachedResultName": "HashNode"
},
"options": {},
"operation": "search",
"filterByFormula": "={Status} = \"Not Published\""
},
"typeVersion": 2.1
},
{
"id": "bbba998f-64ff-4374-9483-ad3a5087f6c2",
"name": "当点击“执行工作流”时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
3024,
816
],
"parameters": {},
"typeVersion": 1
},
{
"id": "3ca28839-f6ed-48b7-9a60-2c5d49cdb8ea",
"name": "如果存在 Publication_ID",
"type": "n8n-nodes-base.if",
"position": [
4352,
832
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "19bb7e3a-2988-4722-bc0e-c63bbf3d34cb",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.data.publication.id }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "1a5f8592-9f33-41fe-9c91-d09c4ece0507",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
4240,
720
],
"parameters": {
"color": 7,
"width": 304,
"height": 272,
"content": "## 4. Publication_ID 是否存在?"
},
"typeVersion": 1
},
{
"id": "f908dc80-185c-43a2-aee9-6b87a60f5402",
"name": "便签11",
"type": "n8n-nodes-base.stickyNote",
"position": [
4928,
752
],
"parameters": {
"color": 7,
"width": 292,
"height": 260,
"content": "## 6. 更新博客文章"
},
"typeVersion": 1
},
{
"id": "1dcca5e8-928b-49e1-940a-105e2a6bba81",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
3680,
816
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "acc6a156-392b-4ff1-b13c-862c23657819",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
3600,
720
],
"parameters": {
"color": 7,
"width": 272,
"height": 272,
"content": "## 2. 项目处理"
},
"typeVersion": 1
},
{
"id": "dea6549a-c554-4194-a55b-be7dbe1d4bf4",
"name": "HashNode 发布草稿",
"type": "n8n-nodes-base.httpRequest",
"position": [
4688,
816
],
"parameters": {
"url": "https://gql.hashnode.com",
"method": "POST",
"options": {},
"jsonBody": "={\n \"query\": \"mutation CreateDraft($input: CreateDraftInput!) { createDraft(input: $input) { draft { id } } }\",\n \"variables\": {\n \"input\": {\n \"title\": {{ JSON.stringify($('Get Posts').item.json.Title) }},\n \"contentMarkdown\": {{ JSON.stringify($('Get Posts').item.json.Content_markdown) }},\n \"publicationId\": \"{{ $('Get Publication ID').item.json.data.publication.id }}\"\n }\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Get Posts').item.json.Hashnode_Token }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "f72171cd-ef2c-45ec-939e-e9f378e52154",
"name": "更新文章",
"type": "n8n-nodes-base.airtable",
"position": [
5024,
848
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appWkeQWqFgNbvHuB",
"cachedResultUrl": "https://airtable.com/appWkeQWqFgNbvHuB",
"cachedResultName": "ATO_AESA"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tbluWDZPDOsCs39aS",
"cachedResultUrl": "https://airtable.com/appWkeQWqFgNbvHuB/tbluWDZPDOsCs39aS",
"cachedResultName": "HashNode"
},
"columns": {
"value": {
"id": "={{ $('Get Posts').item.json.id }}",
"Status": "Published"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Post_name",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Post_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Title",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content_markdown",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Content_markdown",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Hashnode_Token",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Hashnode_Token",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "HashNode_Publication_Domain",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "HashNode_Publication_Domain",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "options",
"display": true,
"options": [
{
"name": "Not Published",
"value": "Not Published"
},
{
"name": "Published",
"value": "Published"
},
{
"name": "Error",
"value": "Error"
},
{
"name": "",
"value": ""
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"updateAllMatches": false
},
"operation": "update"
},
"typeVersion": 2.1
},
{
"id": "6a8c2896-5300-41af-bcc9-b70dce159025",
"name": "更新错误",
"type": "n8n-nodes-base.airtable",
"position": [
4352,
1152
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appWkeQWqFgNbvHuB",
"cachedResultUrl": "https://airtable.com/appWkeQWqFgNbvHuB",
"cachedResultName": "ATO_AESA"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tbluWDZPDOsCs39aS",
"cachedResultUrl": "https://airtable.com/appWkeQWqFgNbvHuB/tbluWDZPDOsCs39aS",
"cachedResultName": "HashNode"
},
"columns": {
"value": {
"id": "={{ $('Get Posts').item.json.id }}",
"Status": "Error"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Post_name",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Post_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Title",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content_markdown",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Content_markdown",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Hashnode_Token",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Hashnode_Token",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "HashNode_Publication_Domain",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "HashNode_Publication_Domain",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "options",
"display": true,
"options": [
{
"name": "Not Published",
"value": "Not Published"
},
{
"name": "Published",
"value": "Published"
},
{
"name": "Error",
"value": "Error"
},
{
"name": "",
"value": ""
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"updateAllMatches": false
},
"operation": "update"
},
"typeVersion": 2.1
},
{
"id": "ed0ea527-4672-4a35-a073-1836e9e71454",
"name": "便签12",
"type": "n8n-nodes-base.stickyNote",
"position": [
4224,
1056
],
"parameters": {
"color": 7,
"width": 356,
"height": 260,
"content": "## 7. 错误 - 无 Publication_ID"
},
"typeVersion": 1
},
{
"id": "fd32a6ae-50a7-4a65-ab13-64f8ac954127",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2064,
640
],
"parameters": {
"width": 848,
"height": 1376,
"content": "## 📝 从 Airtable 到 Hashnode 的自动化博客文章发布"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {
"HashNode Post Draft": [
{
"json": {
"data": {
"createDraft": {
"draft": {
"id": "689368c16573c8743eaf1c63"
}
}
}
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "16c19ea4-f275-4474-b1d9-368602766d47",
"connections": {
"Get Posts": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Update Post": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Update Error": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Get Publication ID",
"type": "main",
"index": 0
}
]
]
},
"Get Publication ID": {
"main": [
[
{
"node": "If Exists Publication_ID",
"type": "main",
"index": 0
}
]
]
},
"HashNode Post Draft": {
"main": [
[
{
"node": "Update Post",
"type": "main",
"index": 0
}
]
]
},
"If Exists Publication_ID": {
"main": [
[
{
"node": "HashNode Post Draft",
"type": "main",
"index": 0
}
],
[
{
"node": "Update Error",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Get Posts",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 社交媒体
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
FabioInTech
@fabiointechAI Systems Architect with 18+ years experience designing scalable, intelligent automation solutions. I specialize in architecting complex n8n workflows that integrate AI systems, streamline operations, and optimize business processes. My expertise spans multi-agent architectures, data automation, and enterprise-grade systems that adapt to evolving business needs. I help organizations unlock their potential through strategic technology implementation and innovative automation solutions.
分享此工作流