記事一覧
Automations

クライアントからの求人オーダーメールをClaudeやGeminiでCRMに自動登録する方法

クライアントのメールを厳格な抽出ルールでClaudeやGeminiに渡し、担当者が承認してCRMへ。最初のプロンプトでは、Geminiが8項目すべてを推測で埋めました。

  • Saves time
  • Consistent decisions
  • Less legal risk

2026/10/23 · 8 分で読了

プロンプトは英語です。どのAIツールでも英語が最も精度高く機能するためです。

8項目中8項目。クライアントからの乱雑なメール3通を求人オーダーに変換したところ、Geminiは、メールに書かれていない項目のうち私たちが確認したすべてを、自信たっぷりの推測で埋めました。採用担当マネージャー、出社勤務という働き方、募集人数1名です。CRMに入れれば、どれももっともらしく見えます。ところが、すべて間違いです。

結論から: クライアントのメールを1つの受信箱に転送し、自動化ツールで1通ずつ、厳格な抽出プロンプトとともにClaudeかGeminiに渡し、CRMに入れる前に必ず担当のリクルーターが全件を承認する、という流れです。「推測しないこと」と書くだけでは足りませんでした。効果があったのは次の3点です。採用担当マネージャー、募集人数、働き方は記載があるときだけ埋める。各項目には値だけを入れる。差別につながる要望や内容の食い違いはフラグの一覧に回す。最終版のプロンプトでは、Geminiの推測は0項目、Claudeは1項目で、その1項目も自分でフラグを付けていました。それでも、どちらも確認なしでCRMに書き込めるほど安全ではありません。

5つの工程でつくる流れ

報酬条件はAIに埋めさせず、「前回と同じ報酬条件」という記載があればフラグを立てさせます。

  1. 受け口。 転送先アドレスを1つ用意します。Zapierの「New Inbound Email」トリガーは、専用のzapiermail.comアドレス宛のメールで起動します。n8nの「Email Trigger (IMAP)」ノードは共有メールボックスを読み取ります。
  2. 抽出の工程。 メール本文を、後述のプロンプトとともにAPI経由でClaudeかGeminiに渡します。
  3. 厳格なパース。 回答がJSONとして読み取れなければ何も作成せず、そのメールは人に回します。
  4. 確認待ちのキュー。 リクルーターは、私たちのテストで間違いが出た箇所を重点的に確認します。項目の中に混ざったメモ、差別フラグが必要な求人オーダーでのフラグ漏れ、ドメインの一部をそのまま使った会社名(「orchard-foods」)、「the」や「a」を人数と読み違えた募集人数などです。
  5. CRMへの書き込み。 BullhornのREST APIでは、entity/JobOrderにPUTして求人オーダーを作成します。ドキュメントには、必須項目が欠けると400エラーが返るとあります。「記載なし」は空欄にマッピングし、デフォルト値は入れないでください。

テストしたのは工程2と3です。工程1と5は各ベンダーのドキュメントに基づくもので、エンドツーエンドで構築したわけではありません。

最初に削るもの。 転送されたメールのやり取りには、候補者の職務経歴書や電話番号が含まれていることがあります。それらは削除し、添付ファイルは原則として処理せず、会社用のAPIアカウントを使ってください。

アイロン台の上で、くしゃくしゃの紙にアイロンをかけて伸ばしているMaya。アイロンをかけた半分はきれいに整っている

1通のメールを分解する

架空のメールを3通使いました。この1通に、落とし穴のほとんどが入っています。

From: Dana Levi <[email protected]>
Subject: FW: warehouse roles

Hi, see below, can you start on this asap? Actually make it 3 forklift operators not 2, we lost another one Friday.
Dana

---------- Forwarded message ----------
From: Yossi Ben-Ami <[email protected]>
Dana - we need 2 forklift operators for the Ashdod site, night shift (22:00-06:00), must have a valid forklift license. Pay 58 per hour plus night bonus. Also a shift supervisor for the same site, someone with 3+ years running a team of 10+. Ideally young guys who can handle the physical side, under 30. Start beginning of next month.
Yossi

最初のプロンプトでのフォークリフト求人の結果:

項目 メールの内容 Claude (Opus 5.5) Gemini (3.8 Flash)
headcount 2名、のちに「make it 3」 3名、食い違いのフラグ付き 3名、食い違いのフラグ付き
work_model 記載なし not stated "onsite"
hiring_manager 記載なし(Yossiは依頼を送っただけ) not stated "Yossi Ben-Ami"
client_company メールのドメインのみ "Orchard Foods (taken from the email domain...)" "Orchard Foods"
「under 30」の一文 年齢と性別の希望 必須要件には入れず、フラグを付与 要件には入れず、フラグを付与。別の求人では、この一文を法律に「violates」すると判断した

難しい部分は両方とも正しく処理しました。最新のメールを優先し、年齢の一文を要件にしませんでした。問題はもっと目立たない形で起きていました。しかもClaudeの回答はコードブロックで囲まれていたため、厳格なパーサーが回答全体を弾いてしまいました。

推測で埋められた項目数(メールに記載のない8項目中)
08最初のプロンプト追加した5つのルール最終版のプロンプトClaude, 最初のプロンプト: 2Claude, 追加した5つのルール: 0Claude, 最終版のプロンプト: 1Gemini, 最初のプロンプト: 8Gemini, 追加した5つのルール: 0Gemini, 最終版のプロンプト: 01 Claude0 Gemini

架空のメールで、プロンプトごとに1回実行。確認した項目:メールに記載がない場合の働き方、採用担当マネージャー、募集人数。

Source: 自社テスト、スクリプトで集計

