← All N8N workflows
Business & commerceCodeFilterHTTP RequestIfNo Op

[n8n] - Shopify Orders to D365 Business Central Sales Orders / Sales Invoices

Configured with Filter, HTTP Request, Schedule Trigger, Shopify, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
Web / APIGetFufillmentOrdersHTTP RequestIntegrationShopifyShopifyTriggerSchedule TriggerSchedule TriggerRoutingLoop Over ItemsLoop Over ItemsRoutingNew Customer?IfWeb / APILookup CustomersHTTP RequestTransformSelectFieldsEdit FieldsCodeorderPreprocessingCodeWeb / APICreate CustomerHTTP RequestTransformSet Business CentralCustomer IdEdit FieldsWeb / APICreate Order LinesHTTP RequestRoutingEndNo OpTransformSplit OutSplit OutWeb / APIDELETE Sales OrderHTTP RequestTransformD365 BC EnvironmentSettingsEdit FieldsWeb / APICreate Sales OrderHTTP RequestTransformSet Lines InvoiceEdit FieldsTransformSet Lines SOEdit FieldsTransformSplit Out InvoiceSplit OutWeb / APICreate Invoice LinesHTTP RequestRoutingFilterFilterWeb / APICreate Sales InvoiceHTTP RequestRoutingEnd1No OpTransformSales InvoiceEdit FieldsWeb / APILookup Sales OrderHTTP RequestTransformSales Order MappingEdit FieldsRoutingNew SO?IfWeb / APILookup Sales InvoiceHTTP RequestRoutingNew Invoice?IfRoutingPOS?IfWeb / APIDELETE Sales InvoiceHTTP Request

Node categories in this workflow

  • Web / API
  • Integration
  • Trigger
  • Routing
  • Transform
  • Code

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
GetFufillmentOrdersWeb / APIHTTP RequestSee node parameters
ShopifyIntegrationShopifygetAll
Schedule TriggerTriggerSchedule TriggerSee node parameters
Loop Over ItemsRoutingLoop Over ItemsSee node parameters
New Customer?RoutingIfSee node parameters
Lookup CustomersWeb / APIHTTP RequestSee node parameters
SelectFieldsTransformEdit FieldsSee node parameters
orderPreprocessingCodeCodeSee node parameters
Create CustomerWeb / APIHTTP RequestPOST
Set Business Central Customer IdTransformEdit FieldsSee node parameters
Create Order LinesWeb / APIHTTP RequestPOST
EndRoutingNo OpSee node parameters
Split OutTransformSplit OutSee node parameters
DELETE Sales OrderWeb / APIHTTP RequestDELETE
D365 BC Environment SettingsTransformEdit FieldsSee node parameters
Create Sales OrderWeb / APIHTTP RequestPOST
Set Lines InvoiceTransformEdit FieldsSee node parameters
Set Lines SOTransformEdit FieldsSee node parameters
Split Out InvoiceTransformSplit OutSee node parameters
Create Invoice LinesWeb / APIHTTP RequestPOST
FilterRoutingFilterSee node parameters
Create Sales InvoiceWeb / APIHTTP RequestPOST
End1RoutingNo OpSee node parameters
Sales InvoiceTransformEdit FieldsSee node parameters
Lookup Sales OrderWeb / APIHTTP RequestSee node parameters
Sales Order MappingTransformEdit FieldsSee node parameters
New SO?RoutingIfSee node parameters
Lookup Sales InvoiceWeb / APIHTTP RequestSee node parameters
New Invoice?RoutingIfSee node parameters
POS?RoutingIfSee node parameters
DELETE Sales InvoiceWeb / APIHTTP RequestDELETE

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • httpHeaderAuth
  • oAuth2Api
  • shopifyAccessTokenApi

Workflow notes

Shopify Line Locations

Shopify Line Locations

For multi-location Shopify accounts, these group of nodes get the active location id for each order line.

Get Shopify Orders

Get Shopify Orders

1.- Get Shopify Orders created/updated since one day prior. The Flow will get every order created or updated on the last 24 hours.

2.- Filter to get paid orders.

Existing Customer Lookup (Business Central)

Existing Customer Lookup (Business Central)

Lookup for existing customer in Business Central based on the logic defined in the URI, if a customer exist then that id is used, otherwhise a new customer will be created

Workflow Information 📌

Workflow Information 📌

Purpose 🎯

The intention of this workflow is to integrate New Shopify Orders into MS Dynamics Business Central:

  • Point-of-Sale (POS): POS orders will be created in Business Central as Sales Invoices given no fulfillment is expected.
  • Web Orders: This type of orders will be created as Business Central Sales Orders.

How to use it 🚀

  1. Edit the "D365 BC Environment Settings" node with your own account values (Company Id, Tenanant Id, Tax & Discount Items).
  2. Go to the "Shopify" node and edit the connection with your environment. More help here.
  3. Go to the "Lookup Customers" node to edit the Business Central connection details with your environment settings.
  4. Set the required filters on the "Shopify Order Filter" node.
  5. Edit the "Schedule Trigger" node with the required frequency.

Useful Workflow Links 📚

  1. Step-by-step Guide/ Integro Cloud Solutions
  2. Business Central REST API Documentation
  3. Video Demo

Need Help?

Contact me at: ✉️user@example.com 📥 https://www.linkedin.com/in/greg-lopez-08b5071b/

Existing Order Lookup (Business Central)

Existing Order Lookup (Business Central)

1.- This logic will avoid duplication of Business Central Sales Orders/Sales Invoices validating if an order with the same external Id exist already.

2.- If a match is found then the order is ignored

3.- The source of the order is evaluated, if the order was placed on the Point-of-Sale a Sales Invoice is created else a Sales Order will be created.

Sales Order Creation

Sales Order Creation

1.- Map on the "Sales Order Mapping" node any requiered fields to be integrated into Business Central.

2- The HTTP Node will perform a POST call to Business Central REST API to create the Sales Order.

  1. After the Sales Order gets created, all line items will be added into the Order.

  2. If there are any while creating line items, the Sales Order will be deleted.

Configure Business Central Environment Variables

Configure Business Central Environment Variables

1.- Enter your BC tenantId,companyId, name. 2.- Set the SKU number for the Items to be used for Taxes and Discounts.

Create Sales Order

Create Sales Order Header

Sales Order Creation

Sales Order Creation

  1. Map on the "Sales Invoice Mapping" node any requiered fields to be integrated into Business Central.

  2. The HTTP Node will perform a POST call to Business Central REST API to create the Sales Invoice.

  3. After the Sales Invoice gets created, all line items will be added into the Invoice.

  4. If there are any while creating line items, the Sales Invoice will be deleted.

[n8n] - Shopify Orders to D365 Business Central Sales Orders / Sales Invoices

[n8n] - Shopify Orders to D365 Business Central Sales Orders / Sales Invoices

Purpose and structure

This folder contains the [n8n] - Shopify Orders to D365 Business Central Sales Orders / Sales Invoices workflow. Its executable nodes use code, filter, httpRequest, if, noOp, scheduleTrigger, set, shopify, splitInBatches, splitOut. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Schedule Trigger

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/1560_Splitout_Code_Automation_Webhook.json MIT; preserve source notices.

More in Business & commerce