8
n8n 中文网amn8n.com

使用 Job Search Global API 和 Google Sheets 自动化职位搜索

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 15 个节点。主要使用 If, Set, Code, EmailSend, HttpRequest 等节点。 使用 Job Search Global API 和 Google Sheets 自动化职位搜索

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "1f0a7b3a-a6ab-4fb9-b1ef-4f4d5bc48a01",
      "name": "设置搜索词",
      "type": "n8n-nodes-base.set",
      "position": [
        272,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bb36d63f-a074-40b1-9d83-dd573566f6af",
              "name": "Search Term",
              "type": "string",
              "value": "Web Developer"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0a66e398-1de3-4dd3-8b5f-6fd8c6b6358c",
      "name": "获取职位列表",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        496,
        0
      ],
      "parameters": {
        "url": "https://job-search-global.p.rapidapi.com/search.php",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "pageNumber",
              "value": "1"
            },
            {
              "name": "pageSize",
              "value": "10"
            },
            {
              "name": "searchQuery",
              "value": "={{ $json[\"Search Term\"] }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-rapidapi-host",
              "value": "job-search-global.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "your key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "16e842c1-fd91-4082-b015-387632eff19f",
      "name": "检查 API 响应",
      "type": "n8n-nodes-base.if",
      "position": [
        784,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ef7b71fa-c726-4e08-8fdb-55c215227bb0",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "={{ $json.status }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ec64192d-9865-45f0-b4be-e3ee18ebbe5c",
      "name": "发送失败通知邮件",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1072,
        224
      ],
      "webhookId": "f1359f08-e267-44d2-9fca-505f66b5feb6",
      "parameters": {
        "html": "Hello,\n\nThe job search automation workflow encountered a failure while attempting to fetch job listings from the API.\n\nPlease review the API request and ensure the following:\n- API key and host are valid and not expired.\n- The request payload is correctly formatted.\n- The API endpoint is available.\n\nYou may also want to inspect the response for further debugging.\n\nRegards,  \nn8n Workflow Bot\n",
        "options": {},
        "subject": "🚨 Job Search API Failure Notification",
        "toEmail": "dev@gmail.com",
        "fromEmail": "itadmin@gmail.com"
      },
      "credentials": {
        "smtp": {
          "id": "nPwKPPgVavimTJX4",
          "name": "SMTP account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "96a773ee-a81b-4aca-8ad1-9d982bd0a2cd",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "294c8010-0792-4396-89ec-03ae8c60fe30",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -112
      ],
      "parameters": {
        "height": 240,
        "content": "每6小时自动触发工作流。"
      },
      "typeVersion": 1
    },
    {
      "id": "9765dd80-dc0b-407f-a8b9-1746aaf44161",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        -112
      ],
      "parameters": {
        "height": 240,
        "content": "定义职位搜索关键词(例如\"Web Developer\")。"
      },
      "typeVersion": 1
    },
    {
      "id": "b1607d91-4603-4df8-b35d-7b7bb12ded61",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -112
      ],
      "parameters": {
        "height": 240,
        "content": "向 Job Search Global API 发送 POST 请求。"
      },
      "typeVersion": 1
    },
    {
      "id": "5ca49f7d-2598-4403-ba55-7311e4208d6e",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        -112
      ],
      "parameters": {
        "height": 240,
        "content": "评估 API 是否返回了成功响应。"
      },
      "typeVersion": 1
    },
    {
      "id": "c70bdcd3-313b-4f95-8dc0-4287982f41ae",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -256
      ],
      "parameters": {
        "height": 256,
        "content": "从 API 响应中提取职位列表数组。"
      },
      "typeVersion": 1
    },
    {
      "id": "785dd467-f560-4430-af77-3c935a5c6ccb",
      "name": "保存到 Google Sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1392,
        -128
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "company",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postDate",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "postDate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "jobSource",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "jobSource",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "slug",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "slug",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sentiment",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "sentiment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "dateAdded",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "dateAdded",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tags",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "tags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "viewCount",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "viewCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "title"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "Rt0RWApx8PL9t0RF",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e8456e00-4912-4d6c-a962-717cecf5ef38",
      "name": "提取职位数据",
      "type": "n8n-nodes-base.code",
      "position": [
        1120,
        -144
      ],
      "parameters": {
        "jsCode": "return $input.first().json.data.data;"
      },
      "typeVersion": 2
    },
    {
      "id": "58681808-71b7-4041-b88a-70149c74fbf4",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1312,
        -256
      ],
      "parameters": {
        "height": 256,
        "content": "在特定 Google Sheet 中追加或更新职位列表。"
      },
      "typeVersion": 1
    },
    {
      "id": "4bad0177-fc01-4169-a022-882c1c313d92",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        112
      ],
      "parameters": {
        "height": 288,
        "content": "发送邮件通知 API 失败或错误响应。"
      },
      "typeVersion": 1
    },
    {
      "id": "b0de1b25-f4b1-47dd-8a1b-1c8e47faba4d",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        -368
      ],
      "parameters": {
        "width": 576,
        "height": 880,
        "content": "# 职位搜索自动化工作流"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Set Search Term": {
      "main": [
        [
          {
            "node": "Fetch Job Listings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Job Data": {
      "main": [
        [
          {
            "node": "Save to Google Sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set Search Term",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check API Response": {
      "main": [
        [
          {
            "node": "Extract Job Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Failure Notification Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Job Listings": {
      "main": [
        [
          {
            "node": "Check API Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 内容创作, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量15
分类2
节点类型8
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 查看

分享此工作流