# Screen CVs with OpenAI and PostgreSQL: n8n workflow template

> Started by another system calling it, and works across Postgres. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/screen-cvs-with-openai-and-postgresql (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Content](https://millionrounds.com/workflows?category=Content#library)

# Screen CVs with OpenAI and PostgreSQL

Started by another system calling it, and works across Postgres. It hands the judgement calls to OpenAI. 21 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fscreen-cvs-with-openai-and-postgresql)

**21 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**1** Loop or waits

**1** Service it connects to

## The flow

Starts it 1 Model 5 Logic 6 Service 9

The steps in the order they run, from what starts it.

- 1 **Receive CVs** Webhook *Starts it*
- 2 **Fetch Job and Candidates** Postgres *Service*
- 3 **Job Template exists?** If *Logic*
- 4 **Prepare Candidates** Code *Logic*
- 5 **Prompt 0, Extract Job Template** Open Ai *Model*
- 6 **Loop Candidates** Split In Batches *Logic*
- 7 **Save Job Template** Postgres *Service*
- 8 **Prompt 1, Score** Open Ai *Model*
- 9 **Prompt 2, Gaps** Open Ai *Model*
- 10 **Prompt 3, Interview Questions** Open Ai *Model*
- 11 **Build Analysis Payload** Code *Logic*
- 12 **Save Analysis** Postgres *Service*
- 13 **Update Candidate Status** Postgres *Service*
- 14 **Check Pending Candidates** Postgres *Service*
- 15 **All Candidates Processed?** If *Logic*
- 16 **Update Job Status** Postgres *Service*
- 17 **Fetch Full Pool** Postgres *Service*
- 18 **Fetch Job for Summary** Postgres *Service*
- 19 **Prompt 4, Executive Summary** Open Ai *Model*
- 20 **Build Summary Payload** Code *Logic*
- 21 **Save Summary** Postgres *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 21, with 2 branches, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Postgres
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Postgres account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 21 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 21 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fscreen-cvs-with-openai-and-postgresql)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Postgres](https://millionrounds.com/workflows?service=Postgres#library)

## Workflows like it

Also content, with the same services where possible, closest in size first.

- [**Gate pgvector indexing by checking consent in Postgres** 21 steps · calls a model · Postgres, Slack](https://millionrounds.com/workflow/gate-pgvector-indexing-by-checking-consent-in-postgres)
- [**Query PostgreSQL from Slack with Google Sheets and Gemini** 21 steps · calls a model · Google Sheets, Postgres](https://millionrounds.com/workflow/query-postgresql-from-slack-with-google-sheets-and-gemini)
- [**Create secure human-in-the-loop approval flows with Postgres** 21 steps · Postgres, Telegram](https://millionrounds.com/workflow/create-secure-human-in-the-loop-approval-flows-with-postgres)
- [**Cross-post RSS feed articles to X, LinkedIn and Facebook** 21 steps · LinkedIn, Postgres](https://millionrounds.com/workflow/cross-post-rss-feed-articles-to-x-linkedin-and-facebook)
- [**Evaluate organizational data maturity and email HTML reports** 21 steps · Email, Postgres](https://millionrounds.com/workflow/evaluate-organizational-data-maturity-and-email-html-reports)
- [**Social media campaign manager with LinkedIn and Postgres** 21 steps · Email, LinkedIn](https://millionrounds.com/workflow/social-media-campaign-manager-with-linkedin-and-postgres)
