Overview
The MetisAi Chat Node enables n8n workflows to interact with the MetisAI chat API. It creates a new chat session with a specified bot, sends an initial message (either as a user or system message), and then sends a follow-up prompt. The node returns the response from the MetisAI service.
Common scenarios:
- Automating conversations with AI bots for customer support, information retrieval, or interactive workflows.
- Integrating AI-driven responses into business processes, such as ticketing systems or chat-based data collection.
Practical example:
A workflow could use this node to start a conversation with a MetisAI-powered bot, send a user's question as the initial message, and then provide a follow-up prompt to guide the conversation.
Properties
Name | Type | Meaning |
---|---|---|
BOT ID | String | The unique identifier of the MetisAI bot you want to interact with. |
Initial Message Type | Options | Specifies if the initial message is sent as a "user" or "system" type. |
Initial Message | String | The content of the first message sent to the bot when starting a session. |
Prompt | String | The main prompt or message to send after the session is created. |
Output
The node outputs the JSON response received from the MetisAI API after sending the prompt message. The structure typically includes:
{
"id": "...",
"message": {
"content": "...",
"type": "USER"
},
// ...other fields as returned by the API
}
- The exact fields depend on the MetisAI API's response schema.
- No binary data is output; only structured JSON.
Dependencies
- External Service: Requires access to the MetisAI API.
- API Key: You must configure the
metisAiApi
credential in n8n, which should contain your MetisAI API key. - n8n Configuration: Ensure that outbound HTTPS requests to
https://api.metisai.ir
are allowed.
Troubleshooting
Common Issues:
- Invalid API Key: If the API key is missing or incorrect, authentication will fail. Ensure the
metisAiApi
credential is set up properly in n8n. - Bot ID Errors: Providing an invalid or empty Bot ID may result in errors from the MetisAI API.
- Network Issues: Connectivity problems between n8n and the MetisAI API endpoint can cause failures.
Error Messages & Resolutions:
"401 Unauthorized"
: Check your API key in themetisAiApi
credential."400 Bad Request"
: Verify that all required properties (BOT ID, Initial Message, Prompt) are provided and valid."404 Not Found"
: The specified Bot ID may not exist or is inaccessible.
Links and References
- MetisAI Official Website
- n8n Documentation: Credentials
- Axios Documentation (used internally for HTTP requests)