See llms.txt for all machine-readable content.

Back to Templates

Monitor Romanian ANAF supplier status weekly with Apify and email alerts

Quick overview

Once a month, this workflow reads your Romanian supplier list from Google Sheets, checks every company in ANAF registers, ANAF financial statements and the court portal (portal.just.ro) via three Apify actors, writes a HIGH/MEDIUM/LOW risk level back to the sheet and emails alerts plus a monthly digest.

How it works

  1. A Schedule Trigger (day 1 of every month, 08:00) or a Manual Trigger starts the run. Settings holds every configurable value: sheet ID and tab, the digest and alert email addresses, and the risk thresholds.
  2. Read suppliers reads the Suppliers tab and Validate CUIs checks each Romanian fiscal code with its control digit. Invalid rows are marked INVALID CUI and never sent anywhere; if no CUI is valid, the workflow stops and sends a short warning email.
  3. Three Apify nodes check the whole list, one actor run per source: ANAF status, financial health and court cases. Each continues on error, so if one source fails the others still run and that section is marked "check failed" in the sheet and in the email.
  4. Score suppliers (Code node) joins the results by CUI and applies simple, documented rules with thresholds from Settings. A failed check never lowers a risk level, and a supplier is never LOW unless all three checks ran.
  5. Write results to sheet updates each row by CUI: risk level, reasons, ANAF status, financial flags, court cases, last checked and the previous risk level.
  6. Build emails sends a Supplier risk alert for suppliers that just moved to HIGH, then a monthly HTML digest of all suppliers sorted by risk, with changes since last month highlighted and a link to the sheet.

Setup

  1. Create a Google Sheet with a tab named Suppliers and these columns in row 1: CUI, Supplier name, Notes, Risk level, Risk reasons, ANAF status, Financial flags, Court cases, Last checked, Previous risk level. Add one CUI per row (with or without "RO"); name and notes are optional.
  2. Install the Apify node if it is missing (@apify/n8n-nodes-apify), then connect credentials: Apify on the three check nodes (OAuth2 on n8n Cloud, where one "Connect to Apify" covers all three; self-hosted can switch Authentication to API Key), Google Sheets on the three sheet nodes and Gmail on the three email nodes.
  3. In Settings, paste the sheet ID (from the sheet URL) and set the digest and alert email addresses. Click Execute workflow to test, then activate it. On the first run every HIGH supplier is reported as new in the risk alert.

Requirements

Customization

  • Thresholds: change revenueDropPct and minActiveDefendantCases in Settings; raise minActiveDefendantCases if your list has many large suppliers.
  • Rules: add, remove or move a rule between HIGH and MEDIUM in the Score suppliers Code node; each rule is one line.
  • Frequency: run weekly instead of monthly in the Schedule Trigger (ANAF status changes fastest; balance sheets change once a year).
  • Channels: replace the Gmail nodes with Outlook, Slack or Microsoft Teams; the HTML is in alertHtml and digestHtml of Build emails.

Additional info

Who is this for: procurement, accounting and credit control teams that buy from (or sell on payment terms to) companies registered in Romania. Scoring rules: HIGH = CUI not found, deregistered, insolvency/dissolution/liquidation status, inactive taxpayer, negative equity, insolvency case as debtor. MEDIUM = net loss in the latest year, revenue drop of at least 30%, equity below half of share capital, no recent balance sheet, VAT registration cancelled, 5+ active court cases as defendant, a criminal case as defendant. LOW = none of the above and all three checks ran. INCOMPLETE = a check failed and the others found nothing. Data comes from official public sources (ANAF and portal.just.ro); natural persons (PFA/II/IF) are never named or searched in court records. Unofficial; not affiliated with ANAF or the Romanian Ministry of Justice. Not legal, financial or credit advice.