WbPromotion icon

WbPromotion

n8n node to interact with WB API

Overview

This node is designed to create advertising campaigns by sending campaign data, including a campaign name and a list of product cards, to an external API. It is particularly useful for marketing automation workflows where users want to programmatically manage promotional campaigns with specific products attached.

A practical example would be automating the creation of a new campaign on an e-commerce platform by specifying the campaign's name and associating up to 50 product cards (items) that should be promoted within that campaign.

Properties

Name Meaning
Campaign Name The name/title of the advertising campaign to be created.
Nms A JSON array representing product cards to include in the campaign. These product cards can be retrieved from a separate method and must not exceed 50 items.

Output

The node outputs JSON data representing the response from the campaign creation API. This typically includes details about the newly created campaign such as its ID, status, or any confirmation messages returned by the service.

If the node supports binary data output, it would generally relate to media or assets associated with the campaign, but based on the provided code and properties, the primary output is JSON structured data.

Dependencies

  • Requires an API key credential for authentication with the external advertising platform.
  • Depends on an external API endpoint for creating campaigns and managing product cards.
  • The base URL and request headers are configured via imported swagger/openAPI definitions.
  • No additional environment variables are explicitly required beyond standard API credentials.

Troubleshooting

  • Invalid JSON in "Nms" property: Since the "Nms" input expects a JSON string that is parsed before sending, malformed JSON will cause errors. Ensure the JSON array is correctly formatted.
  • Exceeding product card limit: The API limits the number of product cards to 50. Sending more than this may result in an error.
  • Missing or invalid campaign name: The campaign name is required; leaving it empty or invalid might cause the API to reject the request.
  • Authentication errors: If the API key or token is missing or incorrect, the node will fail to authenticate with the external service.
  • Network or API errors: Standard HTTP errors like timeouts or server errors should be handled by retrying or checking the API status.

Links and References

  • Product Cards for Campaigns API Documentation — Reference for obtaining valid product cards (nms) to use in campaigns.
  • External API documentation for campaign creation (not included here, but typically available from the advertising platform provider).

Discussion