Actions11
Overview
The "Set Offer State" operation in the Memberspot node allows you to activate or deactivate a specific offer for a user identified by their email address. This is useful in scenarios where you want to control user access to particular offers, such as enabling or disabling course enrollments, subscriptions, or special promotions dynamically.
Practical examples:
- Automatically deactivate an expired promotional offer for a user.
- Reactivate a previously disabled course access after payment confirmation.
- Manage 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 a JSON object representing the response from the Memberspot API after setting the offer state. This typically includes confirmation details about the updated offer state for the user. The exact structure depends on the API response but generally confirms success or failure and may include the updated offer data.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential configured for the Memberspot API.
- The node makes authenticated HTTP requests to the Memberspot API base URL.
- Proper permissions on the API key are necessary to modify user offer states.
Troubleshooting
Common issues:
- Invalid or missing email address: Ensure the email is correctly provided and corresponds to an existing user.
- Incorrect offer ID or name: Use the provided dropdown or verify the offer identifier exists in Memberspot.
- Insufficient API permissions: Verify that the API key has rights to update user offers.
- Network or authentication errors: Check API credentials and network connectivity.
Error messages:
NodeApiErrorwith details from the API response if the request fails.- Errors related to invalid parameters will indicate which input is problematic.
To resolve errors, verify all inputs, ensure the API key is valid and has required scopes, and confirm the offer and user exist in the Memberspot system.
Links and References
- Memberspot API Documentation (generic placeholder link)
- n8n Expressions Documentation – for using expressions in properties like Offer ID