Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare API, specifically supporting multiple resources including the Data Export API. The "Get Job" operation under the Data Export API resource allows users to retrieve detailed information about a specific export job by its Job ID.

Typical use cases include:

  • Monitoring the status and details of data export jobs created in Contentsquare.
  • Automating workflows that depend on the completion or results of export jobs.
  • Integrating Contentsquare export job data into other systems for further analysis or reporting.

For example, a user might create an export job to extract user behavior data and then use this node to check the job's progress or retrieve its metadata programmatically within an n8n workflow.

Properties

Name Meaning
Job ID The unique identifier of the export job to retrieve. Required for "Get Job" and related operations.
Query Parameters A collection of optional filters and parameters to refine the request. Includes:
- Device: Filter by device type (All, Desktop, Mobile, Tablet).
- End Date: End date for analysis range (must be after start date).
- Format: Start date of query date range (string).
- Frequency: Filter based on export frequency (string).
- From: Filter based on export format (string).
- Goal ID: Numeric ID to return conversion metrics for a non-ecommerce goal.
- IDs: Comma-separated list of segment IDs to filter results.
- Limit: Maximum number of results to return (default 50).
- Metric Type: Quantile or Average (default Quantile).
- Order: Ascending or Descending order of results (default Descending).
- Page: Page number of results to retrieve.
- Period: Granularity of results (Daily or None, default None).
- Project ID: Target project ID (required only for account-level API keys).
- Quantile: Percentile value used if metric type is quantile (default 75).
- Scope: Filter based on scope (string).
- Segment IDs: Multiple segments separated by commas for intersection metrics (number).
- Start Date: Beginning of date range for analysis (must be before end date).
- State: Filter based on status (string).
- To: End date of query date range (string).

Output

The output is a JSON array where each item corresponds to the response from the Contentsquare API for the requested job. The structure depends on the API response but generally includes:

  • Metadata about the export job such as job ID, status, creation date, and other job-specific details.
  • If the API returns no content, the node outputs a status code message like "204 No Content".

No binary data output is indicated for this operation.

Dependencies

  • Requires valid Contentsquare API credentials including Client ID, Client Secret, and optionally Project ID and Scope.
  • The node performs OAuth2 client credentials flow to obtain an access token before making API requests.
  • Network access to https://api.contentsquare.com is required.
  • Proper configuration of the API credentials in n8n is necessary for successful authentication.

Troubleshooting

  • Missing Credentials: Errors will occur if Client ID or Client Secret are not provided. Ensure these are set correctly in the node credentials.
  • Missing Required Parameters: For the "Get Job" operation, the Job ID must be provided; otherwise, the node throws an error indicating the missing parameter.
  • Authentication Failures: If the access token cannot be retrieved, verify the credentials and network connectivity.
  • API Endpoint Issues: If the endpoint URL is not returned or invalid, check the credential configuration and API availability.
  • Unexpected API Responses: If the API returns unexpected data or errors, inspect the raw response logged by the node for debugging.
  • Rate Limits or Quotas: The API may enforce rate limits; handle such errors by implementing retries or backoff strategies in your workflow.

Links and References

Discussion