Connect
Establishes a connection to the OpenAI API service for accessing AI models and capabilities.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
This node does not have any input variables.
Options
- API Key - The OpenAI API key credential from your Robomotion Vault. Required unless using Robomotion AI Credits.
- Use Robomotion AI Credits - When enabled, uses Robomotion's managed AI credits instead of your own API key. Some features (file operations) are not available with this option.
Outputs
- Connection Id - A unique identifier for the established connection. Pass this to other OpenAI nodes to use the same connection.
How It Works
The Connect node establishes a connection to OpenAI's API service. When executed:
- Validates the API key from your Vault (if not using Robomotion Credits)
- Creates a connection session to the OpenAI service
- Returns a connection identifier that can be reused across multiple OpenAI nodes
Usage Examples
Example 1: Connect with Your API Key
1. Add a Connect node to your flow
2. In Options, select your OpenAI API key from the Vault
3. Leave "Use Robomotion AI Credits" unchecked
4. The node outputs a connection_id
5. Use this connection_id in subsequent OpenAI nodes
Example 2: Connect with Robomotion Credits
1. Add a Connect node to your flow
2. Check "Use Robomotion AI Credits" option
3. No API key needed
4. The node outputs a connection_id
5. Use this connection_id for text, image, and audio operations
Requirements
- With API Key: A valid OpenAI API key stored in your Robomotion Vault
- With Robomotion Credits: An active Robomotion account with available AI credits
- Network access to OpenAI API endpoints
Error Handling
The node will return errors in these cases:
- ErrInvalidArg: API key is empty or invalid when not using Robomotion Credits
- Network errors: Unable to reach OpenAI API service
- Authentication errors: Invalid or expired API key
Tips for RPA Developers
- Store your OpenAI API key in the Robomotion Vault for security - never hardcode it
- Use Robomotion Credits for quick prototyping without managing API keys
- The same connection can be reused for multiple operations, improving performance
- File operations (Upload, Download, List Files) require your own API key and won't work with Robomotion Credits
- Always pair Connect with Disconnect nodes to properly manage connections
- Connection IDs are valid for the duration of your flow execution
Common Errors and Solutions
Error: "Not an API Key item"
- Solution: Ensure you've selected a valid API Key credential from the Vault, not a different credential type
Error: "No Token Value"
- Solution: The selected credential doesn't contain an API key value. Create a new credential with your OpenAI API key
Error: "API Key cannot be empty"
- Solution: When not using Robomotion Credits, you must provide an API key. Either add one or enable "Use Robomotion AI Credits"