Overview
This node, named "Global Prompts," is designed to insert predefined prompt texts stored in credentials into the workflow data. It retrieves a list of prompts from a secured credential and adds them to each input item’s JSON data. This is useful when you want to reuse a set of global prompt messages across multiple parts of an automation without hardcoding them repeatedly.
Common scenarios include:
- Injecting standardized prompts or messages into chatbot workflows.
- Adding reusable text snippets for AI or NLP processing steps.
- Centralizing prompt management so updates happen in one place (the credential) rather than scattered throughout the workflow.
For example, if you have a list of customer support prompts saved in your credentials, this node can add all those prompts to each incoming data item either as separate keys or grouped under a single key.
Properties
| Name | Meaning |
|---|---|
| Put All Prompts in One Key | Boolean option to decide whether to store all prompts together under one key or separately. |
| Prompts Key Name | The name of the key under which all prompts will be stored if "Put All Prompts in One Key" is enabled. Default is "prompts". |
Output
The node outputs the input items with additional JSON fields containing the prompt texts:
If "Put All Prompts in One Key" is true (default), the output JSON will have a single key (default
"prompts") whose value is an array of all prompt strings.Example:
{ "prompts": [ "Prompt text 1", "Prompt text 2", "Prompt text 3" ] }If "Put All Prompts in One Key" is false, each prompt is added as a separate key named
prompt1,prompt2, etc., with the corresponding prompt string as the value.Example:
{ "prompt1": "Prompt text 1", "prompt2": "Prompt text 2", "prompt3": "Prompt text 3" }
If there are no input items, the node creates one output item containing the prompts in the described format.
The node does not output binary data.
Dependencies
- Requires a configured credential that stores the global prompts. This credential must contain a property with an array of prompt objects, each having a
textfield. - No external API calls or services are used; all data comes from the credential.
- The node expects the credential to be properly set up in n8n with the required prompts.
Troubleshooting
- No prompts appear in output: Ensure the credential is correctly configured and contains prompt entries with the expected structure (
prompt[].text). Also verify the credential is selected in the node. - Empty input items: If the node receives no input, it still outputs one item with the prompts. This behavior is by design.
- Incorrect key names: If you change the "Prompts Key Name" property, make sure downstream nodes expect the new key name.
- Credential access errors: If the node cannot access the credential, check that the credential exists, is authorized, and the node has permission to use it.