Actions14
Overview
The Shopistuff node for n8n allows you to create new orders in a Shopify store via the Shopify API. This is particularly useful for automating order creation workflows, such as syncing orders from other platforms, creating test orders, or programmatically generating orders based on custom business logic.
Common scenarios:
- Automatically creating Shopify orders when a sale occurs on another platform.
- Generating test orders for QA or development purposes.
- Creating orders with specific line items, discounts, and customer details as part of a larger automation.
Practical example:
When a customer completes a purchase on a non-Shopify e-commerce site, this node can be used to create a corresponding order in Shopify, including all relevant details like products, shipping address, and discount codes.
Properties
Name | Type | Meaning |
---|---|---|
Additional Fields | Collection | Optional fields to further specify order details (addresses, discounts, email, fulfillment, etc.). |
└ Billing Address | FixedCollection | Customer's billing address details (first name, last name, company, country, address lines, etc.). |
└ Discount Codes | FixedCollection | List of discount codes applied to the order, each with amount, code, and type. |
String | The customer's email address. | |
└ Fulfillment Status | Options | The fulfillment status of the order (fulfilled, null, partial, restocked). |
└ Inventory Behaviour | Options | How inventory should be handled (bypass, decrement ignoring/obeying policy). |
└ Location Name or ID | Options | The physical location where the order was processed. |
└ Note | String | An optional note attached to the order. |
└ Send Fulfillment Receipt | Boolean | Whether to send a shipping confirmation to the customer. |
└ Send Receipt | Boolean | Whether to send an order confirmation to the customer. |
└ Shipping Address | FixedCollection | Customer's shipping address details (first name, last name, company, country, address lines, etc.). |
└ Source Name | String | Where the order originated (set only during creation). |
└ Tags | String | Comma-separated tags attached to the order. |
└ Test | Boolean | Whether this is a test order. |
Line Items | FixedCollection | List of line items (products) in the order. Each includes product ID, variant ID, title, grams, quantity, price. |
Output
The node outputs a JSON object representing the created Shopify order. The structure closely follows Shopify's Order API response.
Example output structure:
{
"id": 123456789,
"email": "[email protected]",
"created_at": "2024-06-10T12:34:56-04:00",
"line_items": [
{
"id": 987654321,
"product_id": 111222333,
"variant_id": 444555666,
"title": "Product Title",
"quantity": 2,
"price": "19.99"
// ...other line item fields
}
],
"billing_address": {
"first_name": "John",
"last_name": "Doe",
// ...other address fields
},
"shipping_address": {
"first_name": "Jane",
"last_name": "Smith",
// ...other address fields
},
"discount_codes": [
{
"code": "SUMMER21",
"amount": "5.00",
"type": "fixed_amount"
}
],
"tags": "tag1,tag2",
"note": "Special instructions",
// ...many other standard Shopify order fields
}
Note: The actual output will include all standard Shopify order fields returned by the API.
Dependencies
- External Service: Requires access to a Shopify store and valid API credentials.
- n8n Credentials: You must configure
shopistuffApi
credentials in n8n for authentication. - Environment: No special environment variables are required beyond n8n credential setup.
Troubleshooting
Common issues:
Missing Required Fields: If no line items are provided, the node throws:
"At least one line item has to be added"
- Resolution: Ensure at least one product is specified in the "Line Items" property.
Invalid Credentials: If your Shopify API credentials are incorrect or missing, the node will fail to authenticate.
- Resolution: Double-check your
shopistuffApi
credentials in n8n.
- Resolution: Double-check your
API Limitations: Shopify may reject requests if required fields are missing or invalid (e.g., invalid product IDs, addresses).
- Resolution: Verify all input data matches Shopify's requirements.
Error Handling: If an error occurs and "Continue On Fail" is enabled, the output will contain an
error
field with the error message.