Actions29
- Posts Actions
- Messages Actions
- Groups Actions
- Users Actions
- Photos Actions
Posts → Delete Post
AI-generatedOverview
This node integrates with the VKontakte (VK) social network API, enabling automation of various VK operations within n8n workflows. Specifically, for the Posts resource and the Delete Post operation, it allows users to delete a post from a VK wall or group.
Typical use cases include:
- Automatically removing outdated or unwanted posts from a user’s or group’s VK page.
- Managing content lifecycle by deleting posts based on certain triggers or conditions in an automated workflow.
- Moderation tasks where posts need to be programmatically deleted.
Example: A marketing team could automate deletion of promotional posts after a campaign ends by triggering this node with the post ID and owner ID.
Properties
| Name | Meaning |
|---|---|
| Owner ID | The identifier of the owner of the post. Use a negative number to specify a group ID. |
| Count | Number of items to return (used in some operations but not directly relevant for delete). |
| Offset | Pagination offset (used in some operations but not directly relevant for delete). |
| Post ID | The unique identifier of the post to delete. |
Note: The Post ID property is required for the Delete Post operation but was not included in the provided properties JSON snippet. It is referenced in the code as a parameter retrieved during the delete operation.
Output
The node outputs a JSON object representing the response from the VK API after attempting to delete the specified post. This typically includes confirmation of deletion or error details if the operation failed.
The output structure is:
{
"response": <boolean or object>
}
- If successful, the response usually contains a boolean
trueindicating the post was deleted. - In case of failure, an error message will be returned in the JSON output under an
errorfield if continue-on-fail is enabled.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the VKontakte API via an OAuth2 API credential configured in n8n.
- 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 post deletion.
Troubleshooting
Common issues:
- Invalid or missing
postIdorownerIdparameters will cause the API call to fail. - Insufficient permissions or expired tokens can result in authorization errors.
- Attempting to delete a post that does not exist or is already deleted will return an error.
- Invalid or missing
Error messages:
"Unknown operation: deletePost"— indicates the operation name was incorrect or unsupported.- API errors from VK such as
"Access denied"or"Post not found"should be checked against the input parameters and API credentials.
Resolutions:
- Verify that
postIdandownerIdare correctly set and correspond to existing posts. - Ensure the OAuth2 credential has the necessary scopes for managing posts.
- Enable "Continue On Fail" in the node settings to handle errors gracefully in workflows.
- Verify that