Skip to main content

Hello there 🙂



I am using Integromat to import values from contact form to Airtable. In Airtable I have two tables Clients and Inquires and when contact form is submitted data is stored in both tables.


I manage to set up Integromat to store data in new row in Inquiry and Client tab and to link records together.



What I am trying to achieve is create new client tab only if the client with same email does not already exist. If there is a client record with same email, the inquiry should be linked to that record.



Note;





  • The primary field in Clients tab is “Client Name” and “Client email” is email field in Clients tab.


  • The contact form does not have Name as required field and if name is not provided Integromat creates “Add name” linked record (This is the case in current scenario and it should remain that way if there is no client with existing email.)




I would appreciate suggestions on how to achieve this. Thanks

Can anyone help? Thank you 🙂


Two Integromat features are going to be key to doing what you want: routers and filters. A router takes the data coming into it and sends it out to multiple sub-paths in the scenario. To control which path gets the data, you add a filter between the router and the first module in each sub-path. Because the router literally diverts the data only one direction or the other based on which filter’s rules it matches, this needs to be fairly late in your scenario setup. All steps leading up to this point will be the same for all form submissions.



In your case, you need to first have an Airtable “Search records” module somewhere before the router, and that module will search the table for records matching the email coming from the form. Then comes the router, with two outputs, and with each output linking to one other module.



In one path, the filter will only allow data to pass where the number of bundles returned by the “Search records” module (mentioned above) is greater than zero, meaning that a matching email was found. The result of that search can be used in the subsequent “Update a record” module to make a link to the existing client record in cClients].



In the other path, the filter should be set to only allow data to pass if the search returned zero bundles, meaning that no matching email was found. In that sub-path, the next module would be the Airtable “Add a record” module, where you would create a new client record, followed by the “Update a record” module where you would link the inquiry to the new client.



Here’s a quick outline of the steps, beginning with the search step, in case that description wasn’t clear:





Does that make sense?


Two Integromat features are going to be key to doing what you want: routers and filters. A router takes the data coming into it and sends it out to multiple sub-paths in the scenario. To control which path gets the data, you add a filter between the router and the first module in each sub-path. Because the router literally diverts the data only one direction or the other based on which filter’s rules it matches, this needs to be fairly late in your scenario setup. All steps leading up to this point will be the same for all form submissions.



In your case, you need to first have an Airtable “Search records” module somewhere before the router, and that module will search the table for records matching the email coming from the form. Then comes the router, with two outputs, and with each output linking to one other module.



In one path, the filter will only allow data to pass where the number of bundles returned by the “Search records” module (mentioned above) is greater than zero, meaning that a matching email was found. The result of that search can be used in the subsequent “Update a record” module to make a link to the existing client record in cClients].



In the other path, the filter should be set to only allow data to pass if the search returned zero bundles, meaning that no matching email was found. In that sub-path, the next module would be the Airtable “Add a record” module, where you would create a new client record, followed by the “Update a record” module where you would link the inquiry to the new client.



Here’s a quick outline of the steps, beginning with the search step, in case that description wasn’t clear:





Does that make sense?


Hi @Justin_Barrett, thank you for your reply.



Here is the photo of how I end up creating the scenario





I have also created the filter number of bundles returned, but I am stuck on “Find email” (Search record module)



I can not configure the module to look for existing email 😕


The stared options in formula field does not list “email” column from “Clients” tab, and if I use column name in {Email} I get an error. The options under star, lists just data from Inquiry tab and webhook.





Do you know how to solve this?


Thanks


Hi @Justin_Barrett, thank you for your reply.



Here is the photo of how I end up creating the scenario





I have also created the filter number of bundles returned, but I am stuck on “Find email” (Search record module)



I can not configure the module to look for existing email 😕


The stared options in formula field does not list “email” column from “Clients” tab, and if I use column name in {Email} I get an error. The options under star, lists just data from Inquiry tab and webhook.





Do you know how to solve this?


Thanks


When adding the 4. client-email entry from step 4 (the webhook), Integromat will insert the raw string into that space in the formula. However, what Airtable will get for the formula is something like this (using a dummy email address for this example):



{Email}=name@gmail.com



This is why the error is being thrown. What you effectively are doing is comparing the email field against a literal string, but you haven’t fed it a valid string because it’s not wrapped in quotes. A valid Airtable formula would be:



{Email}="name@gmail.com"



If you add quotes around 4. client-email in Integromat, it should work.


When adding the 4. client-email entry from step 4 (the webhook), Integromat will insert the raw string into that space in the formula. However, what Airtable will get for the formula is something like this (using a dummy email address for this example):



{Email}=name@gmail.com



This is why the error is being thrown. What you effectively are doing is comparing the email field against a literal string, but you haven’t fed it a valid string because it’s not wrapped in quotes. A valid Airtable formula would be:



{Email}="name@gmail.com"



If you add quotes around 4. client-email in Integromat, it should work.


Hi @Pjero_Kusijanovic



When using quotes, you should use the straight up and down ones.



I realize there’s a lot to learn, but once you get the hang of it, it will be easier.



Hope this helps.



Mary K


Thank you both for the reply. Double quotes did solve the error 🙌


Thank you both for the reply. Double quotes did solve the error 🙌


Hi @Pjero_Kusijanovic



Glad that the issue is resolved. Can you add solved to the title of the post?



Thank you,


Mary Kay


Hi @Pjero_Kusijanovic



Glad that the issue is resolved. Can you add solved to the title of the post?



Thank you,


Mary Kay


I can not find how to edit the title 😕


For those who are less technical, we made a tool that simplifies this. It allows you create (or select) linked records with Airtable Form without building anything custom.




I can not find how to edit the title 😕


Hi @Pjero_Kusijanovic



I have attached screenshots to help explain how to add to the subject line.



Hope this will help.



Thank you,


Mary




Hi @Pjero_Kusijanovic



I have attached screenshots to help explain how to add to the subject line.



Hope this will help.



Thank you,


Mary






Actually, the person who started the thread has the option to click on a button that says “Solution” for one of the comments in that thread. All they need to do is click on that button, which is only visible to them, and can only be clicked on for ONE post in the thread. This is what actually marks the thread as “solved” & closes the thread, and this is what actually makes your solution count towards your solution count.




Actually, the person who started the thread has the option to click on a button that says “Solution” for one of the comments in that thread. All they need to do is click on that button, which is only visible to them, and can only be clicked on for ONE post in the thread. This is what actually marks the thread as “solved” & closes the thread, and this is what actually makes your solution count towards your solution count.


Thank you @ScottWorld! I was wondering how this option was selected.



@Pjero_Kusijanovic, you just need to tap/select Solution option, at the bottom of the last reply.




Thank you @ScottWorld! I was wondering how that’s done.



@Pjero_Kusijanovic



Here is a screenshoot:




@M_k I already did that before on @Justin_Barrett reply


Reply