EU VAT numbers and IBANs checked before the first invoice
Validates a new customer's VAT number and IBAN with Abstract API as the record lands in Airtable. A mismatch goes to finance in Slack with the VAT options, and the answer is written back.
The prompt
When a new customer's billing record is added to our Airtable billing table, validate the VAT number and the IBAN with Abstract API. If the VAT number is valid and registered to the customer's name, and the IBAN is valid, mark the record ready for reverse charge. Otherwise look up the country's VAT rates and work out the VAT at the standard rate on the first invoice, and ask our finance controller in Slack whether to reverse charge, charge VAT, or ask the customer which entity is buying. Write their answer and the evidence back to the record.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. How importing works
What each step does
- New billing record Checks your Airtable billing table every 5 minutes for a new record. The table needs a Created time field.
- Read the billing record Reads the company name, country, VAT number, IBAN and the first invoice's net amount from the record.
- Validate the VAT number with Abstract API Checks the VAT number and brings back the registered company name, address and country. Validate the IBAN then checks that the account number is well formed; it says nothing about who owns the account.
- Reverse charge clear? A valid VAT number registered to the name on the record, plus a valid IBAN, goes to Mark the record ready for reverse charge, with the registered name and address written on the record.
- Get the country's VAT rates Anything else fetches the country's standard and reduced rates, and Calculate VAT at the standard rate works out the VAT on the first invoice.
- Ask the finance controller A Slack message lays out the evidence: whether the VAT number is valid and who it is registered to, whether the IBAN is valid, and the net, VAT and gross amounts at the standard rate. Three buttons: Reverse charge, Charge VAT at the standard rate, Ask the customer.
- Wait for the controller's answer The run waits for the click.
- Write the answer to the record Writes the decision, the registered name and address, both validity results and, for a VAT charge, the VAT and gross amounts to the record, then confirms in the Slack thread.
Before you turn it on
- Connect Airtable and Slack, and add your VAT Validation and IBAN Validation keys in the Abstract API connection. The other Abstract API keys can stay empty.
- Pick your base and billing table in New billing record, and put the same base ID and table name in the flow settings Airtable base and Billing table. Pick your Slack channel in the two Slack steps.
- The billing table needs a Created time field, the fields the flow reads (Company, Country, VAT number, IBAN, Net amount; common variants of these names work too), and the fields it writes: Billing check, Registered name, Registered address, VAT number valid, IBAN valid, Checked on, VAT amount and Gross amount.
- Copy the URL of the block Wait for the controller's answer into the flow setting Answer link.