You are here:
Flow Core Action: Prompt Template Actions
Creates responses based on the large language model (LLM) response for the specified prompt template and inputs.
Required Editions
| Available in: Lightning Experience |
| View supported editions. |
In Flow Builder, add an Action element to your flow. In the New Action window, select the Prompt Template or Prompt Template (Batch Generation) category, and then select the name of the prompt template to use. Individual Generation returns results one at a time as they’re finished, while Batch Generation completes all requests before returning results to avoid hitting LLM rate limits. Batch Generation supports 10,000 generations per day. If the model supports batch processing, the limit is 50,000 per day instead. Look for Batch Supported: Yes under Limits in the Models dropdown in Prompt Builder. The actual time to complete depends on the model provider and may vary.
Batch Generation action has two paths: Completed and Timed out. Add elements to the Completed path to use the generated response. Add elements to the Timed out path to log errors and interruptions. Timeout Length should be set to one day. Click the Prompt Template (Batch Generation) action to update Set Timeout length as needed. After it is started, the job begins within two hours.
The API name for each action is prefixed with
generatePromptResponse or
generatePromptResponseBatch.
Set Input Values
Input values are based on the input variables specified for the prompt template.
Store Output Values
| Field | Description |
|---|---|
| Prompt Response | The prompt response generated by the action based on the specified prompt template and input. |
Considerations when using Prompt Template Batch Generation
- Only use Batch Generation with Schedule-Triggered Flow and Record-Triggered Flow template types as they’re designed to handle batches of items.
- Before running a batch generation job, set a Default Workflow User in Setup > Process Automation Settings > Process Automation Settings, as the batch job will run in the context of this user. See Process Automation Settings for more information.
- Limit request size to 10,000 items per day when using Schedule-Triggered or Record-Triggered Flow template types. If the model supports batch processing, the limit is 50,000 per day instead. Look for Batch Supported: Yes under Limits in the Models dropdown in Prompt Builder. If your requests exceed the daily limit, they are placed in a queued status until the limit resets.
- Limit request size to 1,000 items per hour when using WebSearch Retrievers.
- The resolved prompt size should not exceed 131,072 characters. Otherwise, the request may fail. We recommend keeping the resolved prompt well below this limit to avoid interruptions.
- Run and Debug actions in Flow Builder aren’t available for Batch Generation.
Usage
This action is available only if the following are true. Otherwise, the action fails.
- Prompt Builder is enabled.
- The user who runs the flow has the Prompt Template User permission.
- The specified prompt template has an active version.

