WbPromotion icon

WbPromotion

n8n node to interact with WB API

Overview

This node creates advertising campaigns on a platform (likely Wildberries, given the context). It allows users to configure and launch automatic ad campaigns by specifying campaign details such as type, name, subject ID, budget, billing type, and associated product SKUs. This is useful for sellers or marketers who want to automate and manage promotional campaigns programmatically.

Typical use cases include:

  • Creating new advertising campaigns for specific products.
  • Setting campaign budgets and billing methods.
  • Pausing campaigns immediately after creation for review before activation.
  • Associating multiple product SKUs with a campaign.

Example: A seller wants to create an automatic campaign named "Parachutes" targeting a specific product category with a set budget and billing from their balance, initially paused for manual review.

Properties

Name Meaning
Type Type of automatic campaign. Default is 8.
Name Campaign name (max 128 characters).
Subject Id ID of the item for which the campaign is created. Existing IDs can be retrieved via a content API.
Sum Amount to fund the campaign.
Btype Billing type:
0 - Account
1 - Balance
3 - Bonuses
On Pause Whether the campaign is paused after creation:
true - paused (launch available after 3 minutes)
false - starts immediately
Nms Array of product SKUs (WB article numbers) associated with the campaign. Maximum 100 items.
Cpm Bid amount. If below minimum allowed, it will be set automatically to the minimum.

Output

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

No binary data output is indicated.

Dependencies

  • Requires an API key credential for authentication with the external advertising platform's API.
  • The node uses a base URL and request defaults configured from an imported OpenAPI specification.
  • No other external dependencies are explicitly required.

Troubleshooting

  • Invalid Subject Id: If the provided subject ID does not exist or is not accessible, the API may return an error. Verify the subject ID using the content listing API before creating a campaign.
  • Exceeded SKU Limit: Providing more than 100 SKUs in the nms array may cause rejection. Limit the number of SKUs accordingly.
  • Insufficient Funds or Invalid Billing Type: Errors may occur if the billing type or sum is invalid or insufficient funds are available.
  • Campaign Name Length: Names longer than 128 characters might be rejected.
  • Immediate Start Issues: If on_pause is false and the campaign starts immediately but fails, check API permissions and account status.

Links and References

  • Platform API documentation for campaign creation (not provided here).
  • Content API method to retrieve valid subject IDs.
  • General n8n documentation on creating custom nodes and handling API requests.

Discussion