Azure OpenAI とGoogle Workspace で DEI 資格フィルター Automation

上級

これはContent Creation, Multimodal AI分野の自動化ワークフローで、19個のノードを含みます。主にIf, Code, Gmail, GoogleDrive, GoogleSheetsなどのノードを使用。 Azure GPT-4o、Googleドライブ、テーブルを使ってDEI資格フィルタリングを自動化

前提条件
  • Googleアカウント + Gmail API認証情報
  • Google Drive API認証情報
  • Google Sheets API認証情報
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "dFiA2ofAChCtsSKh",
  "meta": {
    "instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
    "templateCredsSetupCompleted": true
  },
  "name": "Automate DEI Eligibility Screening with Azure OpenAI and Google Workspace",
  "tags": [],
  "nodes": [
    {
      "id": "a8050a45-eb9a-44b5-bbe8-24e1fe813f48",
      "name": "Azure OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        672,
        128
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "id": "C3WzT18XqF8OdVM6",
          "name": "Azure Open AI account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d419a8e2-13ba-4505-9b51-07b7dc07bf2a",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        928,
        128
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"Name\": \"Jyothi\",\n   \"Location\": \"Hyderabad\",\n\t\"Language\": \"Telugu\",\n    \"Gender\" : \"Male\",\n    \"Disability\": \"No\",\n    \"DEI\": \"Yes\",\n    \"Factor\": \"Location\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "9c82394a-aed4-4d09-949d-a66290915071",
      "name": "Google Sheets でシートの行を取得",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        800,
        128
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1P8uforIuBJCkX0i9dl5BgUmzi4Nk63EHyFKLyeQvxT8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1P8uforIuBJCkX0i9dl5BgUmzi4Nk63EHyFKLyeQvxT8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1P8uforIuBJCkX0i9dl5BgUmzi4Nk63EHyFKLyeQvxT8/edit?usp=drivesdk",
          "cachedResultName": "HR Dei"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "sOplQNr4zvwQul4A",
          "name": "jyothi"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e22db6e8-3dca-4f92-964d-307cfff24927",
      "name": "CV トリガー",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        0,
        -96
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "1KyX5RGqeF7v0sAvvaoBnJPTQoq4aOHLz",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1KyX5RGqeF7v0sAvvaoBnJPTQoq4aOHLz",
          "cachedResultName": "HR auto"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "gPmEPTuQP4KLm1KD",
          "name": "jyothi"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2207292d-6455-478d-bcdd-1314066738ea",
      "name": "CV をダウンロード",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        224,
        -96
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $json.webViewLink }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "gPmEPTuQP4KLm1KD",
          "name": "jyothi"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "2d54c6ad-d960-4a5b-971d-853bdddbde47",
      "name": "PDF から抽出",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        448,
        -96
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "ccdb0c73-5757-45f2-84a6-8b22f743786a",
      "name": "DEI 資格を確認",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        736,
        -96
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "=You are an HR analytics assistant that processes candidate resumes and questionnaires and evaluates DEI hire eligibility using organization-defined balance rules. You must never infer protected attributes; only use self-reported data and Google Sheets records. Return strict, valid JSON exactly as specified. If data is missing or uncertain, use null and include conservative confidence scores.\n\nMandatory tooling\n • You MUST use the Google Sheets tool to read current representation of already hired employees before making any DEI eligibility decision.\nstate/country to location_bucket)\n\nObjectives\n • Extract structured proxies from the candidate: gender (self-reported only), location (city/state/country), language(s) (self-reported only), disability (self-reported only)\n• Determine DEI eligibility by comparing candidate’s categories against current workforce representation from the google sheet.\n\nOutput should be:\n- Name (self-reported)\n- gender (self-reported only)\n- location (city/state/country)\n- language (self-reported only)\n- disability (self-reported only)\n- DEI Eligible (Yes/No), If Yes in which factor.\n- Factor\n\nYOu will check the current employees and against this candidate and come to a conslucion whether or not this person is being underpresented in the firm in any factor  "
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "c61ef3a2-4ef5-4a2b-a4a9-07c5db11a212",
      "name": "シートを更新",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1136,
        -96
      ],
      "parameters": {
        "columns": {
          "value": {
            "DEI": "={{ $json.output.DEI }}",
            "Name": "={{ $json.output.Name }}",
            "Factor": "={{ $json.output.Factor }}",
            "Gender": "={{ $json.output.Gender }}",
            "Language": "={{ $json.output.Language }}",
            "Location": "={{ $json.output.Location }}",
            "Disability": "={{ $json.output.Disability }}"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Gender",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Gender",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Disability",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Disability",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Language",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Language",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "DEI",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "DEI",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Factor",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Factor",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1P8uforIuBJCkX0i9dl5BgUmzi4Nk63EHyFKLyeQvxT8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1P8uforIuBJCkX0i9dl5BgUmzi4Nk63EHyFKLyeQvxT8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1P8uforIuBJCkX0i9dl5BgUmzi4Nk63EHyFKLyeQvxT8/edit?usp=drivesdk",
          "cachedResultName": "HR Dei"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "sOplQNr4zvwQul4A",
          "name": "jyothi"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "9ebadf68-ba24-4889-9bcc-e74e39f3aab2",
      "name": "ロジック",
      "type": "n8n-nodes-base.if",
      "position": [
        1360,
        -96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "32ffb27d-1706-4aa8-b64c-9f661a38af22",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.DEI }}",
              "rightValue": "Yes"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ac244e53-235e-425e-bae4-5e9d91aec305",
      "name": "メールを作成",
      "type": "n8n-nodes-base.code",
      "position": [
        1584,
        -96
      ],
      "parameters": {
        "jsCode": "// n8n Code node: build HTML email for DEI eligibility notification\n\n// Input data (replace with values from previous nodes or item fields)\nconst name = $json.Name || \"Candidate\";\nconst location = $json.Location || null;\nconst languages = $json.Language || null; // comma-delimited string\nconst gender = $json.Gender || null;\nconst disability = $json.Disability || null;\nconst deiEligible = ($json.DEI || \"No\").toLowerCase() === \"yes\";\nconst factor = $json.Factor || null;\n\n// Email metadata (adjust as needed or set in Gmail node)\nconst subject = `DEI Eligibility — ${name}`;\nconst preheader = `Candidate ${name} is ${deiEligible ? \"eligible\" : \"not eligible\"} for DEI hire${factor ? ` via ${factor}` : \"\"}.`;\n\n// Build a safe text summary\nconst textSummaryParts = [\n  `Candidate: ${name}`,\n  `DEI Eligibility: ${deiEligible ? \"Yes\" : \"No\"}`,\n];\nif (factor) textSummaryParts.push(`Factor: ${factor}`);\nif (location) textSummaryParts.push(`Location: ${location}`);\nif (languages) textSummaryParts.push(`Language(s): ${languages}`);\ntextSummaryParts.push(`Gender: ${gender ?? \"null\"}`);\ntextSummaryParts.push(`Disability: ${disability ?? \"null\"}`);\nconst textBody = textSummaryParts.join(\"\\n\");\n\n// Basic inline styles for email clients\nconst styles = {\n  container: \"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; color:#111; background:#ffffff; margin:0; padding:0;\",\n  wrapper: \"max-width:640px; margin:0 auto; padding:24px;\",\n  card: \"border:1px solid #e5e7eb; border-radius:12px; padding:20px;\",\n  h1: \"font-size:20px; margin:0 0 12px; color:#111;\",\n  p: \"margin:0 0 12px; line-height:1.5; color:#374151;\",\n  badgeYes: \"display:inline-block; background:#065f46; color:#ffffff; font-weight:600; font-size:12px; padding:6px 10px; border-radius:999px;\",\n  badgeNo: \"display:inline-block; background:#7f1d1d; color:#ffffff; font-weight:600; font-size:12px; padding:6px 10px; border-radius:999px;\",\n  table: \"width:100%; border-collapse:collapse; margin-top:12px;\",\n  th: \"text-align:left; font-size:12px; color:#6b7280; padding:6px 0;\",\n  td: \"font-size:14px; color:#111; padding:6px 0;\",\n  footer: \"margin-top:16px; font-size:12px; color:#6b7280;\",\n  divider: \"height:1px; background:#e5e7eb; border:none; margin:16px 0;\"\n};\n\n// Build HTML email\nconst html = `\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\" />\n  <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n  <title>${subject}</title>\n  <meta name=\"color-scheme\" content=\"light only\" />\n  <meta name=\"supported-color-schemes\" content=\"light\" />\n  <!-- Preheader text -->\n  <span style=\"display:none !important; visibility:hidden; opacity:0; color:transparent; height:0; width:0; overflow:hidden;\">${preheader}</span>\n</head>\n<body style=\"${styles.container}\">\n  <div style=\"${styles.wrapper}\">\n    <div style=\"${styles.card}\">\n      <h1 style=\"${styles.h1}\">DEI Eligibility Review</h1>\n      <p style=\"${styles.p}\">\n        Candidate <strong>${name}</strong> has been evaluated for DEI eligibility.\n      </p>\n      <p style=\"${styles.p}\">\n        Status:\n        <span style=\"${deiEligible ? styles.badgeYes : styles.badgeNo}\">\n          ${deiEligible ? \"DEI Eligible\" : \"Not DEI Eligible\"}\n        </span>\n      </p>\n      ${factor ? `<p style=\"${styles.p}\">Primary eligibility factor: <strong>${factor}</strong>.</p>` : \"\"}\n\n      <hr style=\"${styles.divider}\" />\n\n      <table role=\"presentation\" style=\"${styles.table}\">\n        <tbody>\n          <tr>\n            <th style=\"${styles.th}\">Name</th>\n            <td style=\"${styles.td}\">${name}</td>\n          </tr>\n          <tr>\n            <th style=\"${styles.th}\">Location</th>\n            <td style=\"${styles.td}\">${location ?? \"—\"}</td>\n          </tr>\n          <tr>\n            <th style=\"${styles.th}\">Language(s)</th>\n            <td style=\"${styles.td}\">${languages ?? \"—\"}</td>\n          </tr>\n          <tr>\n            <th style=\"${styles.th}\">Gender</th>\n            <td style=\"${styles.td}\">${gender ?? \"null\"}</td>\n          </tr>\n          <tr>\n            <th style=\"${styles.th}\">Disability</th>\n            <td style=\"${styles.td}\">${disability ?? \"null\"}</td>\n          </tr>\n          <tr>\n            <th style=\"${styles.th}\">DEI Eligible</th>\n            <td style=\"${styles.td}\">${deiEligible ? \"Yes\" : \"No\"}</td>\n          </tr>\n          ${factor ? `\n          <tr>\n            <th style=\"${styles.th}\">Factor</th>\n            <td style=\"${styles.td}\">${factor}</td>\n          </tr>` : \"\"}\n        </tbody>\n      </table>\n\n      <p style=\"${styles.footer}\">\n        This notification is generated automatically from the latest evaluation records.\n      </p>\n    </div>\n  </div>\n</body>\n</html>\n`;\n\n// Return for downstream Gmail node (use fields: subject, html, text)\nreturn [\n  {\n    json: {\n      subject,\n      html,\n      text: textBody\n      // Optionally include \"to\" and \"from\" here or set them in the Gmail node configuration.\n      // to: \"manager@company.com\",\n      // from: \"automations@techdome.ai\"\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "9ae3966c-09cb-4e5d-9a9a-94ed01b52229",
      "name": "マネージャーへメール送信",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1808,
        -96
      ],
      "webhookId": "1b8b6079-b721-4612-b513-cddb5ecfa677",
      "parameters": {
        "sendTo": "jyothi.swarup@techdome.net.in",
        "message": "={{ $json.html }}",
        "options": {},
        "subject": "={{ $json.subject }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "70f5n8rPahCANHs7",
          "name": "jyothi"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "3627dee6-a28a-410f-8a57-23d94b7a5869",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -112
      ],
      "parameters": {
        "content": "## CV Trigger  \nWatches Google Drive for newly added CV files and starts the workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "6cc70516-452d-4ace-b42a-0a9eaa97f53e",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -288
      ],
      "parameters": {
        "content": "## Download CV  \nFetches the detected CV file from Drive and makes it available for processing."
      },
      "typeVersion": 1
    },
    {
      "id": "c3c3ebeb-be02-4d71-a4ca-5844a1c1baa8",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        96
      ],
      "parameters": {
        "content": "## Extract From PDF  \nParses the CV PDF to extract key text and structured fields."
      },
      "typeVersion": 1
    },
    {
      "id": "4bdbcfdf-565a-4f21-bb12-03010a41267b",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -288
      ],
      "parameters": {
        "content": "## Azure OpenAI Chat Model  \nUses GPT on Azure OpenAI to analyze extracted CV content and generate insights."
      },
      "typeVersion": 1
    },
    {
      "id": "458dbccb-2ba7-4123-a489-c0a576e377bd",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        96
      ],
      "parameters": {
        "content": "## Update on Sheet  \nAppends the analyzed results and eligibility status back to the Google Sheet."
      },
      "typeVersion": 1
    },
    {
      "id": "c6d4c2c5-a84f-4423-b163-c2fe27641b86",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        96
      ],
      "parameters": {
        "content": "## Create Email  \nGenerates a tailored email based on the candidate’s analysis and sheet data."
      },
      "typeVersion": 1
    },
    {
      "id": "408efdea-b86a-442b-9b5f-7f16e1a7892c",
      "name": "付箋6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        -304
      ],
      "parameters": {
        "content": "## Email to Manager  \nSends the composed summary email to the hiring manager for review."
      },
      "typeVersion": 1
    },
    {
      "id": "770d70e4-6035-4551-8746-f1db3a367b56",
      "name": "付箋7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        -288
      ],
      "parameters": {
        "content": "## Logic  \nEvaluates conditions and routes the flow using true/false branches to control execution."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c99e6cbc-64e8-488b-93e9-7e3b09131955",
  "connections": {
    "9ebadf68-ba24-4889-9bcc-e74e39f3aab2": {
      "main": [
        [
          {
            "node": "ac244e53-235e-425e-bae4-5e9d91aec305",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e22db6e8-3dca-4f92-964d-307cfff24927": {
      "main": [
        [
          {
            "node": "2207292d-6455-478d-bcdd-1314066738ea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2207292d-6455-478d-bcdd-1314066738ea": {
      "main": [
        [
          {
            "node": "2d54c6ad-d960-4a5b-971d-853bdddbde47",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ac244e53-235e-425e-bae4-5e9d91aec305": {
      "main": [
        [
          {
            "node": "9ae3966c-09cb-4e5d-9a9a-94ed01b52229",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c61ef3a2-4ef5-4a2b-a4a9-07c5db11a212": {
      "main": [
        [
          {
            "node": "9ebadf68-ba24-4889-9bcc-e74e39f3aab2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2d54c6ad-d960-4a5b-971d-853bdddbde47": {
      "main": [
        [
          {
            "node": "ccdb0c73-5757-45f2-84a6-8b22f743786a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a8050a45-eb9a-44b5-bbe8-24e1fe813f48": {
      "ai_languageModel": [
        [
          {
            "node": "ccdb0c73-5757-45f2-84a6-8b22f743786a",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "d419a8e2-13ba-4505-9b51-07b7dc07bf2a": {
      "ai_outputParser": [
        [
          {
            "node": "ccdb0c73-5757-45f2-84a6-8b22f743786a",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "ccdb0c73-5757-45f2-84a6-8b22f743786a": {
      "main": [
        [
          {
            "node": "c61ef3a2-4ef5-4a2b-a4a9-07c5db11a212",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9c82394a-aed4-4d09-949d-a66290915071": {
      "ai_tool": [
        [
          {
            "node": "ccdb0c73-5757-45f2-84a6-8b22f743786a",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - コンテンツ作成, マルチモーダルAI

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
上級
ノード数19
カテゴリー2
ノードタイプ12
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
Rahul Joshi

Rahul Joshi

@rahul08

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34