Actions51
- Platforms Actions
- Projects Actions
- Webhooks Actions
- ApiKeys Actions
- Auth Actions
- Identities Actions
- Members Actions
- Messages Actions
- Platform Logs Actions
Overview
The "Messages Cleanup" operation in this node allows users to delete messages older than a specified number of days within a given project. This is useful for maintaining data hygiene, managing storage limits, or complying with data retention policies by automatically removing outdated message records.
Practical examples include:
- Automatically cleaning up chat logs older than 30 days to reduce database size.
- Removing old notification messages from a messaging platform project to comply with privacy regulations.
- Periodically purging historical messages to improve system performance.
Properties
| Name | Meaning |
|---|---|
Delete messages older than this many days (daysBefore) |
Number of days; messages older than this value will be deleted. Required. |
Project (project) |
Identifier of the project on which to perform the cleanup operation. Required. |
Output
The output JSON contains the response from the API after performing the cleanup operation. Typically, this would include confirmation of deletion and possibly metadata such as the number of messages deleted or status information.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authentication to the GateKit service.
- The node makes HTTP DELETE requests to the endpoint
/api/v1/projects/{project}/messages/cleanupwith query parameters. - The user must configure the base URL and provide valid credentials for the GateKit API.
Troubleshooting
Common issues:
- Providing an invalid or non-existent project identifier may result in errors or no action.
- Specifying a non-numeric or negative value for
daysBeforecould cause request failures. - Insufficient permissions associated with the API key might prevent message deletion.
Error messages:
- Unauthorized or authentication errors indicate missing or invalid API credentials.
- Validation errors if required parameters are missing or invalid.
- Server errors if the backend service is unavailable or encounters issues during cleanup.
Resolution tips:
- Verify that the API key credential is correctly configured and has necessary permissions.
- Ensure the
projectparameter matches an existing project identifier. - Use a positive integer for
daysBefore. - Check network connectivity and API service status.
Links and References
- GateKit API Documentation (hypothetical link)
- n8n documentation on HTTP Request Node for understanding API calls
- Data retention best practices and compliance guidelines relevant to your organization