WbPromotion icon

WbPromotion

n8n node to interact with WB API

Overview

This node interacts with a campaign promotion API to post or retrieve advertising promotion adverts related to campaigns. Specifically, the "Post Adv Promotion Adverts" operation under the "Кампании" (Campaigns) resource allows users to query or update campaign adverts based on various filtering and sorting parameters.

Typical use cases include:

  • Managing the status of advertising campaigns (e.g., setting campaigns as ready, paused, or completed).
  • Filtering campaigns by type (such as automatic campaigns or auctions).
  • Sorting campaigns by creation time, last change, or ID in ascending or descending order.
  • Specifying a list of campaign IDs to target specific campaigns for promotion adverts.

Practical examples:

  • A marketing automation workflow that fetches all active campaigns ready to launch and posts promotion adverts accordingly.
  • Pausing or resuming campaigns by updating their status through this node.
  • Retrieving campaigns sorted by their last modification date to analyze recent changes.

Properties

Name Meaning
Status Campaign status filter. Possible values:
- -1: Campaign is being deleted (will disappear from responses in 3-10 minutes)
- 4: Ready to launch
- 7: Completed
- 8: Declined
- 9: Showing ads
- 11: Paused
Type Campaign type filter. Possible values:
- 4: Campaign in catalog (deprecated)
- 5: Campaign in product card (deprecated)
- 6: Campaign in search (deprecated)
- 7: Campaign in homepage recommendations (deprecated)
- 8: Automatic campaign
- 9: Auction
Order Sorting order of campaigns:
- create: By creation time
- change: By last modification time
- id: By campaign ID
Direction Sorting direction:
- desc: Descending (from larger to smaller)
- asc: Ascending (from smaller to larger)
Body List of campaign IDs (maximum 50) as JSON array. Campaign IDs can be obtained from the "Списки кампаний" (Campaign lists) method.

Output

The node outputs JSON data representing the response from the promotion adverts API endpoint. This typically includes details about the campaigns matching the specified filters and sorting criteria.

If binary data were involved (not indicated here), it would represent media or files related to campaigns, but this node focuses on JSON campaign data.

Dependencies

  • Requires an API key credential for authentication with the external campaign promotion API.
  • The base URL and request defaults are configured via bundled swagger/openAPI definitions.
  • No additional external services beyond the advertised API are required.

Troubleshooting

  • Invalid Status or Type Values: Using unsupported status or type codes may result in empty responses or errors. Ensure values match the documented options.
  • Malformed Body JSON: The "Body" property expects a JSON array of campaign IDs. Invalid JSON will cause parsing errors. Validate JSON format before input.
  • API Authentication Errors: Missing or invalid API credentials will cause authorization failures. Verify that the API key credential is correctly set up.
  • Rate Limits or Timeouts: Large requests or frequent calls might hit API rate limits. Implement retries or reduce request frequency if needed.
  • Empty Responses: If no campaigns match the filters, the output will be empty. Adjust filters or verify campaign existence.

Links and References

Discussion