Modify large data for your AI prompts

Available on plans:






The Split Text into Chunks for AI Prompts action is in beta and is subject to change.

When using large language models (LLMs) with large data sets, you may reach token limits. Large data sets can be anything from documents to website pages.

You can use Formatter’s Split Text into Chunks for AI Prompts to break up your data into smaller chunks to use with AI apps. These chunks are based on your input data, model type, prompt, and response size. Then you can then run each chunk separately in your Zap.

miscEye icon Note
  • To create multi-step Zaps, you must have a paid Zapier plan.
  • The Split Text into Chunks for AI Prompt action supports English text only and may behave unpredictably with non-English text.

1. Choose your app and event

  • In the Zap editor, click the Action step, or click the plusformAdd icon icon to add an action to your Zap.
  • Select the app Formatter by Zapier.
  • Click the Event dropdown menu.
  • Select Text.
  • In the Transform field in the Action tab, select Split Text into Chunks for AI Prompts.

2. Set up your text transform

  • In the Values section, click the Input field and enter the data that you want to transform. You can choose a field from a previous step or enter a value.
  • In the Prompt field, enter your anticipated prompt.
  • In the Response Size field, select the maximum response in tokens.
    • Use 0 to apply no limit.
  • In the Chunk Size field, select a chunk size based on the token limits of popular AI models. Alternatively, use a custom value to set a custom token limit.
  • In the Output Style field, select a text format for your output:
ratingStar icon Tip

OpenAI’s best practices recommend a maximum response of 256 tokens.

3. Test your text transform

  • Click Test action.
  • If the test was successful, you'll see the results of the text transform.

4. Create loops for text chunks

Use Looping by Zapier to run each chunk through your AI prompt. Looping by Zapier will create a loop to run a set of actions more than once

Learn more about using Looping by Zapier to:

After you’ve set up your looping step, you can send your text chunks to the AI app of your choice.


Chunk example: summarize web page content

We've created a Zap template to demonstrate how to set up a chunking Zap. For this example, we’ll show you how to chunk and summarize the contents of a web page. To view a copy of the Zap template, click the link provided.

Here are some notes about this Zap template:

  • The web page URL triggers the Zap from an email trigger.
  • Digest by Zapier is for storing chunk summaries.
  • Delay by Zapier is for ensuring chunks are summarized in order.
  • The Delay and Digest steps use an ID field (Raw Date) to reference the Digest and Delay for the specific Zap run from the trigger. If you change your trigger, then you’ll need to replace the ID field. This field should be unique each time the Zap runs.
  • The OpenAI steps are set to default parameters, and the prompt is for summarizing text.


If you have any feedback on using Split Text into Chunks for AI Prompts, let us know in our Community post.


Was this article helpful?
7 out of 14 found this helpful