Skip to main content
Best answer

How to fix looping issues with Airtable records in Zapier


Forum|alt.badge.img+1

I have a weekly schedule zap that has a “find many records” action to start so that it can find all the fields in my airtable base that have status set to active. I then have a “create loop from line items” which loops a “find record” action and email so that it can go through all the records retrieved from the “find many records” action and send an email for each one. The problem I am encountering is all the records are being retrieved at once and sent together instead of individually and so when it comes to the find record step it keeps failing because it is expecting to deal with a single record. For more context, the find record step is matching the record ID from the table accessed in the “find many records” step to the ID in another table. But since the output it is receiving has the record ID of multiple records together and only separated by a comma, it will never work because it is expecting only one record ID. Any suggestions on how to fix this? I tried adding a split text formatter after the “find many records” step but the output still didn’t solve the problem

Best answer by Troy TessaloneBest answer by Troy Tessalone

@aymanb 

Each line item variable from the Airtable step should be it’s own input data point in the Looping step.

Click the button [Add value set]

 

View original
Did this topic help you find an answer to your question?

17 replies

Troy Tessalone
Forum|alt.badge.img+14

Hi ​@aymanb 

Help us have more info by posting screenshots showing how your Zap steps are outlined and configured in EDIT mode with the field mappings visible.


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 18 replies
  • January 8, 2025

Hey ​@Troy Tessalone 

 

Really grateful to be receiving your assistance again. I attached the images in one pdf. Not being able to separate the output from the find many records is also making mapping out the send email action an issue because right now every field I choose when mapping includes the details for all returned records at once. So for each field that I map in the body it is including the results for all returned records at once instead of one at a time. I attached a test email that shows how that turned out. 


Troy Tessalone
Forum|alt.badge.img+14

@aymanb 

Airtable Step 2 should return the records as line items.

We would need to see screenshots to see how the data is returned from Zap step 2 that you are using in the Looping step.

Also, it would be helpful to see screenshots from Airtable for context about the fields you are trying to use and record examples you are trying to use to configure the Zap.

Plus, post screenshots of the encountered error in the Zap step.

To help you troubleshoot live Zap Runs, check your Zap Runs history to see the DATA IN/OUT for each step: https://zapier.com/app/history/

 

 


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 18 replies
  • January 8, 2025

No problem, I think I have all the information you asked for attached. In the search value part of the find record step where the error occurs I had chosen “preview loop values record”


Troy Tessalone
Forum|alt.badge.img+14

@aymanb 

Try using this Zap action: Looping - Create Loop from Text

Use the default delimiter: comma


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 18 replies
  • January 8, 2025

I tried it out and received the same error message at the find record step. Could it be I am mapping the wrong value? I chose “preview loop values records”. However I noticed that it has both the record IDs for that and they are separated by a comma.


Troy Tessalone
Forum|alt.badge.img+14

@aymanb 

Looping help link indicates NOT to use the “Preview” variables.

https://zapier.com/apps/looping/help


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 18 replies
  • January 9, 2025

That makes sense. There is a value called “records” which seems to pass the test fine. But when it comes to my final step of the send email action, I was under the assumption that I would map the values needed for the “To” portion and certain parts of the body of the email from the loop output. However the loop does not have any of the fields that I expected it to draw from the records it receives from the “find many records” action. Is there something that can be done about that or am I just mapping from the wrong step?


Troy Tessalone
Forum|alt.badge.img+14

@aymanb 

Any “line items” record values you want to use in steps after the Looping step need to be mapped into the Looping step, then from the Looping step to the following Zap action steps.


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 18 replies
  • January 9, 2025

Would you mind explaining how I would map the values into the looping step? I assume that once they are mapped onto there I would just map the fields into the email from the loop step like I do with any other mapping. But I don’t know how I map them into the looping step initially


Troy Tessalone
Forum|alt.badge.img+14

@aymanb 

You would map the variables from a previous Zap step to the Looping step the same way you do for any Zap action step.

e.g. If you want 3 vars from the Airtable step to map into the Looping, step then you would map 3 variables to different lines in the Looping step.

Help link for how to configure Zap action steps: https://zapier.com/help/create/basics/set-up-your-zap-action


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 18 replies
  • January 9, 2025

That is what I thought as well. However maybe I am missing something but when I did that the variables still did not come up in the loop output. Here are screenshots so you can see what I mean


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30918 replies
  • Answer
  • January 9, 2025

@aymanb 

Each line item variable from the Airtable step should be it’s own input data point in the Looping step.

Click the button [Add value set]

 


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 18 replies
  • January 9, 2025

Wow, how did I not figure that out. You are right it works now and each step passed the test I ran. Now since in this example I made there are two records that are being passed from the find records step, does that mean when I publish this zap it should send out an email for each record correct?


Troy Tessalone
Forum|alt.badge.img+14

@aymanb 

When in doubt, test it out.

For live Zap Runs, check your Zap Runs history to see the details of the DATA IN/OUT for each step to help you trace the data flow and troubleshoot: https://zapier.com/app/history/


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 18 replies
  • January 9, 2025

I published the zap and had it scheduled a few minutes ago and worked perfectly. You are the man Troy! You have saved me hours of headache with your help, thank you so much


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2331 replies
  • January 9, 2025

Wow! Thank you for confirming that Troy’s resolution got the Zap running. This will significantly help our Community members to have as a reference for the same issue.