# How we answer HR policy questions automatically

The HR-policy helpdesk agent we run on Kortix — connected to Gmail, our Notion policy library, and Slack. Every 15 minutes it reads new questions from the HR inbox, answers strictly from documented policy, and drafts a reply for HR to send — escalating anything ambiguous, legal, personal, or compensation-related to Slack instead of answering it.

Canonical page: https://openchatly.com/use-cases/hr-policy-qa

The same handful of policy questions land in the HR inbox every week — how much
PTO carries over, what the remote-work policy actually allows, how the expense
limit works for a conference, when parental leave starts accruing. The answers
are documented, sitting in a Notion policy library the whole company can already
read. But finding the right page, quoting it accurately, and drafting a reply
takes a person's attention away from the HR work that actually needs a person: the
exception request, the accommodation, the sensitive conversation.

We run an HR-policy helpdesk agent on Kortix that reads the inbox every 15
minutes, answers what's documented, and hands off everything else. It never
sends an email itself and it never decides a policy question the library doesn't
already answer — it drafts, or it escalates, and a human takes it from there.

- **Team:** Kortix
- **Runs on:** Every 15 minutes
- **Connected systems:** Gmail · Notion · Slack
- **Mode:** Fresh session · drafts only · escalates the rest

## The problem

HR policy questions are high-volume and low-variance — most of them are already
answered, word for word, somewhere in the policy library. But the inbox doesn't
know that. Every question waits in the same queue whether it's "how many sick
days do I have" or "I need to discuss a medical accommodation," and someone has
to open each thread to find out which one it is before they can even start
answering.

A canned FAQ page only helps the employee who thinks to check it. A shared doc
link in an auto-reply doesn't parse the actual question or point at the specific
section that answers it. And routing everything to a person means the easy,
already-documented questions compete for the same attention as the ones that
genuinely need HR's judgment — the legal questions, the personal situations, the
comp conversations — which is exactly backwards.

## What we built

On Kortix, a cron fires every 15 minutes and spawns a fresh session with
read-only access to the HR Gmail inbox and the Notion policy library, plus a
channel into Slack. It reads new questions, classifies each one, and for
anything the library documents, searches for the exact policy section and drafts
a grounded reply as a Gmail draft — never sent automatically. Anything ambiguous,
legal, personal, or compensation-related gets posted to the HR Slack channel
instead, with the question and the reason it needs a person, and the agent does
not attempt an answer.

## How it works

### Copy the setup prompt into a new session

Open your Kortix workspace, start a new session, paste this prompt and send it.
The agent writes the agent file, the policy-qa skill and the
15-minute trigger, and opens a change request for you to review.
Prefer clicks? Choose **Use this template** instead.

**Setup prompt**

```
Set up an HR policy question agent in this workspace.

1. Create the agent agents/hr-policy-qa.md. Its job is to answer documented policy questions in the HR inbox and escalate the rest. It may use the Gmail and Notion connectors and the Slack channel.

2. Create the skill skills/policy-qa/SKILL.md with these rules:
   - Only work Gmail threads with no hr-qa label. Labels are the only state between runs.
   - Answer only from the policy library in Notion, and quote or closely paraphrase the policy section you used.
   - Escalate anything ambiguous, legal, personal or about compensation, and anything the library does not clearly cover. When in doubt, escalate.
   - Save every answer as a Gmail draft and label the thread hr-qa/drafted. Never send an email.
   - Post each escalation to #hr-team with the question and the reason, and label the thread hr-qa/escalated. Never grant a policy exception.

3. Add a cron trigger hr-inbox-check to kortix.yaml. It runs the hr-policy-qa agent every 15 minutes with the prompt "Load the policy-qa skill and run one complete pass over the HR inbox."

4. Tell me which of these connectors are not connected yet.

5. Open a change request with all of it. Do not merge it.
```

### Connect your tools

Open **Connectors** in your workspace and connect Gmail and Notion, then
connect Slack under **Channels**. Credentials are brokered server-side and
never enter the agent's machine.

