WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The "Get All Sequences" operation in the Sequence resource retrieves a list of sequences from the WTS Chat API. This node is useful for workflows that need to fetch and process multiple sequences, such as automating marketing campaigns, managing contact engagement flows, or analyzing sequence performance.

Typical use cases include:

  • Fetching all sequences with optional filters like name or associated contact ID.
  • Including detailed statistics or execution counts for each sequence.
  • Paginating through large sets of sequences automatically or manually.

For example, you might use this node to get all sequences related to a specific contact or to retrieve sequences created within a certain date range, then trigger further actions based on the retrieved data.

Properties

Name Meaning
Include Details Select which additional fields to include in the response. Options: ContactExecutingCount, ExecutionStats.
Name Filter sequences by their name (string).
Contact ID Filter sequences associated with a specific contact ID (string).
CreatedAt.After Filter sequences created after this date/time (format: YYYY-MM-DD hh:mm, timezone-aware).
CreatedAt.Before Filter sequences created before this date/time (format: YYYY-MM-DD hh:mm, timezone-aware).
UpdatedAt.After Filter sequences updated after this date/time (format: YYYY-MM-DD hh:mm, timezone-aware).
UpdatedAt.Before Filter sequences updated before this date/time (format: YYYY-MM-DD hh:mm, timezone-aware).
Auto Pagination Enable automatic pagination to fetch multiple pages of results seamlessly (boolean).
Max Pages When auto pagination is enabled, limit the maximum number of pages to retrieve (number, 1-100).
Page Number When auto pagination is disabled, specify which page number to retrieve (number).
Page Size When auto pagination is disabled, specify how many items per page to retrieve (number, 1-100).
Order By Field name to sort the results by (string).
Order Direction Direction of sorting: Ascending or Descending.

Output

The output is an array of JSON objects representing sequences retrieved from the API. Each object contains sequence data fields, which may include:

  • Basic sequence information such as ID, name, creation and update timestamps.
  • If requested via "Include Details," additional fields like contact execution count and execution statistics.
  • Metadata and other relevant sequence attributes depending on the API response.

No binary data is output by this operation.

Example output snippet (simplified):

[
  {
    "id": "sequence_123",
    "name": "Welcome Sequence",
    "createdAt": "2023-01-01T12:00:00Z",
    "updatedAt": "2023-02-01T12:00:00Z",
    "contactExecutingCount": 25,
    "executionStats": { "success": 20, "fail": 5 }
  },
  ...
]

Dependencies

  • Requires an active connection to the WTS Chat API using an API key credential.
  • The node uses the base URL https://api.wts.chat.
  • Proper API credentials must be configured in n8n for authentication.
  • No additional external dependencies are required beyond the API access.

Troubleshooting

  • Empty or missing parameters: Ensure required parameters like resource, operation, and any filters are correctly set.
  • API authentication errors: Verify that the API key credential is valid and has necessary permissions.
  • Pagination issues: If too many results are expected, consider enabling auto pagination and setting an appropriate max pages value.
  • Date format errors: Date/time filters must follow the specified format (YYYY-MM-DD hh:mm) and respect time zone considerations.
  • Common error messages:
    • "SequenceID is empty!" — occurs if a sequence ID parameter is required but not provided.
    • "Fill in the field session" or similar — indicates mandatory fields are missing.
    • Network or API errors will throw exceptions wrapped as node errors; check API connectivity and credentials.

Links and References

Discussion