Actions41
- Companies Actions
- Search companies
- Search companies (POST)
- Enrich company
- Search companies by name
- Search companies by prompt
- Search similar companies
- Count companies
- Count companies (POST)
- Enrich company by email
- Enrich company by social
- Get email patterns
- Ask company
- Get company context
- Fetch companies analytics
- Export companies analytics
- Lists Actions
- Locations Actions
- Business data Actions
- Actions Actions
- Prompts Actions
- Utilities Actions
Overview
This node operation "Toggle companies in list" allows users to attach or detach companies from a specified company list by their IDs or domains. It is useful for managing dynamic company lists, such as marketing target groups, sales prospect lists, or customer segments, directly within an automation workflow.
Practical examples include:
- Adding multiple companies to a mailing list based on recent lead generation.
- Removing companies that no longer meet criteria from a partner list.
- Refreshing the membership of a list by toggling companies on or off programmatically.
Properties
| Name | Meaning |
|---|---|
| Domains | List of company domain names to toggle in the list (multiple values allowed). |
| Refresh | Boolean flag indicating whether to refresh the list after toggling companies. |
| Action | Operation to perform: either "Attach" (add companies) or "Detach" (remove companies). |
| Company IDs | List of company unique identifiers to toggle in the list (multiple values allowed). |
| List ID | Numeric identifier of the target company list where companies will be toggled. |
Output
The output JSON contains the response data from the API call that toggles companies in the list. This typically includes confirmation of the action performed and details about the updated list state or affected companies.
If the operation fails, the output JSON will contain an error field with the error message.
No binary data output is produced by this operation.
Dependencies
- Requires an API token credential for authenticating with The Companies API service.
- Uses the official SDK client of The Companies API to perform the toggle operation.
- The node expects proper configuration of the API token credential in n8n.
Troubleshooting
- Unknown operation error: If the operation name is incorrect or not supported, the node throws an error "Unknown operation". Ensure the operation parameter is set exactly to "toggleCompaniesInList".
- SDK method not found: If the SDK does not have the required method, it throws "SDK method ... not found". This indicates a version mismatch or incomplete SDK installation.
- Invalid input parameters: Missing or invalid
listId,companyIds, ordomainsmay cause API errors. Verify all required inputs are provided and correctly formatted. - API authentication errors: Invalid or missing API token will result in authentication failures. Confirm the API token credential is valid and properly configured.
- Empty arrays or null values: The node cleans empty or null inputs before sending. However, providing empty arrays for required fields might cause unexpected behavior; ensure meaningful values are supplied.