Upsert and merchandise Medusa products from a PIM via webhook and Admin API
UnknownWhat this workflow does
This workflow has 14 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Medusa (community).
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Validate Launch Payload (Code): runs custom JavaScript code
- Fetch Product by Handle (Medusa): uses Medusa
- If: checks a condition and branches into true / false
- Update Product Details (Medusa): update
- Create Product with Price (Medusa): create
- Log Updated Product (Edit Fields (Set)): sets 6 fields: action, product_id, handle…
- Log New Product (Edit Fields (Set)): sets 6 fields: action, product_id, handle…
- Merge: merges the data from its input branches
- Categorize Product (Medusa): add products (product category)
- Collect Product (Medusa): add products (product collection)
…plus 3 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that @blackswampai/n8n-nodes-medusa is verified or supports 3.0 (used in Fetch Product by Handle, Update Product Details, Create Product with Price).
Nodes used (7)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Medusa
@blackswampai/n8n-nodes-medusa.medusa - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - Merge
n8n-nodes-base.merge - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow receives a product-launch webhook from a PIM, upserts the product in Medusa by handle, assigns it to a category and collection, publishes it to a sales channel, and returns a JSON response describing the action taken. How it works…