Show the data
最初のプロンプト追加した5つのルール最終版のプロンプト
Claude201
Gemini800

うまくいったプロンプト

ルールはすべて、テストで起きた失敗への対策です。

失敗 実行回 ツール 対策のルール
8項目を推測で記入 1回目 Gemini 採用担当マネージャー、募集人数、働き方は記載があるときのみ
回答がコードブロックで囲まれた 1回目 Claude [ で始まり ] で終わる
会社名の項目にメモが混入 1回目 Claude 項目には値だけを入れる
すべての会社が「Not stated」に 2回目 Claude 会社名はドメインから取ってよい。ただしフラグを付ける
フォークリフト求人で年齢のフラグが抜けた 2回目 Gemini 該当しうる求人すべてにフラグを付ける
会社名がドメインの一部のまま 最終 Gemini 解決せず。CRMへの書き込み前に変換する

構成は、ペルソナ(Persona)、タスク(Task)、背景(Context)、形式(Format)の4つです。

PERSONA
You extract job orders from client emails for a recruitment agency. Your output is checked by a recruiter and then created as records in our CRM.

TASK
For each email, return one JSON object per job order.

CONTEXT
Rules:
- Use only what the emails say. If a field is not stated, write "not stated". Never guess.
- A field holds only its value. Put any note or doubt in flags, never inside another field.
- Write a hiring manager only if the email names that person as the hiring manager. A team name ("Lior's team") or the sender is not enough.
- Write a headcount or work model only if the email states it. "Remote OK" is "not stated"; add a flag asking whether it is remote or hybrid.
- When a forwarded or quoted older message conflicts with the newest message, use the newest message and add a flag.
- Do not copy a discriminatory requirement (age, gender, religion, family status, nationality, health) into must_haves. Put it in flags on every job order it could apply to.
- Do not say whether something is legal or illegal. Flag it for the recruiter to check.
- Do not create a job order for a role the client says is not confirmed. Mention it in flags of the nearest job order instead.
- The company name may come from the sender's email domain. Add a flag saying so.

FORMAT
Each object has exactly these fields:
client_company, client_contact_name, client_contact_email, job_title, headcount (a number or "not stated"), location, work_model ("onsite", "hybrid", "remote" or "not stated"), shift_or_hours, pay (exact wording from the email, not converted), must_haves (a list, only requirements the email states), start_date (as written), hiring_manager, deadline_for_profiles, status ("open" or "on hold"), source_quote (the sentence that creates this job order), missing_info (a list of what a recruiter needs before starting that the email does not give), flags (a list: discriminatory or possibly unlawful requests, conflicting numbers, references to attachments or earlier conversations you cannot see).
Your whole answer must start with [ and end with ]. No code fences, no text before or after.

Emails:
[paste one or more client emails, with From, Date and Subject lines]

1つ直したら別の問題が出たとき

2版目は推測をすべて止めましたが、やりすぎでした。表のとおり、年齢のフラグ漏れは、項目を推測で埋めるより悪い結果です。そのレコードを開いた人には、何も見えないからです。最終版は両方で問題なくパースでき、2件のOrchardの求人とも年齢の一文にフラグを付けました。Claudeの唯一の推測は、「the senior data engineer」から読み取った募集人数1名でしたが、リクルーターに確認を求めるフラグが自ら付いていました。

レコード登録後に使う2つのプロンプト

足りない情報をクライアントに尋ねる。 1社分のレコードを渡します。

Below are job order records extracted from one client's email, with their missing_info and flags. Write a short reply email to the client contact that:
- confirms what we understood in 2-3 lines
- asks only the questions needed to start, as a numbered list of at most 5, most important first
- handles any flagged discriminatory requirement politely: say we can only screen on job-related requirements, and ask what the physical demands of the job are
- does not mention AI, JSON or flags
- is under 150 words, plain and friendly

Records:
[paste the records for one client]

Claudeは年齢の一文を落ち着いた1文で処理しました(引用は「リスク」の項に掲載)。一方で、正確な開始日を尋ねながら「Both roles start in early December」と書いてしまい、150語の上限に対して151語になりました。Geminiは身体的な負荷について尋ねたものの、年齢と性別は条件にできないとは一度も述べませんでした。送る前に必ず目を通してください。

CRMで何が変わるかを確認する。

Below is our current CRM record for a client company and the new job order records extracted from their latest email. List every change the email asks us to make to the client company record, as a table: field | current value | new value | the quote from the email. Do not change anything the email does not mention. Then list anything in the job orders that conflicts with the current record.

Current CRM record:
[paste the client record]

New job orders:
[paste the job order records]

架空のクライアントのレコードで、Claudeは2件の変更を提案し、ハイファの住所を省略せずに知らせるよう求めました。Geminiは、番地までの住所を「Haifa」だけに置き換えました。

このやり方のリスク

  • クライアントの偏見が、そのまま検索条件になる。 「Young guys, under 30」は、紹介事業者が受けてはならない要望です。書面で回答してください。Claudeの次の一文が参考になります。「we can only screen on job-related requirements, so we'll leave age and gender out.」人材を紹介する地域で規制がどう適用されるかは、弁護士に確認してください。これは法的助言ではありません。
  • 気づかれない失敗。 パースは厳格にし、失敗はすべて人に回してください。

次のステップ: 求人オーダーがきれいに登録できるようになったら、ブリーフから求人票を作成してみましょう。CRMがまだスプレッドシートなら、ClaudeがZapier経由でGoogleスプレッドシートにデータを渡す方法も参考になります。

This article is general information, not legal advice. Laws differ by country and change often, so consult your lawyer before you rely on it for your situation.

続きを読む