Skip to main content
Best answer

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

  • Mar 1, 2024 3:04 PM UTC
  • 5 replies
  • 176 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
View original
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
  • Mar 1, 2024 3:26 PM UTC

Hi @Msarin 

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


  • Author
  • Beginner
  • Mar 1, 2024 4:08 PM UTC

There will always at least one value


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • Answer
  • Mar 1, 2024 4:15 PM UTC

@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
  • Mar 4, 2024 8:44 AM UTC

Thank you! The loop worked perfectly :-)


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • Mar 5, 2024 9:44 AM UTC

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

Happy Zapping! 🎉