The Companies API icon

The Companies API

Access company data, enrichment, analytics and more using The Companies API

Overview

This node operation updates an existing company list on The Companies API platform. It allows users to modify the segmentation criteria (query rules), mailing frequency, maximum number of companies, and other list attributes dynamically. This is useful for maintaining up-to-date and relevant company lists based on changing business needs or data insights.

Common scenarios include:

  • Refining a marketing or sales target list by updating segmentation filters.
  • Changing how often list members receive communications.
  • Adjusting the maximum size of a list to control campaign scope.
  • Triggering a resynchronization of the list data with the platform.

Example: A user wants to update a list to only include companies in the technology sector with more than 100 employees, set mail frequency to daily, and limit the list to 500 companies.

Properties

Name Meaning
Query A collection of segmentation rules defining conditions companies must meet to be included in the list. Each rule includes: Attribute (e.g., "About > business type"), Operator ("And"/"Or"), Sign (e.g., "Equals"), Values (one or more values), and Blocked operator (boolean).
Dynamic Boolean flag indicating if the list should be dynamic (automatically updated as data changes) or static.
Last seen Boolean flag indicating whether to consider the last seen date of companies when updating the list.
Mail frequency Frequency at which emails are sent to the list members. Options: Disabled, Daily, Weekly, Monthly.
Max companies Maximum number of companies allowed in the list.
Name The name of the list.
Resync Boolean flag to trigger resynchronization of the list data with the platform.
List ID Numeric identifier of the list to update. This is required to specify which list is being modified.

Output

The node outputs JSON data representing the updated list information returned from The Companies API. The structure typically contains the updated list details such as its ID, name, query rules, mail frequency, max companies, and status fields.

If the API returns binary data (not indicated here), it would represent downloadable content related to the list, but this operation primarily deals with JSON responses.

Dependencies

  • Requires an API token credential for authenticating requests to The Companies API.
  • Uses the official SDK client from @thecompaniesapi/sdk to interact with the API.
  • The node expects proper configuration of the API token in n8n credentials.

Troubleshooting

  • Unknown operation error: If the operation parameter is incorrect or unsupported, the node throws an error "Unknown operation". Ensure the operation is set exactly to "updateList".
  • SDK method not found: If the SDK does not have the expected method, verify that the installed SDK version supports the updateList operation.
  • Invalid or missing List ID: The List ID is mandatory; omitting it or providing an invalid ID will cause the API call to fail.
  • Malformed query rules: The query property must follow the expected structure with valid attributes and operators. Incorrect formatting may result in API validation errors.
  • API authentication errors: Ensure the API token credential is valid and has sufficient permissions.
  • Empty or null property values: The node cleans empty or null properties before sending. However, ensure required fields are provided to avoid incomplete requests.

Links and References

Discussion