Turn affiliate programs into fully published WooCommerce products—on autopilot.
This n8n template pulls offers from PartnerStack/Impact (or your own links), generates SEO copy and images with AI, and publishes External products to WordPress/WooCommerce—hands-free.
🛒 Output of Wordpress Website Product:
🎥 Watch the implementation tutorial:

🔗 Start with n8n (Cloud or Self-hosted):
👉 https://n8n.io | Guide: https://syncbricks.com/self-hosting-n8n-on-ubuntu-24-04-a-step-by-step-guide/
🧠 OpenAI API (text + image):
👉 https://platform.openai.com/docs
🤝 PartnerStack:
👉 https://partnerstack.com
📄 Google Sheets API:
👉 https://developers.google.com/sheets/api
✅ n8n (self-hosted or Cloud)
✅ WordPress + WooCommerce with REST API enabled
✅ WordPress Application Password / API credential with media & products scope
✅ OpenAI (or your preferred AI) API key
✅ Google Sheet with minimum columns:
AdvertiserIdandCompaignID (unique key)AdvertiserUrl (merchant/product URL)TrackingLink (your affiliate URL)Brandpartner_status (e.g., “Active”)product_published (Yes/blank)error (Yes/blank)partner_status = Active AND product_published != Yes AND error != Yes.AdvertiserUrl to fetch the landing/product page./wp/v2/media) with title/alt/caption and proper content-type.Create product via POST /wc/v3/products with:
type: "external"name, short_description, descriptionexternal_url: TrackingLinkbutton_text: "Sign Up" (or “Buy Now” / “Get It Now”)status: "publish" (or “draft” if you want manual review)Attach featured image with the uploaded media ID.
Set categories by ID (ensure your mapping is correct).
Update the Google Sheet row using the unique key (AdvertiserIdandCompaignID):
product_published = Yeserror = Yes and skip that row next run.error = Yes and already-published rows—no accidental duplicates.draft for human QA.| Issue | Fix |
|---|---|
| WordPress 401/403 | Re-create Application Password; ensure correct base URL & permalinks |
| Image upload fails | Check content-type & binary upload settings; verify max upload size on server |
| Product lacks image/category | Confirm media ID capture & category ID mapping |
| Duplicate items | Ensure product_published is set to Yes after success; keep Limit node during testing |
| Fetch errors on merchant site | Keep “continue on error”; route to set error = Yes, then review manually |
Import the template → Connect credentials → Point to your Sheet → Run once → Enable schedule.
Need help or a DFY build? SyncBricks can implement and customize this for your stack.
👉 Amjid Ali — https://linkedin.com/in/amjidali
🌐 Website — https://amjidali.com | https://syncbricks.com.au
▶️ YouTube — https://youtube.com/@syncbricks
Knowledge Base: woocommerce-rest, partnerstack, impact, affiliate-automation, openai, n8n, google-sheets, content-generation, image-generation, wordpress-api, creator-hub