Get company's addresses, names and contacts from VAT number

Hey,

Easily enrich VAT numbers with information about a company’s name, address and contact in just a few steps.

1. Connect the integrations

First, if you haven’t already, you will need to connect the VAT-Search and the Google Maps integrations from the integrations marketplace. With a few clicks you get that out of the way.

2. Find a company’s name and address from the VAT

Now we are ready to build our app. Add the list of VATs to be validated in column A and using the
FIND_COMPANY_VAT_VATSEARCH function get the company details.

A1: VAT id
A2: PT503504564
B1: Request
B2: =FIND_COMPANY_VAT_VATSEARCH(A2)
C1: Company Name
C2: =PARSE(B2,"[‘Results’][0].[‘Name’]")
D1: Address
D2: =PARSE(B2,"[‘Results’][0].[‘Address’][0]")
E1: City
E2: =PARSE(B2,"[‘Results’][0].[‘Address’][1]")

The VAT number of column A must have the country prefix in order to be enriched. If you need to add a prefix to all of the VAT numbers, use CONCAT() or CONCATENATE() to get the job done.

3. Enrich the VAT with company’s phone number

With the company name and address we will now use a couple of Google Maps formulas to find the phone number of the company.

F1: Place request
F2: =PLACE_SEARCH_GOOGLE(C2&" “&E2)
G1: Place id
G2: =PARSE(F2,”[‘results’][0].[‘place_id’]")
H1: Detail request
H2: =PLACE_DETAIL_GOOGLE(G2)
I1: Phone number
I2: =PARSE(H2,"[‘result’].[‘formatted_phone_number’]")

Done! Now you add new VATs on column A and simply drag the remaining formulas down to automatically find theirs names, addresses and phone numbers :muscle:

Happy building,
Henrique

1 Like