Skip to main content

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

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?


@arimeisel 

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: https://chat.openai.com


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?