Skip to main content

Connect

Establishes a connection to the Anthropic Claude API and creates a client session for use in subsequent Claude operations.

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.

Options​

  • API Key - Your Claude API key for authentication. This is a credential field that securely stores your Anthropic API key.
  • Use Robomotion AI Credits - When enabled, uses Robomotion AI credits instead of your own API key. This is convenient for testing or small-scale automations without needing your own Anthropic account.

Output​

  • Connection Id - A unique identifier for the Claude client session that must be used in subsequent Claude operations.

How It Works​

The Connect node is the first step in any Claude automation flow. It creates a secure connection to the Anthropic Claude API and returns a connection ID that is used by all other Claude nodes in the flow.

When executed, the node:

  1. Retrieves the API key from the provided credentials (if not using Robomotion credits)
  2. Creates a Claude client instance
  3. Stores the client in a thread-safe connection manager
  4. Returns a unique connection ID that references the stored client
  5. This connection ID is then used by other Claude nodes to access the API

Requirements​

  • For API Key mode: A valid Anthropic account and API key (can be generated at console.anthropic.com)
  • For Robomotion Credits mode: An active Robomotion account with AI credits

Error Handling​

The node will return specific errors in the following cases:

  • Invalid or missing API key credential when Robomotion credits are not being used
  • Empty API key value in the credential

Usage Notes​

  • The Connect node should be executed before any other Claude operations
  • The returned Connection Id must be passed to subsequent Claude nodes
  • Each Connect node creates a new client session that should be cleaned up with a Disconnect node
  • For security, always use the Disconnect node to remove the stored client when it's no longer needed
  • The client session is stored in memory only and is automatically removed when the flow stops

Best Practices​

  • Store your Anthropic API key as a credential rather than hardcoding it
  • Use a single Connect node at the beginning of your flow
  • Always pair Connect with Disconnect nodes to properly clean up resources
  • For development and testing, consider using Robomotion AI Credits to avoid using your own API quota
  • Handle errors appropriately to prevent credential leaks

Example Flow​

Using your own API key:

  1. Create a credential in Robomotion with your Anthropic API key
  2. Add a Connect node at the start of your flow
  3. Select your API key credential in the node's options
  4. Use the Connection Id output in subsequent Claude nodes
  5. Add a Disconnect node at the end to clean up

Using Robomotion AI Credits:

  1. Add a Connect node at the start of your flow
  2. Enable "Use Robomotion AI Credits" option
  3. Use the Connection Id output in subsequent Claude nodes
  4. Add a Disconnect node at the end to clean up