This workflow automates the import of leads into the Company table of a CRM built with Airtable.
Its originality lies in leveraging the new "Data Table" node (an internal table within n8n) to generate an execution report.
📚 Why Data Tables: This approach eliminates the need for reading/writing operations on a Google Sheet file or an external database.
This workflow enables precise tracking of marketing actions while facilitating the historical record of interactions with prospects and clients.
A prior validation check on email address accuracy is required.
Must contain at least a Company table with the following fields:
Data Table Initialization:
An internal n8n table is created to build the execution report.
Lead Selection:
The workflow selects leads from the Google Sheet file (Sheet1 tab) where the condition "Valid Email" is equal to OK.
Company Existence Check:
The Search Company node is configured with Always Output Data enabled.
A JavaScript code node distinguishes three possibilities:
Company does not exist: create a new record and increment the created records counter.
Company exists once: update the record and increment the updated records counter.
Company appears multiple times: log the issue in the Leads file under the Logs tab, requiring a data quality procedure.
An execution report is generated and emailed, example format:
Leads Import Report:
If the sum of records created and updated differs from the total records read, it indicates the presence of duplicates. A counter for duplicated companies could be added.
Need help customizing this (e.g., expanding Data Tables, connecting multiple surveys, or automating follow-ups)?
📧 [email protected]
🔗 guy.salvatore
🌐 smarthome-smartelec.fr