WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The Remove Contacts To Sequence operation in the "Sequence" resource of the WTS Chat n8n node allows you to remove one or more contacts from a specified sequence. This is useful for managing automated messaging campaigns, drip sequences, or workflow automations where you need to dynamically exclude certain users based on their phone numbers or contact IDs.

Practical scenarios:

  • Automatically removing users who have opted out from a campaign.
  • Cleaning up sequences by removing invalid or outdated contacts.
  • Managing user participation in multi-step marketing or notification flows.

Properties

Display Name Type Description
Sequence ID String The unique identifier of the sequence from which contacts will be removed.
Phonenumbers Collection A list of phone numbers (as strings) representing contacts to be removed from the sequence.
Contacts ID Collection A list of contact IDs (as strings) to be removed from the sequence.

Details:

  • Sequence ID: Required. Identifies the target sequence.
  • Phonenumbers: Optional. You can specify multiple phone numbers; each represents a contact to remove.
  • Contacts ID: Optional. You can specify multiple contact IDs; each represents a contact to remove.
  • At least one of Phonenumbers or Contacts ID must be provided.

Output

The output is an array of objects, each with a json field containing the API response from the removal operation. The structure of this response depends on the backend API but typically includes information about the success or failure of the removal request.

Example output:

[
  {
    "json": {
      // Response from the WTS Chat API, e.g.,
      "success": true,
      "removedContactIds": ["123", "456"],
      "removedPhoneNumbers": ["+1234567890"]
    }
  }
]

Dependencies

  • External Service: Requires access to the WTS Chat API.
  • API Key: You must configure the wtsApi credential in n8n with a valid API key.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common issues:

  • Missing Sequence ID: If the Sequence ID is empty, the node will throw an error requesting you to fill it in.
  • No Contacts Provided: If neither phone numbers nor contact IDs are provided, the node will throw an error:
    "Remove a contacts either by ID or phone number"
  • Invalid Contact Data: If the provided contact IDs or phone numbers do not exist in the sequence, the API may return an error or indicate that no contacts were removed.

How to resolve:

  • Ensure the Sequence ID is correct and not empty.
  • Provide at least one phone number or contact ID.
  • Double-check that the contacts you wish to remove are actually part of the sequence.

Links and References

Discussion