Actions17
Overview
This node interacts with KoboToolbox's webhook (hook) system, specifically focusing on retrieving and managing hook logs. It allows users to fetch logs related to a specific webhook of a form, filter these logs by status and date range, and supports operations like retrying failed webhook deliveries.
Common scenarios where this node is beneficial include:
- Monitoring webhook delivery statuses for forms to ensure data synchronization.
- Debugging webhook failures by reviewing detailed logs.
- Automating retries of failed webhook calls without manual intervention.
Practical example:
- A user wants to retrieve all failed webhook logs for a particular form's webhook within the last week to analyze issues causing delivery failures.
- Another use case is automatically retrying all failed webhook attempts for a given hook to ensure eventual data consistency.
Properties
Name | Meaning |
---|---|
Form Name or ID | The identifier of the form whose webhook logs you want to access. Choose from a list or specify via expression. Example: aSAvYreNzVEkrWg5Gdcvg . |
Hook ID | The unique identifier of the webhook (starts with "h") associated with the form. Example: hVehywQ2oXPYGHJHKtqth4 . |
Log Status | Filter logs by their status. Options are: - All (no filtering) - Failed - Pending - Success |
Start Date | The earliest date/time from which to retrieve webhook logs. Only logs on or after this date will be returned. |
End Date | The latest date/time up to which to retrieve webhook logs. Only logs on or before this date will be returned. |
Output
The node outputs an array of JSON objects representing webhook logs for the specified hook. Each log entry contains details about individual webhook delivery attempts, including status, timestamps, and other metadata provided by the KoboToolbox API.
If binary data were involved in this operation (which it is not for logs), it would be included in the binary
output field, but for the "Logs" operation, only JSON data is returned.
Dependencies
- Requires an active connection to the KoboToolbox API using an API key credential configured in n8n.
- The node depends on the KoboToolbox API endpoints for hooks and logs under
/api/v2/assets/{formId}/hooks/{hookId}/logs/
. - The node uses internal helper methods to load available forms dynamically for selection.
Troubleshooting
- No logs returned: Ensure the correct Form ID and Hook ID are provided. Also, verify that logs exist for the specified filters (status, start/end dates).
- Invalid Hook ID error: Confirm the Hook ID starts with "h" and belongs to the selected form.
- API authentication errors: Check that the API key credential is valid and has sufficient permissions.
- Date filter issues: Make sure the Start Date is earlier than or equal to the End Date.
- Empty response despite existing logs: Verify that the status filter is set correctly; setting it to "All" returns all logs regardless of status.
Links and References
- KoboToolbox API Documentation
- n8n Expressions Documentation (for dynamic property values)
- KoboToolbox Webhooks Guide (general info on webhooks)