Actions12
Overview
The node integrates with the Memberspot API to manage user-related data and actions within a membership or course platform. Specifically, the "Set Offer State" operation allows you to activate or deactivate a particular offer for a user identified by their email address. This is useful in scenarios where you want to control user access to specific offers dynamically, such as enabling or disabling promotional offers, subscriptions, or course packages.
Practical examples:
- Deactivating an expired promotional offer for a user.
- Reactivating a previously disabled subscription offer after payment confirmation.
- Managing user entitlements programmatically based on external triggers or workflows.
Properties
| Name | Meaning |
|---|---|
| The email address of the user whose offer state you want to set. | |
| Offer Name or ID | The identifier or name of the offer to be activated or deactivated for the user. |
| Active | Boolean flag indicating whether the offer should be active (true) or inactive (false). |
Output
The node outputs JSON data representing the response from the Memberspot API after attempting to set the offer state. This typically includes confirmation of the updated state or details about the user-offer relationship.
Example output structure (simplified):
{
"success": true,
"email": "user@example.com",
"offerId": "12345",
"active": true
}
If an error occurs, the output JSON will contain an error field with the error message.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the Memberspot API.
- The base URL for the Memberspot API must be configured in the credentials.
- Network access to the Memberspot API endpoint is necessary.
Troubleshooting
Common issues:
- Invalid or missing API key credential can cause authentication failures.
- Incorrect email or offer ID may result in errors or no changes applied.
- Network connectivity problems can prevent successful API calls.
Error messages:
"Failed to load offers": Indicates inability to retrieve available offers, possibly due to credential or network issues.- API error responses are passed through; check the error message for details like "User not found" or "Offer not found".
Resolution tips:
- Verify that the API key credential is correctly set up and has sufficient permissions.
- Confirm that the email and offer ID values are correct and exist in the Memberspot system.
- Ensure stable internet connection and that the Memberspot API service is operational.
Links and References
- Memberspot API Documentation (hypothetical link, replace with actual if available)
- n8n Expressions Documentation β for using expressions in property fields.