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 integrates with The Companies API to export analytics data about companies based on user-defined queries and filters. It is particularly useful for users who want to segment companies using complex conditions and then export detailed analytics reports in various formats.
Common scenarios include:
- Exporting company analytics filtered by industry, location, or financial metrics.
- Generating reports for marketing or sales teams to target specific company segments.
- Automating data extraction workflows that require exporting company data in CSV, JSON, XLS, XML, or TXT formats.
For example, a user might create a query to export analytics for companies in the "Technology" industry with more than 100 employees, outputting the results as a CSV file for further analysis.
Properties
| Name | Meaning |
|---|---|
| Query | A collection of rules defining segmentation conditions for filtering companies. Each rule includes: Attribute (e.g., business type, industries, monthly visitors), Blocked operator (boolean), Operator (And/Or), Sign (Equals, Greater, etc.), and Values (one or more strings). |
| Full | Boolean flag indicating whether to retrieve full data details. |
| Format | Output format of the exported analytics data. Options: Csv, Json, Txt, Xls, Xml. |
| Size | Number of records to return in the export. Default is 25. |
| Sort | Sorting order of the results. Options: Asc (ascending), Desc (descending). Default is Desc. |
| Attributes | List of specific attributes to include in the export. Multiple values allowed. |
| List ID | Numeric identifier of a list to filter companies by membership. |
| Action ID | Numeric identifier of an action to filter companies related to a specific enrichment or event. |
Output
The node outputs JSON data containing the exported analytics information from The Companies API. The structure typically includes the requested company analytics data matching the query and filters specified.
If the selected format is a text-based file format (CSV, JSON, TXT, XLS, XML), the output will contain the corresponding serialized data representing the analytics export.
Binary data output is not explicitly handled by this node; all output is provided as JSON objects containing the data or error messages.
Dependencies
- Requires an API token credential for authenticating with The Companies API.
- Uses the official SDK from
@thecompaniesapi/sdkto interact with the API. - No additional environment variables are required beyond the API token credential configured in n8n.
Troubleshooting
- Unknown operation error: If the operation parameter is set incorrectly or not supported, the node throws an error "Unknown operation". Ensure the operation is set to "exportCompaniesAnalytics".
- SDK method not found: If the SDK does not have the expected method, an error "SDK method ... not found" is thrown. This may indicate version mismatch or incorrect operation name.
- Empty or invalid query rules: Providing empty or malformed query rules may result in no data returned or API errors. Validate that each rule has required fields and valid values.
- API authentication errors: Ensure the API token credential is correctly configured and has sufficient permissions.
- Large data exports: Exporting very large datasets may cause timeouts or performance issues. Use the
sizeproperty to limit the number of records per request.