Connect
Establishes a connection to Lemlist API by storing the API key credentials and returning a client ID for use in subsequent Lemlist 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.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Options
- Credentials - The Lemlist API key credential used to authenticate with the Lemlist API. You can obtain your API key from your Lemlist account settings.
Output
- Client Id - A unique identifier for the established connection that must be used in subsequent Lemlist operations. This ID references the stored API credentials.
How It Works
The Connect node is the first step when using the Connect/Disconnect pattern for Lemlist automation. When executed, the node:
- Retrieves the API key from the provided credentials
- Creates a base HTTP request with proper authentication headers (Basic Auth)
- Validates the credentials by making a test request to the Lemlist team endpoint
- If authentication succeeds, stores the authenticated request in memory
- Returns a unique Client ID that references this authenticated session
The Client ID can then be passed to other Lemlist nodes to perform operations without re-authenticating each time.
Requirements
- A valid Lemlist account
- A Lemlist API key (obtainable from Settings > Integrations > API in your Lemlist dashboard)
- The API key stored as a credential in Robomotion
Error Handling
The node will return specific errors in the following cases:
- ErrCredentials: Invalid or missing credentials
- ErrInvalidArg: Empty API key value in credentials
- ErrInternal: Authentication failed or network errors
- HTTP Status Errors: If the test authentication request fails (non-2xx status code)
Usage Example
Basic Connection Flow
-
Connect Node:
- Credentials: Select your stored Lemlist API key credential
- Output:
client_id(e.g., "xyz123abc456...")
-
Use the Client ID in subsequent operations:
- Pass
client_idto List Campaigns, Get Team, or other Lemlist nodes
- Pass
-
Disconnect Node:
- Input: Use the same
client_idto clean up the connection
- Input: Use the same
Practical Automation Scenario
Automated Lead Management Workflow:
1. Connect to Lemlist
└─> Store client_id
2. List Campaigns
└─> Use client_id to get active campaigns
3. Process campaign data
4. Unsubscribe/Remove leads based on criteria
5. Disconnect from Lemlist
└─> Clean up connection
Usage Notes
- The Connect node should be executed before any other Lemlist operations when using the Connect/Disconnect pattern
- The returned Client ID is valid only for the duration of the flow execution
- Each Connect node creates a new authenticated session that should be cleaned up with a Disconnect node
- The authentication uses Basic Auth with the API key as the password (username is empty)
- The node validates credentials immediately by making a test request to the
/api/teamendpoint - If you don't need session management, you can skip Connect/Disconnect and provide credentials directly to each node
Best Practices
- Store your Lemlist API key as a credential in Robomotion's vault rather than hardcoding it
- Use a single Connect node at the beginning of your flow to avoid multiple authentication requests
- Always pair Connect with a Disconnect node to properly clean up resources
- Handle authentication errors appropriately to prevent workflow interruptions
- Consider using direct API key authentication in nodes if you only need to make a single API call
- Test your credentials first using the Get Team node before building complex workflows
Common Errors and Solutions
Error: "No credentials content"
- Cause: The API key credential is empty or not properly configured
- Solution: Ensure your Lemlist API key is correctly saved in the credential
Error: "Response Status: 401 Unauthorized"
- Cause: Invalid or expired API key
- Solution: Generate a new API key from your Lemlist account and update the credential
Error: "Response Status: 429 Too Many Requests"
- Cause: API rate limit exceeded
- Solution: Implement delays between requests or reduce the frequency of API calls
Security Considerations
- Never expose your API key in logs or error messages
- Use Robomotion's credential system to securely store API keys
- Rotate API keys periodically for enhanced security
- Use the Disconnect node to ensure credentials are removed from memory when no longer needed
- Monitor API usage to detect unauthorized access