How to access attributes of a table using a foreign key?

Hello people,

I’m new to the bubble and need help accessing information from a table using a foreign key.

In my case, I have two tables in Google Sheets that are being accessed via API (API Connector). One called “Visitor” and the other “Contact”. Every part of CRUD I have already managed to do.

In the “Contact” table I have some attributes like “Company” “Employee” “E-mail”

In the “Visitor” table I have some attributes like “Name” “Telephone” “Day” “Company”.

I need that when registering a new visitor, who will visit company “X”, when clicking on the button “save”, an email will be triggered for the employee who works at company X registered in the “Contact” table.

How can I do this logic in Worflow?