Trying to run a Zap depending on whether a record does or does not exist... and failing
I’m brand-new to Zapier. Maybe this is a simple fix, but I can’t find it and neither can the CoPilot. I’m trying to set up a system between Acuity Scheduling and Airtable for the purpose of checking whether or not a new client has submitted an intake form. 📋
When someone books a new appointment, I want to check Airtable for a record of their email address (which should be there if they have indeed submitted an intake form). If the email address record is NOT FOUND, I want to send them a Gmail message asking them to complete and submit the form. Easy, right?
🚫Nope!
I’ve put two appointments on my Acuity schedule for the purposes of testing-- one has a record in Airtable (email A) and one does not (email B). CoPilot has set me up with four steps:
Step 1) Find the appointment in Acuity.
Step 2) Search Airtable for the email record.
Step 3) Filter.
Step 4) Send the Gmail message.
However, between Step 2 and 3, I keep running into the same problems over and over:
The system, upon failing to find email B in the Airtable database, halts the whole system and no Gmail message is sent
The system reports finding email B in the database even though it isn’t actually there, and halts the system
The system finds email A in the database and still sends the Gmail message
Every time CoPilot fixes one of these issues another one replaces it. I have no idea what is going on, but again, I’m new to this. What should I do? 😭
Page 1 / 1
Hye @mimibb07 ,
The reason your Zap was stopping is because by default, the Find Record in Airtable step halts if nothing is found. To fix this, you just need to change the setting:
-In your Find Record step, scroll to “Successful if no search results are found?”
-Switch it to True: step run status is “success”
This way, if no record exists, the Zap will keep running and you can add a Filter or Path to decide whether to send the Gmail message.
The record you are searching for does not exist in Airtable or another Zap that should’ve created it has not created it yet.
The search criteria for a record does not match the corresponding data in Airtable.
The mapped field in the Search Value or Search Formula field contains data in a format different from that in Airtable.
The mapped field contains a trailing space.
You have the exact match setting turned on which restricts your search.
You selected a view in Airtable that restricts your search.
Referencing some of the potential fixes from the article-
Check in Airtable that the record you are searching for exists.
Adjust the search criteria to see if this improves your search results. (In the Search for Exact Match? dropdown menu, select No.)
Review the mapped field you are using in the Search Value or Search Formula field.
See more about the fixes in detail in the article. It should be able to fix the situation where it doesn’t work when it actually exists. For continuing even without finding something, you have change the no results found option to True in the Find record action in Airtable. Hope it helps!
@Ashar Malik Easyaiz I did like you said, and toggled the “Successful if no search results are found” to true, but that just resulted in one of the three recurring errors popping back up: It says that it found the email (email B) record in Airtable despite the fact that no such record exists.
@Sparsh from Automation Jinn thanks for your reply. I actually have the opposite problem, lol-- it finds a record when there isn’t one. I don’t even understand how that’s possible.
@mimibb07
Help us have more info by posting screenshots showing how your Airtable Zap step is configured in the CONFIGURE tab while in EDIT mode with the field mappings visible.
@Troy Tessalone Here is what happens when “Successful if no search results are found” = true: Remember, email B does not have a record in Airtable...
@mimibb07
Take a look at the screenshots below.
The Airtable Zap step 2 is configured to:
search for a record using an exact match for email address
return the first result if multiple results are found (aka only return 1 record)
always return a “success” even if no results are found
The Zap Run is likely processing as expected.
Check your RUN DETAILS tab, to see the DATA IN/OUT for each the Airtable Zap step.
It likely shows no results were returned.
Post screenshots showing the DATA OUT returned from Zap step 2.
The Filter step did not continue, likely because it is only configured to continue if results are found from the Airtable step.
But if no results were returned from the Airtable Zap step, then that is why the Filter step conditions were not met and thus why the Zap Run has status = “Filtered”.
Post screenshots showing how your Filter step is configured to give us more context.
@Troy Tessalone sure thing!
Find Record | Data In:
Find Record | Data Out:
Filter Configuration:
@mimibb07
DATA OUT from Zap step 2 indicates no matching record was found, which is what I believe you expected.
Zap step 3 Filter condition is not configured correctly.
Change it to be: ID exists
That way the Zap step 2 will never results in an error and Zap step 3 will only continue if a record is found from Zap step 2.
@Troy Tessalone Okay, I went ahead and changed ID to “exists”. That makes total sense. But Step 2 is still finding some sort of paranormal email record in Airtable despite the fact that Data Out confirms that no record was found:
@mimibb07
For a Zap Run, take a look at the DATA OUT for the Airtable step.
With the current Airtable Zap step settings, you should see one of these 2 scenarios depending on the email address being searched for in the Zap step...
Zap Search Was Found Status = FALSE
This means NO matching Airtable record was found when searching by the provided email address, thus NO data points returned for an Airtable record
Zap Search Was Found Status = TRUE
This should also return an Airtable Record ID along with other data points about the found Airtable Record
@Troy Tessalone Zap Search Was Found Status = FALSE, but it still registers as having found something, which halts the run:
@mimibb07
Will try to explain again…
From your screenshot below, the left side step shows “Found Record in Airtable”.
It will always show as green because you have the Zap step field setting configured as “Successful if NO search results are found? = TRUE.
That means whether a record is found or no record is found, the Zap step returns a “successful” response.
That is the expected behavior, although the wording can be a bit misleading.
Then if you look at the right side for the Run Details > DATA OUT...
If a record is found, the DATA OUT will have a data point Zap Search Was Found Status = TRUE and more data points will be returned for the found Airtable record.
If a record is not found, the DATA OUT will have Zap Search Was Found Status = FALSE and there will be no other data returned about the Airtable record, because no Airtable record was found for the searched email address.
Try testing both cases to see how the Zap steps process.
Airtable record found for the email address
Airtable record not found for the email address
@mimibb07
If you want to send an email via Gmail when an Airtable record is NOT found, then change the Filter condition to this: ID does not exist
Zap help links for defining what Zap should do if no results are found:
@Troy Tessalone oh, I see what you’re saying. The only reason that it’s saying a record was found is because “Successful if NO search results are found?” = TRUE.
What configurations do I need to change so that:
An email record that is actually in the Airtable database halts the run
An email record that isn’t actually in the Airtable database results in triggering the Gmail message?
Edit: Never mind, just saw your last message 😅 I’ll try it right away!
Thanks everyone, we found the solution!!
For anyone having this issue, here’s what fixed it:
Toggle “Successful if no search results are found?” to TRUE.Note: This will result in a notification that the database record has been found, even though in reality the record does not exist in the database.
Change the Filter condition to: ID -- Does Not Exist.
Voila! This is what worked for me. Thanks so much @Troy Tessalone and everyone who commented! 💕