Clash of Clans icon

Clash of Clans

Comprehensive Clash of Clans API integration with advanced features

Overview

This node integrates with the Clash of Clans API to retrieve various types of game data. Specifically, the "Get Clan War Log" operation fetches the war log for a specified clan, providing historical records of clan wars including details about each war's outcome and participants.

This node is beneficial for Clash of Clans community managers, clan leaders, or analytics enthusiasts who want to track clan war performance over time, analyze past battles, or integrate war data into dashboards or reports.

Example use case: Automatically retrieving the latest clan war logs after each war ends to update a website or notify clan members about recent war results.

Properties

Name Meaning
Clan Tag The unique identifier of the clan whose war log you want to retrieve. Must start with #.

Output

The node outputs JSON data containing the clan war log information retrieved from the Clash of Clans API. The output structure includes:

  • operation: The operation performed (getWarLog).
  • url: The full API endpoint URL used.
  • data: The raw response data from the API, which contains the clan war log details such as wars history, results, participants, and timestamps.
  • timestamp: The ISO timestamp when the data was fetched.
  • metadata: Additional metadata including the type of operation (clan), API version (v1), and processing timestamp.

No binary data is produced by this operation.

Dependencies

  • Requires an active Clash of Clans API key credential configured in n8n.
  • Internet access to call the official Clash of Clans API at https://api.clashofclans.com/v1.
  • Proper permissions on the API key to access clan war log endpoints.

Troubleshooting

  • Common issues:

    • Invalid or missing clan tag (must start with #): Ensure the clan tag input is correctly formatted.
    • API authentication errors: Verify that the API token credential is valid and has not expired.
    • Rate limiting by the Clash of Clans API: If too many requests are made in a short period, the API may reject calls temporarily.
    • Network connectivity problems: Confirm that the server running n8n can reach the Clash of Clans API endpoint.
  • Error messages:

    • "Operation "getWarLog" not supported": This indicates a misconfiguration or typo in the operation parameter; ensure it is exactly "getWarLog".
    • HTTP 401 Unauthorized: Check API token validity and permissions.
    • HTTP 404 Not Found: The clan tag might be incorrect or the clan does not exist.

To resolve these, double-check inputs, credentials, and network settings.

Links and References


If you need summaries for other operations or resources, feel free to ask!

Discussion