Shopistuff icon

Shopistuff

Consume Shopify API

Overview

The Shopistuff node for n8n enables you to interact with the Shopify API, specifically to retrieve multiple orders using the "Order" resource and the "Get Many" (getAll) operation. This operation is useful for automating workflows that require fetching order data from a Shopify store, such as synchronizing orders with other systems, generating reports, or triggering actions based on new or updated orders.

Practical examples:

  • Retrieve all recent orders for processing in an ERP system.
  • Fetch only paid and shipped orders for fulfillment tracking.
  • Download a limited set of orders created within a specific date range for reporting.

Properties

Name Type Meaning
Return All boolean Whether to return all results or only up to a given limit. If enabled, all matching orders are retrieved; otherwise, only up to the specified limit.
Limit number Maximum number of results to return. Only used if "Return All" is false.
Options collection Additional filters and parameters for the query. See below for details.
└ Attribution App ID string Show orders attributed to a certain app, specified by the app ID. Set as "current" to show orders for the app currently consuming the API.
└ Created At Min dateTime Show orders created at or after this date.
└ Created At Max dateTime Show orders created at or before this date.
└ Financial Status options Filter orders by their financial status (e.g., Any, Authorized, Paid, Partially Paid, Refunded, etc.).
└ Fulfillment Status options Filter orders by their fulfillment status (e.g., Any, Partial, Shipped, Unfulfilled, Unshipped).
└ Fields string Comma-separated list of fields to return for each order. By default, all fields are returned.
└ IDs string Retrieve only orders specified by a comma-separated list of order IDs.
└ Processed At Max dateTime Show orders imported at or before this date.
└ Processed At Min dateTime Show orders imported at or after this date.
└ Status options Filter orders by their status (Any, Cancelled, Closed, Open).
└ Since ID string Show orders after the specified ID.
└ Updated At Max dateTime Show orders last updated at or before this date.
└ Updated At Min dateTime Show orders last updated at or after this date.

Output

  • The output is an array of JSON objects, each representing an order from Shopify.
  • The structure of each order object matches the Shopify Order API response.
  • If the "Fields" option is used, only the specified fields will be present in each order object.
  • Example output (simplified):
[
  {
    "id": 123456789,
    "email": "[email protected]",
    "created_at": "2024-06-01T12:00:00Z",
    "financial_status": "paid",
    "fulfillment_status": "shipped",
    "line_items": [
      {
        "id": 987654321,
        "title": "Product Name",
        "quantity": 2
      }
    ],
    ...
  },
  ...
]
  • No binary data is produced by this operation.

Dependencies

  • External Service: Requires access to a Shopify store via the Shopify API.
  • Credentials: You must configure the shopistuffApi credential in n8n with your Shopify API key and password/access token.
  • n8n Configuration: No special environment variables required beyond standard credential setup.

Troubleshooting

Common Issues:

  • Invalid Credentials: If the API credentials are incorrect or lack permissions, you may receive authentication errors.
  • API Rate Limits: Shopify enforces rate limits; excessive requests may result in throttling or errors.
  • Incorrect Filters: Using invalid values for filter options (e.g., wrong date format, non-existent status) can cause errors or empty results.
  • Missing Required Fields: If required properties are not set (e.g., missing "Limit" when "Return All" is false), the node may throw validation errors.

Error Messages:

  • "At least one line item has to be added" – Not relevant for "Get Many", but may appear in other operations.
  • Shopify API error messages (e.g., "Invalid API key", "Too many requests") are passed through and should be resolved according to Shopify's documentation.

Links and References

Discussion