How to separate text based on word count or character count

  • 12 February 2023
  • 4 replies

I want to be able to give zapier a large amount of text and have it break it down into 4000 word chunks, there doesn’t seem to be a way to split by word count

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +14

Hi @arimeisel

Good question.

Splitting by # of words VS splitting by # of characters are different executions.

Try using Formatter > Text > Truncate if you want to split based on characters.

Otherwise a Code step can be used.

Either would work for me but I don’t want to just truncate. I need all the individual sections. What would the code be for the code step?

Userlevel 7
Badge +14


You’ll get very different results if splitting based on words vs splitting based on characters.

Splitting based on characters could split in the middle of a word.

Try asking ChatGPT for the code to use:

Userlevel 6
Badge +8

Do you mean you want 4000 different chunks regardless of how many words there are? So, for example, 8000 words would generate 4000 two-word chunks and so on?