ClickSend icon

ClickSend

Consume ClickSend API

Overview

The ClickSend node for n8n allows you to interact with the ClickSend API. Specifically, the SMS → Get SMS History operation retrieves a list of sent SMS messages within a specified date range, supporting pagination and result limits. This is useful for auditing, reporting, or tracking message delivery over time.

Common scenarios:

  • Generating reports of all SMS messages sent in a given period.
  • Auditing communication logs for compliance or troubleshooting.
  • Integrating SMS history into dashboards or analytics tools.

Example:
A business wants to analyze all SMS notifications sent to customers last month. By specifying the date range, they can retrieve and process this data automatically.

Properties

Name Type Meaning
From Date dateTime Start date/time for the SMS history search (inclusive).
To Date dateTime End date/time for the SMS history search (inclusive).
Page number The page number of results to start from (for pagination).
Limit number Maximum number of results to return per request (default: 50, min: 1).

Output

The output will be a JSON object containing the SMS history records matching the specified criteria. Each record typically includes details such as:

{
  "messages": [
    {
      "message_id": "string",
      "to": "string",
      "from": "string",
      "body": "string",
      "status": "string",
      "created": "timestamp",
      "scheduled": "timestamp",
      "sent": "timestamp",
      "delivered": "timestamp",
      "custom_string": "string"
      // ...other fields depending on ClickSend's API response
    }
    // ...more messages
  ],
  "total": 123,
  "page": 1,
  "limit": 50
}
  • The structure may include additional metadata such as total count, current page, and limit.

Dependencies

  • External Service: Requires access to the ClickSend API.
  • API Key: You must configure valid ClickSend API credentials in n8n under the name clickSendApi.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common issues:

  • Invalid Credentials: If your API key is incorrect or missing, authentication errors will occur. Ensure your ClickSend credentials are correctly set up in n8n.
  • Date Format Errors: Dates must be provided in a valid format; otherwise, the node may fail to convert them to Unix timestamps.
  • Pagination Issues: If the page or limit values are out of range, you may receive empty results or errors from the API.
  • API Rate Limits: Excessive requests may trigger rate limiting by ClickSend.

Error messages and resolutions:

  • "401 Unauthorized": Check your API credentials.
  • "400 Bad Request": Verify that all input parameters (dates, page, limit) are valid and within allowed ranges.
  • "429 Too Many Requests": Wait before retrying or reduce request frequency.

Links and References

Discussion