Overview
The CraftaBot node allows you to interact with custom AI bots created on the CraftaBot platform directly within n8n workflows. It sends messages to a selected bot and retrieves its responses, enabling automation scenarios that require natural language understanding or generation.
Typical use cases include:
- Automating customer support by sending user queries to an AI bot and processing replies.
- Generating content or summaries based on input data.
- Maintaining conversational context across multiple messages using conversation IDs.
- Customizing bot behavior temporarily via system prompts for specific tasks.
For example, you could send a product description to the bot and receive a marketing blurb in return, or maintain a chat session where each message builds on previous context.
Properties
| Name | Meaning |
|---|---|
| Bot Name or ID | Select the CraftaBot bot to use from a list or specify its ID via expression. |
| Input Type | How to provide the message to the bot: • Direct Input — enter the message text directly. • Expression — use an n8n expression to generate the message. • Field From Previous Node — use a field from incoming data. |
| Message | The message text to send (shown if Input Type is Direct Input). |
| Message Expression | An n8n expression to obtain the message text (shown if Input Type is Expression). |
| Input Field Name | Name of the field containing the message in incoming data (shown if Input Type is Field From Previous Node). |
| Instructions Supplémentaires (System Prompt) | Optional additional instructions to temporarily customize the bot's behavior, e.g., "Respond only in JSON", "Use a formal tone". |
| Options (collection): | A set of optional parameters: • Context Data: Additional context as JSON. • Conversation ID: To maintain conversation context. • Include Sources: Whether to include source documents in the response. • Max Tokens: Max tokens for the response (-1 to use bot defaults). • Output Field Name: Field name to store the bot's response. • Return Full Response: Return full metadata along with the response. • Temperature: Override bot temperature (-1 to use bot default). • User Email: Email of the user. • User ID: Unique user identifier. • User Name: User name to personalize responses. |
Output
The node outputs JSON data for each input item, extending the original input JSON with the bot's response and optionally other metadata:
- By default, the bot's textual response is stored under the specified output field name (default
"response"). - If enabled, the output can include:
conversation_id: ID to maintain conversation context.message_id: Identifier of the bot's message.metadata: Additional metadata about the response.sources: Source documents used by the bot (if included).
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for the CraftaBot service.
- The node communicates with the CraftaBot API endpoint (default
https://craftabot.ioor a custom base URL from credentials). - Proper configuration of the API credential in n8n is necessary for authentication.
Troubleshooting
- Missing message error: If the message is empty or the specified input field does not exist in the incoming data, the node will throw an error indicating the missing message or field. Ensure the input data contains the required field or the message is provided correctly.
- API errors: If the CraftaBot API returns an error or an unexpected response, the node throws an error with the API's message. Check your API key validity, bot ID correctness, and network connectivity.
- Conversation context issues: When using conversation IDs, ensure the ID is consistent across related messages to maintain context.
- Invalid JSON in Context Data: If providing context data as JSON, ensure it is valid JSON format to avoid request failures.
- Use the "Continue On Fail" option in the node settings to handle errors gracefully without stopping the workflow.