Skip to main content
Best answer

How to loop action per CSV row


Forum|alt.badge.img

Short context:

I have a CSV with multiple rows, I want to create an action based on the data per row, and loop it for the number of rows I have so I repeat the action. Example, creating a a ticket in Linear, per row in the CSV.

Details:
I have a CSV file that is uploaded to a google drive and triggers the Zap. The CSV have a “Title” column and a “Description” column.

The CSV goes into a formatter that imports the CSV file.

I now added a looper, and said “create loop from line items”.

I’ve set up the looper to match line items “Title” and “Description”. I mapped each to “Output Line items”. 

I in the end now I have the “create issue” in Linear fetching “Title” and “Description” from the looper. I added a “Project” but decided to skip it since it’s not necessary for the issue creation.

What breaks:
The title becomes “Title:[First row title],[Second row title],[Third row title]…

The description becomes:  “Description:[First row description],[Second row description],[Third row description]…

What I tired:

I tried using splitter on title and description before the loop. The issue then is that my “description” text contains “,”, and since the separator is also “,” it breaks up the description texts. 
Even if the CSV contains “Description, text” zapiers splitter ignores the “” and finds the comma anyway.

 

Sharing screenshots of the looper and Linear. I assume this is where I’ve done wrong. 

 

 

Best answer by Patbos

Hi, I didn’t manage to get it to work, no. But somewhere mid trying and discussing online with others, I got another tool recommended in a forum. This lead me to solve the automation in another way in the end. 

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

11 replies

JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2131 replies
  • December 5, 2024

Hi ​@Patbos,

 

Welcome to the Community. 

 

To properly loop through a CSV file in Zapier, ensure that in the loop step, you select the corresponding fields from the formatter step for "Title" and "Description" rather than manually typing them. This allows the loop to create line items based on the data provided. Use the Loop step's output fields in the Linear action step to populate each issue with the current row's title and description. If the splitter treats the line as a single string, use a Formatter step with the "Line-item to Text" transformation to correctly parse the CSV data into line items for each row.

 

I hope this helps! Please let me know if you have any other questions.


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30682 replies
  • December 5, 2024

Hi ​@Patbos 

Make sure to NOT use the variables from the Looping step that have “Preview”.

Help link for using Looping in Zaps: https://zapier.com/apps/looping/help

 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7242 replies
  • December 9, 2024

Hey there, ​@Patbos! 👋

Did selecting the Title and Description fields from the Looping action, instead of the Preview Loop Values versions of those fields help to get it working correctly?

Want to ensure this gets sorted so let us know if you need any further help! 🙂


Forum|alt.badge.img
  • Author
  • Beginner
  • 1 reply
  • Answer
  • December 9, 2024

Hi, I didn’t manage to get it to work, no. But somewhere mid trying and discussing online with others, I got another tool recommended in a forum. This lead me to solve the automation in another way in the end. 


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2131 replies
  • December 10, 2024

Hi ​@Patbos,

 

I'm sorry to hear about the trouble with Zapier. I'm glad you found a tool that works for your automation needs! If you try Zapier again or have questions, feel free to reach out; we're here to help. We'd also love to know about the tool you found, as it could benefit others in our community.


  • New
  • 3 replies
  • February 1, 2025

I’m having a similar situation.

The plan is that, as csv-files containing new users (first name, last name, email, among other fields) are dropped in a Dropbox folder the users would be added to a Campaign monitor email list.

 

The zap-test runs ok. But when adding a new file to the dropbox folder I get an error message:

 

Required field "Values to Loop" (loop_values) is missing.

 

Any suggestions on what to do? I’ve tried all the suggestions found in other threads here, and gotten a couple of friends to take a look, but we can’t figure it out. My trial period on Zapier has ended now and I can’t do more tests. But I’m happy to upgrade if anyone can tell me what’s wrong.

 

Thanks!

Ben

 


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2131 replies
  • February 4, 2025

Hi ​@aronsen,

 

The error "Required field 'Values to Loop' (loop_values) is missing" indicates that Zapier expects an array of items but isn't receiving it. This issue arises when copying CSV rows from Dropbox to add users to Campaign Monitor. To resolve it, ensure the CSV is correctly formatted with each row as a new user and each column as a field. Confirm the Zap trigger is set to "New File in Folder" instead of "File Updated in Folder." Include a "Formatter by Zapier" step with the "Line Itemizer" action to structure the CSV data for looping.

 

Let us know if you have any further questions. Looking forward to your response.


  • New
  • 3 replies
  • February 4, 2025

It works in principle now. You were right, the Line Itemizer was needed. But also, I was grabbing the wrong part of the file. Dropbox offers both ‘file’ and ‘file text’, and I needed to get ‘file’.

Ok, so works in principle, but Zapier drops a lot of lines. Of 469 user lines in my test file Zapier only manages to add 266 to the newsletter list. Not sure I can trust it to do the job.


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2131 replies
  • February 5, 2025

Hi ​@aronsen,

 

If not all lines are being processed correctly after using the Line Itemizer, it could be due to app rate limits, data issues, or Zap errors. Check if you're hitting rate limits by reviewing your newsletter app's documentation, inspecting the dropped lines for data issues like missing or incorrect formatting, and reviewing your Zap History for errors. If the problem persists, contact Zapier support with these details for further assistance.


  • New
  • 3 replies
  • February 5, 2025

Where can I see the Campaign Monitor headers? I’m looking at the run logs for the zap but not seeing what CM says should be available:

“To interpret the Campaign Monitor API rate limit headers, you can look at the following HTTP headers included in each response: 

  • X-RateLimit-Limit: This indicates the maximum number of requests you are allowed to make before the rate limit resets. 

  • X-RateLimit-Remaining: This shows the number of requests you have left within the current rate limit window. 

  • X-RateLimit-Reset: This tells you the time in seconds until the rate limit resets.”


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2131 replies
  • February 6, 2025

Hi ​@aronsen,

 

Zapier does not display Campaign Monitor's rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) in task history or logs, as they are used internally to manage API requests. If you're experiencing rate limit issues or need more details on API calls, contact Zapier support for additional assistance, since we have limited access here in the Community.