All articles
Automations

How to Automate Client Job Order Emails into Your CRM with Claude or Gemini

Pass each client email to Claude or Gemini with strict extraction rules and have a recruiter approve it. Our first prompt let Gemini guess 8 of 8 fields.

  • Saves time
  • Consistent decisions
  • Less legal risk

Oct 23, 2026 · 9 min read

Eight out of eight. Turning three messy client emails into job orders, Gemini filled every unstated field we checked with a confident guess: a hiring manager, an onsite work model, a headcount of one. Each looks fine in a CRM. Each is wrong.

The short answer: forward client emails to one inbox, have an automation pass each to Claude or Gemini with a strict extraction prompt, and have a recruiter approve every record before the CRM. "Never guess" wasn't enough. What worked: fill hiring manager, headcount and work model only when stated, keep values only in fields, and send discriminatory requests and conflicts to a flags list. With the final prompt, Gemini guessed 0 fields and Claude 1, which it flagged itself. Neither is safe to write to your CRM unchecked.

The pipeline, in five parts

Never let it fill fee terms; let it flag "same fee terms as last time".

  1. A front door. One forwarding address. Zapier's "New Inbound Email" trigger fires on mail sent to a custom zapiermail.com address; n8n's "Email Trigger (IMAP)" node reads a shared mailbox.
  2. The extraction step. The email body goes to Claude or Gemini through the API, with the prompt below.
  3. A strict parse. If the answer doesn't parse as JSON, nothing is created and the email goes to a person.
  4. A review queue. A recruiter checks each record for what our runs got wrong: a note inside a field, a discriminatory flag missing from an order it applies to, a company as a domain slug ("orchard-foods"), a headcount read from "the" or "a".
  5. The CRM write. Bullhorn's REST API creates a job order with a PUT to entity/JobOrder; its docs warn a missing mandatory field returns a 400 error. Map "not stated" to empty, never a default.

We tested steps 2 and 3; steps 1 and 5 come from the vendors' docs, not an end-to-end build.

What to strip first. Forwarded threads can carry a candidate's CV or phone number. Cut those, skip attachments by default, and use a company API account.

Maya ironing a crumpled sheet of paper flat on an ironing board, the ironed half neat with tidy lines

Taking one email apart

Three made-up emails went in. This one holds most of the traps.

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

The first prompt's forklift order:

Field What the email says Claude (Opus 5.5) Gemini (3.8 Flash)
headcount 2, then "make it 3" 3, with a conflict flag 3, with a conflict flag
work_model nothing not stated "onsite"
hiring_manager nothing (Yossi only sent the request) not stated "Yossi Ben-Ami"
client_company only the email domain "Orchard Foods (taken from the email domain...)" "Orchard Foods"
the "under 30" line an age and gender preference kept out of must-haves, flagged kept out, flagged; on another order it ruled the line "violates" the law

Both got the hard part right: newest message wins, and the age line never became a requirement. The damage was quieter, and Claude's code fence made our strict parser reject the whole answer.

Fields filled with a guess, out of 8 the emails never stated
08First promptFive extra rulesFinal promptClaude, First prompt: 2Claude, Five extra rules: 0Claude, Final prompt: 1Gemini, First prompt: 8Gemini, Five extra rules: 0Gemini, Final prompt: 01 Claude0 Gemini

Made-up emails, one run per prompt. Fields checked: work model, hiring manager and headcount where the email is silent.

Source: our test, counted by script

Show the data
First promptFive extra rulesFinal prompt
Claude201
Gemini800

The prompt that held

Every rule in it answers a failure from the runs:

Failure Run Tool Rule that fixed it
8 guessed fields first Gemini hiring manager, headcount, work model only when stated
Answer wrapped in a code fence first Claude start with [ and end with ]
A note inside the company field first Claude a field holds only its value
"Not stated" as every company second Claude the name may come from the domain, with a flag
Age flag dropped from the forklift order second Gemini flag it on every order it could apply to
Companies as domain slugs final Gemini not fixed; map them before the CRM write

It's split into Persona, Task, Context and Format.

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]

When fixing one thing broke another

The second version stopped every guess, then overcorrected, as the table shows: a missing age flag is worse than a guessed field, because nobody opening that record sees it. The final version parsed cleanly in both and flagged the age line on both Orchard orders. Claude's one guess, a headcount of 1 from "the senior data engineer", carried its own flag asking the recruiter to confirm.

Two prompts for after the record

Ask the client what's missing. Feed it one client's records.

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 handled the age line in one calm sentence (quoted under the risks) but told the client "Both roles start in early December" while asking for the exact date, and ran 151 words against a 150 limit. Gemini asked about physical demands but never said age and gender were off the table. Read before sending.

Check what changes in the 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]

On a made-up client record, Claude proposed two changes and asked for the full Haifa address. Gemini replaced the street address with just "Haifa".

The risks in this one

  • A client's bias becomes your search. "Young guys, under 30" is a request an agency must not run. Answer it in writing; Claude's line works: "we can only screen on job-related requirements, so we'll leave age and gender out." Ask your lawyer how the rules apply where you place people; this isn't legal advice.
  • Silent failures. Parse strictly and send every failure to a person.

Next step: once job orders land cleanly, turn the brief into a job description, and see how Claude can feed a Google Sheet through Zapier if your CRM is still a spreadsheet.

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.

Keep reading