Actions26
Overview
This node integrates with the Mercado Pago MCP server to manage webhooks among other resources. Specifically, for the Webhook - Update operation, it allows users to update an existing webhook's configuration by specifying its ID, a new URL endpoint, and the events it should listen for.
Common scenarios where this node is beneficial include:
- Updating the callback URL of a webhook when your receiving service endpoint changes.
- Modifying which event types (e.g., payment, plan, subscription, invoice) the webhook listens to without recreating it.
- Managing webhook configurations programmatically as part of automated workflows.
Practical example:
- You have a webhook set up to listen for payment events, but now you want it to also listen for subscription events and change the URL to a new endpoint. Using this node, you can update the webhook with the new URL and event list in one step.
Properties
| Name | Meaning |
|---|---|
| Webhook ID | The unique identifier of the webhook to update. |
| URL | The new webhook URL endpoint where notifications will be sent. |
| Events | The list of event types the webhook should listen for. Options: Payment, Plan, Subscription, Invoice |
Output
The node outputs a JSON object containing the updated webhook details returned from the Mercado Pago API. The output includes:
type: A string indicating the operation type, here"webhook_updated".webhook: An object representing the updated webhook resource, including its ID, URL, subscribed events, and other metadata as provided by the API.success: Boolean flag indicating if the operation was successful (true).timestamp: ISO timestamp of when the operation was performed.
Example output structure (simplified):
{
"type": "webhook_updated",
"webhook": {
"id": "123456",
"url": "https://new-webhook-url.com/endpoint",
"events": [
{ "topic": "payment" },
{ "topic": "subscription" }
],
...
},
"success": true,
"timestamp": "2024-06-01T12:00:00.000Z"
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Mercado Pago MCP API.
- Uses the Axios HTTP client library to make REST API calls.
- The node expects the Mercado Pago API endpoint and access token to be configured via credentials.
- No additional environment variables are required beyond the API authentication setup.
Troubleshooting
- Missing or invalid Webhook ID: If the webhook ID is not provided or incorrect, the API will return an error. Ensure the correct webhook ID is specified.
- Invalid URL format: The URL must be a valid endpoint accessible by Mercado Pago servers. Invalid URLs may cause the update to fail.
- Insufficient permissions: The API key used must have permission to update webhooks. Check API key scopes and roles.
- Network issues: Connectivity problems between n8n and Mercado Pago API can cause request failures.
- API rate limits: Frequent updates might hit API rate limits; handle errors accordingly.
- Error messages: Errors thrown by the node include the message from the API response. Review these messages to identify issues such as unauthorized access, invalid parameters, or resource not found.
To resolve errors:
- Verify all required properties are correctly set.
- Confirm the API key is valid and has necessary permissions.
- Check network connectivity.
- Review the exact error message returned for clues.