- **Gmail** (Required):
Reads new questions and drafts grounded replies.
- **Notion** (Required):
Looks up the documented policy behind each answer.
- **Slack** (Required):
Escalates questions that need HR's judgment.

### Run it once with this prompt

Merge the change request, then start a session with the **hr-policy-qa** agent
and send this prompt. Read the drafts and the escalations before you
let the schedule take over.

**Prompt**

```
Run one pass over the HR inbox.

1. Find threads with no hr-qa label.
2. Classify each question as answerable from policy or as one to escalate. When in doubt, escalate.
3. For each answerable question, find the policy section in Notion and save a Gmail draft that quotes it. Label the thread hr-qa/drafted.
4. Post each escalation to #hr-team with the question and the reason. Label the thread hr-qa/escalated.
5. Never send an email and never make a policy exception.
```

### Let the 15-minute schedule take over

The change request added this trigger to `kortix.yaml`. From now on the agent
runs every 15 minutes, each run in a new session on its own cloud computer.
To change the time, edit the cron line, or open **Triggers** in the workspace.

**kortix.yaml**

```yaml
triggers:
  - slug: hr-inbox-check
    name: HR inbox check
    on:
      cron: "0 */15 * * * *"
    run:
      agent: hr-policy-qa
      prompt: Load the policy-qa skill and run one complete pass over the HR inbox.
```

### Escalate anything legal, personal or about pay

A question that is ambiguous, legal, personal or about compensation goes to
the HR channel with no attempted answer, every time. So does any question
the library does not clearly cover. The agent never sends an email: HR reads
each draft and sends it or not. It never edits the policy library.

### Read the drafts and escalations

Each pass ends with drafts in Gmail and escalations in the channel. This is what a run looks like in the session:

> **HR inbox check · 10:15**
>
> Prompt: Load the policy-qa skill and run one complete pass over the HR inbox.
>
> Worked **4** new questions. Drafted **3** replies from the policy library,
> on PTO carryover, the holiday schedule and remote work. Escalated **1**
> question about a bonus to #hr-team.

> **The pattern**
> A 15-minute **cron** spawns a fresh session with read-only access to Gmail and
> Notion and a channel into Slack. The triage and answering rules live as a
> **skill**. The agent drafts from documented policy or escalates — it never
> sends and it never makes a policy call the library hasn't already made.

## Make it do more

Once it works, paste any of these into the same session.

**Find policy gaps**

```
Every Friday, post to #hr-team the topics that were escalated as not covered by the library this week, with a count for each.
```

**Remind on old drafts**

```
When a draft has waited more than 24 hours without being sent, post its thread link to #hr-team.
```

**Answer in the employee's language**

```
When a question is not in English, draft the reply in the language of the question and quote the policy in English below it.
```

## Guardrails

The agent touches an employee's inbox and the company's policy record, so its
access is scoped and every output is held for a person:

- **Answer from documented policy only.** The agent never invents, infers, or
  extends a policy beyond what's written in the Notion library. If the library
  doesn't clearly cover the question, it escalates instead of guessing.
- **Drafts only, never sends.** Every reply the agent writes is a Gmail draft.
  HR reviews and sends it; the agent has no send authority.
- **No exceptions, ever.** The agent cannot grant, waive, or bend a policy —
  that judgment call belongs to HR, not the agent.
- **Hard escalation triggers.** Anything ambiguous, legal in nature, about an
  individual's personal situation, or related to compensation is routed to Slack
  for a human, with no attempted answer.
- **Read-only into the policy library.** The agent never edits a Notion page.
- **Scoped secrets.** Gmail and Notion access is brokered through connectors,
  scoped to the agents you grant them to.

## The outcome

- **Every 15 min:** Inbox checked against the current policy library
- **Drafts only:** Every reply is a Gmail draft; HR sends it
- **0 exceptions:** Ambiguous, legal, personal, and comp questions always escalate

The routine policy questions that used to sit in the queue behind everything
else now get a cited, ready-to-send draft within 15 minutes, quoting the exact
policy that answers them. The questions that actually need HR's judgment show up
in Slack immediately, with nothing guessed at in between. The agent reads and
drafts; HR decides and sends.
