Actions29
- Posts Actions
- Messages Actions
- Groups Actions
- Users Actions
- Photos Actions
Messages → Delete Message
AI-generatedOverview
This node integrates with the VKontakte (VK) social network API, allowing users to perform various actions on VK resources such as posts, messages, groups, users, photos, and more. Specifically, for the Messages resource and the Delete Message operation, the node enables deleting one or multiple messages from a conversation.
Typical use cases include automating message management in VK chats, such as cleaning up old or unwanted messages, moderating conversations, or integrating VK messaging with other workflows.
Example scenario: Automatically delete specific messages identified by their IDs from a VK conversation to maintain chat hygiene or comply with data retention policies.
Properties
| Name | Meaning |
|---|---|
| count | Number of items to return. Used for pagination when retrieving lists of items. |
| offset | Offset for pagination. Defines how many items to skip before starting to collect results. |
| messageIds | IDs of the messages to delete (required for Delete Message operation). |
Note: The provided properties JSON only includes count and offset, which are general pagination parameters used across multiple resources including messages. For the Delete Message operation specifically, the code expects a parameter named messageIds (an array or list of message IDs to delete), although it was not included in the user-provided properties JSON.
Output
The node outputs an array of JSON objects corresponding to each input item processed. For the Delete Message operation, the output JSON contains the response from the VK API confirming the deletion status of the specified messages.
The exact structure depends on the VK API's response but typically includes success confirmation or error details if deletion failed.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for VKontakte OAuth2 authentication.
- The node uses the VK API base URL
https://api.vk.com/method. - Proper permissions/scopes must be granted to the API token to allow message deletion.
- No additional external dependencies beyond the VK API and n8n environment.
Troubleshooting
Common issues:
- Missing or invalid
messageIdsparameter will cause the operation to fail. - Insufficient permissions in the VK API token to delete messages.
- Trying to delete messages that do not exist or belong to another user may result in errors.
- Network or API rate limiting issues can cause request failures.
- Missing or invalid
Error messages:
"Unknown operation: deleteMessage": This indicates the operation name was not recognized; ensure the operation parameter is correctly set.- API errors returned from VK will be passed through; check the error message for details like permission denied or invalid message ID.
Resolution tips:
- Verify that
messageIdsis provided and correctly formatted. - Confirm the API token has the required scopes for message deletion.
- Handle errors gracefully using the node’s "Continue On Fail" option if processing multiple items.
- Verify that
Links and References
- VK API Messages.delete method
- VKontakte Developer Documentation
- n8n Documentation on Creating Custom Nodes
If you want me to extract details about other operations or resources, please let me know!