AutomationFlowsWeb Scraping › 发草稿到公众号

发草稿到公众号

发草稿到公众号. Uses httpRequest, executeWorkflowTrigger, stopAndError. Event-driven trigger; 27 nodes.

Event trigger★★★★☆ complexity27 nodesHTTP RequestExecute Workflow TriggerStop And Error
Web Scraping Trigger: Event Nodes: 27 Complexity: ★★★★☆ Added:
发草稿到公众号 — n8n workflow card showing HTTP Request, Execute Workflow Trigger, Stop And Error integration

This workflow follows the Execute Workflow Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "\u53d1\u8349\u7a3f\u5230\u516c\u4f17\u53f7",
  "nodes": [
    {
      "parameters": {
        "url": "https://obplugin.dualhue.cn/v1/workflow/token",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpBearerAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        256,
        -16
      ],
      "id": "2601faa3-6b5c-4718-9d64-0bdc666eb4b6",
      "name": "AccessToken",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.weixin.qq.com/cgi-bin/material/batchget_material",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "access_token",
              "value": "={{ $json.token }}"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "type",
              "value": "image"
            },
            {
              "name": "offset",
              "value": "0"
            },
            {
              "name": "count",
              "value": "10"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        1024,
        -320
      ],
      "id": "12394d60-f601-4e27-a164-e3f597968152",
      "name": "GetCoverMaterial"
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nconst input = $input.first().json;\n\nconst access_token = $(\"AccessToken\").first().json.token\n\nconst data = {\n  article_type:\"news\",\n  title: input.title,\n  content: input.content,\n  thumb_media_id: input.thumb_media_id\n}\n\nif (input.author) {\n  data['author'] = input.author;\n}\nif (input.digest) {\n  data['digest'] = input.digest;\n}\nif (input.content_source_url?.length > 0) {\n  data['content_source_url'] = input.content_source_url;\n}\nif (input.need_open_comment) {\n  data['need_open_comment'] = input.need_open_comment;\n}\nif (input.only_fans_can_comment) {\n  data['only_fans_can_comment'] = input.only_fans_can_comment;\n}\nif (input.pic_crop_235_1?.length > 0) {\n  data['pic_crop_235_1'] = input.pic_crop_235_1;\n}\nif (input.pic_crop_1_1?.length > 0) {\n  data['pic_crop_1_1'] = input.pic_crop_1_1;\n}\n\nreturn { access_token, data: {articles: [data]} }\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1520,
        -16
      ],
      "id": "51159558-4167-4849-8c48-4145ea6a6869",
      "name": "PrepareData"
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\n\nconst res = JSON.parse($('GetCoverMaterial').first().json.data);\n$('Start').first().json.thumb_media_id = res.item[0].media_id\n\nreturn $('Start').all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1248,
        -320
      ],
      "id": "4239b23f-cd4a-4e31-bc0c-9ce425fe0172",
      "name": "GetMediaId"
    },
    {
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "title"
            },
            {
              "name": "content"
            },
            {
              "name": "thumb_media_id"
            },
            {
              "name": "author"
            },
            {
              "name": "digest"
            },
            {
              "name": "content_source_url"
            },
            {
              "name": "need_open_comment",
              "type": "number"
            },
            {
              "name": "only_fans_can_comment",
              "type": "number"
            },
            {
              "name": "pic_crop_235_1"
            },
            {
              "name": "pic_crop_1_1"
            },
            {
              "name": "Cover",
              "type": "object"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        -480,
        -112
      ],
      "id": "a3bd70d5-4610-406a-8f02-80a25bcc111b",
      "name": "Start"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "add3b661-879e-42a7-879e-a0eb0df703b0",
              "leftValue": "={{ $json.title }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            },
            {
              "id": "642c6072-e59c-4347-bed5-ed687f8a25a4",
              "leftValue": "={{ $json.content }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -48,
        -112
      ],
      "id": "42697f08-3e99-41c8-b3e8-03831629dc7f",
      "name": "CheckInput"
    },
    {
      "parameters": {
        "errorMessage": "\u6807\u9898\u6216\u5185\u5bb9\u4e3a\u7a7a"
      },
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        256,
        -240
      ],
      "id": "fa63f92b-0545-4f28-a5ee-6b4be2276b10",
      "name": "Error"
    },
    {
      "parameters": {
        "url": "={{ $('Start').item.json.thumb_media_id }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        960,
        -16
      ],
      "id": "3c9c560a-0420-4d46-beaa-26c1dd18be86",
      "name": "DownloadCover"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.weixin.qq.com/cgi-bin/material/add_material",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "access_token",
              "value": "={{ $json.token }}"
            },
            {
              "name": "=type",
              "value": "image"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "media",
              "inputDataFieldName": "data"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        1136,
        -16
      ],
      "id": "3ec38f2a-a360-4ae1-9ff4-e84fb7180e27",
      "name": "UploadCover"
    },
    {
      "parameters": {
        "jsCode": "const res = JSON.parse($input.first().json.data);\n$(\"Start\").first().json.thumb_media_id = res.media_id;\nreturn $(\"Start\").all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1296,
        -16
      ],
      "id": "6dcc1ade-899d-4c29-8c20-93cfa7c464a0",
      "name": "UpdateCover"
    },
    {
      "parameters": {
        "jsCode": "return $(\"Start\").all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1136,
        352
      ],
      "id": "92e76f29-ddc8-4550-b791-800706f7a55f",
      "name": "AlignParam"
    },
    {
      "parameters": {
        "content": "## \u8f93\u5165\u53c2\u6570\n\n\n| \u53c2\u6570\u540d                   | \u7c7b\u578b     | \u5fc5\u586b  | \u8bf4\u660e                                                                                                                                                                                                                                      |\n| --------------------- | ------ | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| title                 | string | \u662f   | \u6807\u9898\uff0c\u603b\u957f\u5ea6\u4e0d\u8d85\u8fc732\u4e2a\u5b57\u3002                                                                                                                                                                                                                          |\n| content               | string | \u662f   | \u56fe\u6587\u6d88\u606f\u7684\u5177\u4f53\u5185\u5bb9\uff0c\u5927\u5c0f\u4e0d\u53ef\u8d85\u8fc72kb\uff0c\u652f\u6301HTML\u6807\u7b7e\uff0c\u5fc5\u987b\u5c11\u4e8e2\u4e07\u5b57\u7b26\uff0c\u5c0f\u4e8e1M\uff0c\u4e14\u6b64\u5904\u4f1a\u53bb\u9664JS,\u6d89\u53ca\u56fe\u7247url\u5fc5\u987b\u6765\u6e90 \"\u4e0a\u4f20\u56fe\u6587\u6d88\u606f\u5185\u7684\u56fe\u7247\u83b7\u53d6URL\"\u63a5\u53e3\u83b7\u53d6\u3002\u5916\u90e8\u56fe\u7247url\u5c06\u88ab\u8fc7\u6ee4\u3002                                                                                                                                      |\n| thumb_media_id        | string | \u5426   | \u6587\u7ae0\u5c01\u9762\uff0c\u53ef\u4ee5\u662f\u4ee5\u4e0b\u503c\uff1a<br>- \u5c01\u9762\u56fe\u7247\u7d20\u6750id\uff08\u5fc5\u987b\u662f\u6c38\u4e45MediaID\uff09<br>- \u7559\u7a7a\uff0c\u4f1a\u81ea\u52a8\u53d6\u6700\u65b0\u7684\u4e00\u5f20\u6c38\u4e45\u56fe\u7247\u7d20\u6750id<br>- \u56fe\u7247http\u94fe\u63a5\uff0c\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u4e0a\u4f20\u4f5c\u4e3a\u5c01\u9762<br>                                                                                                                                        |\n| author                | string | \u5426   | \u4f5c\u8005\uff0c\u603b\u957f\u5ea6\u4e0d\u8d85\u8fc716\u4e2a\u5b57\u3002                                                                                                                                                                                                                          |\n| digest                | string | \u5426   | \u56fe\u6587\u6d88\u606f\u7684\u6458\u8981\uff0c\u603b\u957f\u5ea6\u4e0d\u8d85\u8fc7128\u4e2a\u5b57\u3002                                                                                                                                                                                                                    |\n| content_source_url    | string | \u5426   | \u56fe\u6587\u6d88\u606f\u7684\u539f\u6587\u5730\u5740\uff0c\u5927\u5c0f\u4e0d\u53ef\u8d85\u8fc71 kb\uff0c\u5373\u70b9\u51fb\u201c\u9605\u8bfb\u539f\u6587\u201d\u540e\u7684URL                                                                                                                                                                                                     |\n| need_open_comment     | number | \u5426   | \u662f\u5426\u6253\u5f00\u8bc4\u8bba\uff0c0\u4e0d\u6253\u5f00(\u9ed8\u8ba4)\uff0c1\u6253\u5f00                                                                                                                                                                                                                     |\n| only_fans_can_comment | number | \u5426   | \u662f\u5426\u7c89\u4e1d\u624d\u53ef\u8bc4\u8bba\uff0c0\u6240\u6709\u4eba\u53ef\u8bc4\u8bba(\u9ed8\u8ba4)\uff0c1\u7c89\u4e1d\u624d\u53ef\u8bc4\u8bba                                                                                                                                                                                                            |\n| pic_crop_235_1        | string | \u5426   | \u56fe\u6587\u6d88\u606f\u5c01\u9762\u88c1\u526a\u4e3a2.35:1\u89c4\u683c\u7684\u5750\u6807\u5b57\u6bb5\u3002\u4ee5\u539f\u59cb\u56fe\u7247\uff08thumb_media_id\uff09\u5de6\u4e0a\u89d2\uff080,0\uff09\uff0c\u53f3\u4e0b\u89d2\uff081,1\uff09\u5efa\u7acb\u5e73\u9762\u5750\u6807\u7cfb\uff0c\u7ecf\u8fc7\u88c1\u526a\u540e\u7684\u56fe\u7247\uff0c\u5176\u5de6\u4e0a\u89d2\u6240\u5728\u7684\u5750\u6807\u5373\u4e3a\uff08X1,Y1\uff09,\u53f3\u4e0b\u89d2\u6240\u5728\u7684\u5750\u6807\u5219\u4e3a\uff08X2,Y2\uff09\uff0c\u7528\u5206\u9694\u7b26_\u62fc\u63a5\u4e3aX1_Y1_X2_Y2\uff0c\u6bcf\u4e2a\u5750\u6807\u503c\u7684\u7cbe\u5ea6\u4e3a\u4e0d\u8d85\u8fc7\u5c0f\u6570\u70b9\u540e6\u4f4d\u6570\u5b57\u3002\u793a\u4f8b\u89c1\u4e0b\u56fe\uff0c\u56fe\u4e2d(X1,Y1) \u7b49\u4e8e\uff080.1945,0\uff09,(X2,Y2)\u7b49\u4e8e\uff081,0.5236\uff09\uff0c\u6240\u4ee5\u8bf7\u6c42\u53c2\u6570\u503c\u4e3a0.1945_0_1_0.5236\u3002 |\n| pic_crop_1_1          | string | \u5426   | \u56fe\u6587\u6d88\u606f\u5c01\u9762\u88c1\u526a\u4e3a1:1\u89c4\u683c\u7684\u5750\u6807\u5b57\u6bb5\uff0c\u88c1\u526a\u539f\u7406\u540cpic_crop_235_1\uff0c\u88c1\u526a\u540e\u7684\u56fe\u7247\u5fc5\u987b\u7b26\u5408\u89c4\u683c\u8981\u6c42\u3002                                                                                                                                                                                 |\n",
        "height": 448,
        "width": 816
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        -640
      ],
      "typeVersion": 1,
      "id": "3b70b6de-d612-4644-b943-e231ef982e97",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\n\nconst res = JSON.parse($input.first().json.data);\nlet code = 0;\nlet message = 'sucess';\nlet media_id = '';\nif (res.errcode) {\n  code = res.errcode;\n  message = res.errmsg;\n}\nif (res.media_id) {\n  media_id = res.media_id;\n}\n\nreturn {code, message, media_id}\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1904,
        -16
      ],
      "id": "38eb12f6-cb7d-4a15-a1fa-3771749487a3",
      "name": "CheckResult"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.weixin.qq.com/cgi-bin/draft/add",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "access_token",
              "value": "={{ $json.access_token }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json.data) }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        1728,
        -16
      ],
      "id": "7a7ad332-fadd-48cb-bb88-7229384b02b2",
      "name": "AddDraft"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "f8acdb63-ad2e-45ed-be71-2184465fbcbc",
              "leftValue": "={{ $('Start').item.json.thumb_media_id }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        480,
        -16
      ],
      "id": "6d79282f-8005-4fda-95e5-ce0d682e8e60",
      "name": "CheckMediaIdEmpty",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "37574019-7c0c-4089-b9bf-5b0e031fddbd",
              "leftValue": "={{ $('Start').item.json.thumb_media_id }}",
              "rightValue": "http://",
              "operator": {
                "type": "string",
                "operation": "startsWith"
              }
            },
            {
              "id": "f34fa59d-893c-4bf7-a8d8-0e575e149c61",
              "leftValue": "={{ $('Start').item.json.thumb_media_id }}",
              "rightValue": "https://",
              "operator": {
                "type": "string",
                "operation": "startsWith"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        704,
        0
      ],
      "id": "4ec6779d-b1d6-4ded-88f6-b3eb976e8829",
      "name": "CheckMediaIdURL"
    },
    {
      "parameters": {
        "content": "### n8n\u53d1\u9001\u8349\u7a3f\u5230\u5fae\u4fe1\u516c\u4f17\u53f7\u5de5\u4f5c\u6d41\n\n**\u4f5c\u8005**\uff1a\u5b59\u535a\u58eb(SunBooshi)\n**\u65e5\u671f**\uff1a2026-01-17\n\n**\u63cf\u8ff0\uff1a**\n\u672c\u5de5\u4f5c\u6d41\u9002\u5e94\u4e8en8n\uff0c\u7801\u901a\u8fc7\u8c03\u7528\u516c\u4f17\u53f7\u5e73\u53f0\u76f8\u5173\u63a5\u53e3\uff0c\u5b9e\u73b0\u53d1\u8349\u7a3f\u529f\u80fd\u3002\n\u4f7f\u7528\u524d\u8bf7\u901a\u8fc7 NoteToMP \u63d2\u4ef6\u751f\u6210\u5de5\u4f5c\u6d41\u8c03\u7528 Token\uff0c\nToken \u751f\u6210\u53ca\u8be6\u7ec6\u7528\u6cd5\u8bf7\u53c2\u8003\u6587\u6863\uff1a\nhttps://gist.github.com/sunbooshi/8f48009feaf9fc37ff8a14908e40df2d\n\n\u7248\u6743\u6240\u6709 \u00a9 2026 \u5b59\u535a\u58eb(SunBooshi)\uff0c\u4fdd\u7559\u6240\u6709\u6743\u5229\u3002\n\u672a\u7ecf\u4f5c\u8005\u4e66\u9762\u8bb8\u53ef\uff0c\u4e0d\u5f97\u7528\u4e8e\u4efb\u4f55\u5546\u4e1a\u7528\u9014\u3002\n\u672c\u5de5\u4f5c\u6d41\u9996\u6b21\u5b8c\u6210\u5e76\u6295\u5165\u4f7f\u7528\u65f6\u95f4\u65e9\u4e8e\u4efb\u4f55\u7b2c\u4e09\u65b9\u516c\u5f00\u7248\u672c\u3002\n\u5982\u4f7f\u7528\u6216\u57fa\u4e8e\u672c\u5de5\u4f5c\u6d41\u8fdb\u884c\u4fee\u6539\uff0c\u5fc5\u987b\u4fdd\u7559\u672c\u58f0\u660e\u53ca\u4f5c\u8005\u4fe1\u606f\u3002\n\u5982\u53d1\u73b0\u4fb5\u6743\u884c\u4e3a\uff0c\u4f5c\u8005\u4fdd\u7559\u4f9d\u6cd5\u8ffd\u7a76\u6cd5\u5f8b\u8d23\u4efb\u7684\u6743\u5229\u3002",
        "height": 368,
        "width": 528,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -640
      ],
      "typeVersion": 1,
      "id": "2686ceee-38fd-4a45-8bd9-9657ed6451bd",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## \u8fd4\u56de\u7ed3\u679c\n\n| \u53c2\u6570\u540d      | \u7c7b\u578b     | \u8bf4\u660e                  |\n| -------- | ------ | ------------------- |\n| code     | number | 0\u8868\u793a\u521b\u5efa\u8349\u7a3f\u6210\u529f\uff0c\u5176\u5b83\u503c\u5219\u53d1\u5e03\u5931\u8d25  |\n| message  | string | \u7ed3\u679c\u63cf\u8ff0                |\n| media_id | string | \u8349\u7a3f\u7684media_id\uff0c\u53ef\u7528\u4f5c\u540e\u7eed\u64cd\u4f5c |\n",
        "width": 480
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1824,
        -240
      ],
      "typeVersion": 1,
      "id": "97e47c93-182e-49a6-bd6b-035820f17fba",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "jsCode": "return $input.all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -240,
        384
      ],
      "id": "2fb3bf36-ae49-418f-8cb1-e250c807b423",
      "name": "DumyInput"
    },
    {
      "parameters": {
        "url": "https://obplugin.dualhue.cn/v1/workflow/token",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpBearerAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -64,
        384
      ],
      "id": "4b76fd57-561c-4f9e-9e8b-883e73861687",
      "name": "RequestAccessToken",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.weixin.qq.com/cgi-bin/material/add_material",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "access_token",
              "value": "={{ $json.token }}"
            },
            {
              "name": "=type",
              "value": "image"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "media",
              "inputDataFieldName": "=data"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        320,
        384
      ],
      "id": "fb2e06db-72c0-48db-9859-44db0685b3d2",
      "name": "UploadCoverImage"
    },
    {
      "parameters": {
        "content": "## \u5c01\u9762\u4e0a\u4f20\n\n\u5982\u9700\u5c06\u5927\u6a21\u578b\u751f\u6210\u7684\u56fe\u7247\u4f5c\u4e3a\u5c01\u9762\uff0c\u8bf7\u590d\u5236\u7eff\u6846\u5185\u7684\u8282\u70b9\u5230\u60a8\u7684\u5de5\u4f5c\u6d41\u4e2d\u3002",
        "height": 320,
        "width": 912,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        256
      ],
      "typeVersion": 1,
      "id": "3a3e42a7-bb05-46d8-9e53-8e14ee1df873",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "2ec80ea8-26c9-4b06-875d-2fe680b11128",
              "name": "token",
              "value": "={{ $json.token }}",
              "type": "string"
            },
            {
              "id": "9fe5b17f-0a04-4ed3-9644-8fdd0b1a0e10",
              "name": "data",
              "value": "={{ $('DumyInput').item.binary.data }}",
              "type": "binary"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        128,
        384
      ],
      "id": "dbabeb5c-c2e1-45a3-bfaf-490c62a22517",
      "name": "PrepareParams"
    },
    {
      "parameters": {
        "jsCode": "const res = JSON.parse($input.first().json.data);\nlet code = 0;\nlet message = 'sucess';\nlet media_id = '';\nif (res.errcode) {\n  code = res.errcode;\n  message = res.errmsg;\n}\nif (res.media_id) {\n  media_id = res.media_id;\n}\n\nreturn {code, message, media_id}\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        496,
        384
      ],
      "id": "37373da3-7842-4bfe-ae40-fadf9b4f8a07",
      "name": "FormatResult"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "383266a9-91f6-4b83-b448-da9e967b310c",
              "name": "image",
              "value": "iVBORw0KGgoAAAANSUhEUgAAALAAAACwCAYAAACvt+ReAAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAoGSURBVHgB7d0/dhs3FwXwK+YrvlJluoxXYKVLl7GqdJa7dFa6dLK7dJa6dI5XIGoFVjZg0V060ysIsoIwG7DyXvgY8yiiOPhHDoD7O4eHtjw+ljFXjxgMBgCIiIiIiIiIiIiIiIiIiIiI6nEA8tb3/aG8dfI6stdXBwcH+vvDtdc6J6/F7e3tQt4/2u/n+prNZgtQMAZ4IAltL2/f6i8lrD3SmUuw38v7tYR5BvLCAD/AQnsigX2O/1bVHLRKX8v7FcM8DAN8D8ntqbw9T1xpfTkJ84XkeAraiAFeo8GV0L7Csn87FhrkqQT5AvQfDDCWXQU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q/9Pru1+3j9YZAtTYTrH2UoHvsumYUztBp/Lrb7E/qU7Ipq0YOgS60056y36fG07uNbgrowjwytoJ6uQEnWMZ5A75/aHzUvXpkoRXzNn2EllrpyML8q7aaS7/3q+J2ynKqAK8sur76a/1JOmbNJzuz6wVJ0UwtPE/SgXRGWHXmcYoO8+ve9MbIPjcTj2W7aTvqT7BtJ3e22J7udopyij6wD4s0B2W2912tqvjpt1D9QTopBmH5ZCUvma7OBFPnjz5gHu25JXvZSr/frLJLJust5O0kf76EA+3kw59/fOOHbZTrOICXAoJ8O2GP9KbOo9ASXCXogzs43yTzvabpgQY4DyOtvx5D0qCAc5A+pxPtxzSg5JggBOzTar7h46RgD8HJcEAp9cPOOZwSz+ZBmKAE7NbvUMMPY4ewAAnZFW1G3Ks3nCw7gZFYIAT8qi+K6zCkXgjIxGbYHMJT3L361EJd7zGihU4kYDqu+IdevqMAU7g+Pg4eI6u9YVPQEHYhYhkUz9/R5yFPYbjQF5YgSPonAYJ7w3i6dwIdiUCMMARJpOJhq5DAtaVeA3y8gUoiPZ75WP/RyQkIf6m6zo457y2W20ZAxzAwnuODLQSS4glw+4jaCsG2FPO8K7o41MS4r8kxL+BHsQAe7A+6k/YAQnxd+xObMdhtAFsqOwttk9UT06foZO3l2N5CnhsGOAtdGjAwrvPx4CyrK1bAwZ4A3tu7ZcxTT63vvcbVuPPGOA7LLhntmDIGB++dLbDzxTEAK8UENy7GGQwwKtJ6CfWVSjxcXdnK+dctNhHbi7AVml1NOHEnh7uUA/di0KH3a73vejerjQTYFtq6dKWWWqCVeYfaq7MzUzm0aclWgqvsoX+qn5sqaXZaE0OPU0mdZ/iUS6vmoNtmnKKtizsTh4RERERERERERERERERkYe/Aeg0dKfgKP76AAAAAElFTkSuQmCC",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -848,
        384
      ],
      "id": "decddd78-dec3-4a3c-9e5d-d8f1ff5f732f",
      "name": "TESTSet"
    },
    {
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "image",
        "options": {
          "fileName": "cover.png",
          "mimeType": "image/png"
        }
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        -672,
        384
      ],
      "id": "36f1a787-ac13-4ba6-a1f7-d456603a7e87",
      "name": "TESTConvert"
    },
    {
      "parameters": {
        "content": "## \u6d4b\u8bd5\u8282\u70b9\n**\u8fd9\u4e24\u4e2a\u662f\u6d4b\u8bd5\u8282\u70b9\uff0c\u8bf7\u4e0d\u8981\u590d\u5236\uff01**",
        "height": 320,
        "width": 336,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        256
      ],
      "typeVersion": 1,
      "id": "641122f8-1a6d-4986-ba63-804055fe387b",
      "name": "Sticky Note4"
    }
  ],
  "connections": {
    "AccessToken": {
      "main": [
        [
          {
            "node": "CheckMediaIdEmpty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetCoverMaterial": {
      "main": [
        [
          {
            "node": "GetMediaId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PrepareData": {
      "main": [
        [
          {
            "node": "AddDraft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetMediaId": {
      "main": [
        [
          {
            "node": "PrepareData",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start": {
      "main": [
        [
          {
            "node": "CheckInput",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CheckInput": {
      "main": [
        [
          {
            "node": "Error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AccessToken",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DownloadCover": {
      "main": [
        [
          {
            "node": "UploadCover",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UploadCover": {
      "main": [
        [
          {
            "node": "UpdateCover",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateCover": {
      "main": [
        [
          {
            "node": "PrepareData",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AlignParam": {
      "main": [
        [
          {
            "node": "PrepareData",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AddDraft": {
      "main": [
        [
          {
            "node": "CheckResult",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CheckMediaIdEmpty": {
      "main": [
        [
          {
            "node": "GetCoverMaterial",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "CheckMediaIdURL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CheckMediaIdURL": {
      "main": [
        [
          {
            "node": "DownloadCover",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AlignParam",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DumyInput": {
      "main": [
        [
          {
            "node": "RequestAccessToken",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RequestAccessToken": {
      "main": [
        [
          {
            "node": "PrepareParams",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PrepareParams": {
      "main": [
        [
          {
            "node": "UploadCoverImage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UploadCoverImage": {
      "main": [
        [
          {
            "node": "FormatResult",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TESTSet": {
      "main": [
        [
          {
            "node": "TESTConvert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TESTConvert": {
      "main": [
        [
          {
            "node": "DumyInput",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "115d625f-caf1-4fe1-8e7f-e39134ae00a1",
  "id": "BMY_2Dt7IF-h7orULtKVc",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

发草稿到公众号. Uses httpRequest, executeWorkflowTrigger, stopAndError. Event-driven trigger; 27 nodes.

Source: https://gist.github.com/sunbooshi/8f48009feaf9fc37ff8a14908e40df2d — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

Upload files from any source to your account Kommo or AmoCRM with a simple and reusable workflow. It can split a large file into small ones and upload chunks. Works for Kommo and amoCRM There are 3 re

HTTP Request, Execute Workflow Trigger, Stop And Error
Web Scraping

It validates all inputs, queries providers sequentially, and merges results into a single enforced output schema. The workflow is designed to guarantee complete coverage for the requested currencies.

Stop And Error, HTTP Request, Execute Workflow Trigger
Web Scraping

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

N8N Nodes Webpage Content Extractor, HTTP Request, Stop And Error +1
Web Scraping

This workflow is designed to translate a video accessible by URL (supported sources: YouTube, Google Drive, S3, Vimeo, or a direct link) into a language supported by Rask AI.

Execute Workflow Trigger, HTTP Request, Stop And Error
Web Scraping

This workflow integrates the Apache Airflow API DAGRun and XCom. It enables n8n to trigger Airflow DAGs and retrieve the execution results. Update Airflow API Link Prefix Navigate to the node. Update

HTTP Request, Stop And Error, Execute Workflow Trigger