Search K
Appearance
Appearance
The AI Chat node enables interaction with a configured AI service (e.g., OpenAI) using a custom user prompt and optional context window. It returns the result of the AI response and stores it in a named output variable.
This node is useful when dynamic, intelligent responses or code generation are required based on contextual data and user input within your workflow.
This node sends a request to the AI service using:
User Input)Context Window)Request Code Only)It returns the AI response and optionally parses it as JSON.
| Label | Type | Required | Description |
|---|---|---|---|
| User Input | text | ✅ | The main instruction or question for the AI (e.g., “Generate a C# class for a user object”). |
| Context Window | text | ✅ | A block of context to give the AI additional information before the prompt (e.g., system state, variables). |
| Request Code Only | checkbox (boolean) | ✅ | If true, AI is prompted to return only code. Useful for generation tasks. |
| ServiceAccount-OpenAI | serviceAccount | ✅ | References the ID of the configured OpenAI service account (used for authentication). |
| Save to Variable Name | text | ✅ | The name of the output variable to store the AI response in. The response will be parsed to JSON if Request Code Only is checked. |
The AI's response is saved to the variable name defined in Save to Variable Name. If the response is JSON-compatible and Request Code Only is enabled, the response will be deserialized.
You could use the AIChat node to:
For example:
Generate a class called Employee with Name, ID, and Department fields.The project is written in C# and uses PascalCase naming.truegeneratedCodeThe variable generatedCode will contain the C# class definition returned by the AI.
If the AI request fails or the service account is misconfigured:
taskSuccess = falsestatusReturn = "Fail"taskMessage will include the failure messageAISingleRequest() from the internal AIService class.Request Code Only is checked.ServiceAccount-OpenAI is correctly configured in your environment.