Overview
This node allows you to directly accumulate (add) points to a user's account using their email address via the Apprecio API. It is useful in loyalty, rewards, or incentive programs where you need to credit points to users based on their email, for example after a purchase, event participation, or as part of a promotional campaign.
Practical examples:
- Awarding bonus points to a user after they complete a survey.
- Crediting points to a customer’s account after a successful referral.
- Manually adjusting a user's point balance for customer service reasons.
Properties
Name | Type | Meaning |
---|---|---|
String | The email address of the user who will receive the points. | |
Monto | Number | The number of points to be credited to the user's account. |
Motivo | String | The reason or description for the points being credited to the account. |
Output
The node outputs the JSON response received from the Apprecio API. The structure of this output depends on the API's response for the "carga_directa_email" action, but typically includes information about the transaction status, updated balances, and any relevant messages from the API.
Example output (structure may vary):
{
"status": "success",
"message": "Puntos cargados correctamente",
"data": {
"email": "[email protected]",
"puntos_cargados": 100,
"saldo_actual": 500
}
}
Dependencies
- External Service: Requires access to the Apprecio API endpoint.
- API Credentials: You must configure the
apprecioApi
credentials in n8n, including:apiUrl
(optional, defaults tohttps://apiv2.dcanje.com/api
)publicToken
privateToken
- Environment: No special environment variables are required beyond n8n credential configuration.
Troubleshooting
Common Issues:
- Invalid Credentials: If the public or private token is incorrect, the API will reject requests.
- Missing Required Fields: All properties (Email, Monto, Motivo) are required; omitting any will result in an error.
- API Errors: If the API returns an error, the node will throw an error with the message from the API.
Error Messages and Resolutions:
Error de la API de Apprecio: ...
: Indicates an error returned by the Apprecio API. Check the message for details (e.g., invalid email, insufficient permissions).No se recibió respuesta de la API de Apprecio
: The API did not respond. Check network connectivity and API availability.La operación cargaDirectaEmail no está soportada
: This should not occur if the operation is selected correctly; ensure the correct operation is chosen in the node configuration.