Skip to main content
Best answer

How do I calculate the sum of words in comma-delimited text data using Zapier?

  • March 1, 2024
  • 5 replies
  • 95 views

I need to get a sum from comma delimited text data e.g. “j12sdf,23fklsd,23sksdk” = 3

 

The number of entries varies and I need my zap to count the words and return a numeric value.

Is this possible?

Best answer by Troy Tessalone

@Msarin 

One approach is to use these steps:

  • Action: Looping - Create Loop from Text / Line Items
    • Depends on the format of the data
    • This will return the # of loop iterations (aka count value you are seeking to derive)
    • You can map this variable to following Zap steps
  • Action: Filter
    • Conditions
    • Loop Iteration exactly matches 1
    • The Zap will only continue after loop iteration 1
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • March 1, 2024

Hi @Msarin 

Will there always be values to sum or could there be 0 values to sum?


  • Author
  • Beginner
  • March 1, 2024

There will always at least one value


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • Answer
  • March 1, 2024

@Msarin 

One approach is to use these steps:

  • Action: Looping - Create Loop from Text / Line Items
    • Depends on the format of the data
    • This will return the # of loop iterations (aka count value you are seeking to derive)
    • You can map this variable to following Zap steps
  • Action: Filter
    • Conditions
    • Loop Iteration exactly matches 1
    • The Zap will only continue after loop iteration 1

  • Author
  • Beginner
  • March 4, 2024

Thank you! The loop worked perfectly :-)


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • March 5, 2024

That’s awesome @Msarin! Big thanks to Troy for pointing you in the right direction!

Happy Zapping! 🎉