More

Book a free call
Fixed price in writing before we start

VAT white list check in n8n: verify Polish contractors from a sheet before paying

A list of contractors in Google Sheets, and before every transfer someone pastes tax numbers into the Ministry of Finance search page by hand. This n8n workflow does it instead: it validates the NIP, queries the white list API, compares the bank account and returns a plain verdict.

Author

Published:
Last verified:
n8n version:
2.8.4

In short

What it does

  • Reads contractors from Google Sheets on demand or on weekdays at 7:00
  • Normalises the NIP and checks its checksum locally
  • Queries the Ministry of Finance VAT register API for today's status
  • Compares the bank account in the sheet with the accounts in the register
  • Returns ACTIVE, NOT_ACTIVE, NOT_FOUND or INVALID_NIP

What it does not do

  • Does not write results back to the sheet
  • Does not keep the request ID as proof of the check
  • Cannot get around the limit of 100 requests a day
  • Is not tax advice

What it needs

  • n8n (tested on 2.8.4)
  • A Google account with access to the sheet
  • Columns: NIP, company name, optionally the bank account

VAT white list check in n8n: verify Polish contractors from a sheet before paying

In Poland, anyone paying an invoice above 15,000 PLN should check that the supplier's bank account is in the VAT taxpayer register, known as the white list. In small companies the routine looks the same everywhere: a spreadsheet of contractors and someone pasting tax numbers one by one into the Ministry of Finance search page.

This n8n workflow takes that job over. It reads the sheet, drops invalid tax numbers, queries the official API and returns one of four verdicts per row.

Workflow canvas for the VAT white list check: two triggers, column settings, reading contractors from a sheet, NIP validation, the Ministry of Finance API call and the verdict
The whole workflow after import. The NIP checksum runs before the API call, so a malformed number never uses up the daily limit.

Checksum first, API second

A Polish NIP has a check digit. A typo in the sheet can be caught without asking anyone, so the first step normalises the number (dashes and spaces removed) and checks the weights.

normalize-and-validate-nip.js
function checksumOk(nip) {
  if (!/^\d{10}$/.test(nip)) return false;
  const w = [6, 5, 7, 2, 3, 4, 5, 6, 7];
  const sum = w.reduce((acc, weight, i) => acc + weight * Number(nip[i]), 0);
  return sum % 11 === Number(nip[9]);
}

A NIP that fails this check gets INVALID_NIP, whatever the API says.

Four verdicts instead of a raw response

The API returns result.subject with a statusVat field. An active taxpayer has the value "Czynny" there. The workflow reduces this to four states anyone can read without knowing the API:

VerdictMeaning
ACTIVEactive VAT taxpayer on the date checked
NOT_ACTIVEin the register, but with a status other than active
NOT_FOUNDthe register does not know this NIP on that date
INVALID_NIPthe number failed the checksum

If the sheet has a bank account column, the workflow compares it with the accountNumbers list from the register (spaces removed). account_on_white_list is then true or false. Without the column it stays empty, because missing data is not the same as a negative result.

The output starts with a summary such as "3 of 40 contractors need attention before payment". That is the one number someone looks at every morning.

The API limit

For longer lists you need batched requests (up to 30 NIPs at once) or to split the sheet across days.

Configuration

ParameterDefaultPurpose
whiteListApihttps://wl-api.mf.gov.pl/api/search/nip/the NIP search method
nipColumnNIPcolumn with the tax number
nameColumnCompanycolumn with the name, used if the register returns none
accountColumnBank accountcolumn with the account to compare

The schedule is weekdays at 7, before anyone starts making transfers.

Limitations

The result stays in the n8n execution. The template does not write verdicts to the sheet or send an alert, so when it runs on the schedule you need to add one of those steps. Otherwise the morning run tells nobody anything.

A NIP rejected by the checksum still reaches the HTTP node, which fails and is skipped. With 100 requests a day it is better to filter those rows out before the request.

The API response contains a request ID that can serve as proof the account was checked. The template does not store it.

The check is for the day of the run, not the day of the transfer. If payment goes out a few days later, check again.

When it does not make sense

With a handful of regular suppliers a manual check takes a minute, and some banks check the register when you order a transfer. The workflow makes sense when there are dozens of contractors and the payment list is prepared in a spreadsheet before it goes to the bank. If the same should happen inside your accounting system or a team panel, that becomes a process automation project for your company, and for company records you can also enrich companies from a NIP with KRS data.

Take it with you

How to cite this

Adrian Hunia (2026). VAT white list check in n8n: verify Polish contractors from a sheet before paying. SEVENEDGE. https://sevenedge.pl/en/workflows/biala-lista-vat-weryfikacja-kontrahentow (accessed: November 5, 2026)

Sources

  1. Ministerstwo Finansów — Jak korzystać z wykazu podatników VATAPI docs
  2. n8n docs — Google Sheetsn8n docs
  3. n8n docs — HTTP Requestn8n docs

Who is behind this

Adrian Hunia

Co-founder of SEVENEDGE

Co-founder of SEVENEDGE. Designs and deploys business systems for small companies, from production management to time tracking. Works with Next.js, FastAPI and PostgreSQL. SEVENEDGE has no subcontractors — both owners write the code.

Related documents

Other workflows we documented the same way.

7SVENAI assistant, not a human

You are chatting with an AI assistant. Replies are generated by artificial intelligence (Cerebras) and may contain mistakes. Please do not share sensitive data in the chat.

Your personal data is controlled by SEVENEDGE ADRIAN HUNIA. We use your chat messages to answer your questions and, if you ask, to book a meeting. Details and your rights: Privacy policy.

Hi! I'm SVEN, the SEVENEDGE AI assistant. We build apps, SaaS and AI automations. How can I help?
SVEN, the SEVENEDGE mascot, looking through a requestSVEN, the SEVENEDGE mascot, thinking over a coffeeSVEN, the SEVENEDGE mascot, working at a laptop
Got an app idea?