[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.
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.
| Node | Category | Type | Operation |
|---|---|---|---|
| GetFufillmentOrders | Web / API | HTTP Request | See node parameters |
| Shopify | Integration | Shopify | getAll |
| Schedule Trigger | Trigger | Schedule Trigger | See node parameters |
| Loop Over Items | Routing | Loop Over Items | See node parameters |
| New Customer? | Routing | If | See node parameters |
| Lookup Customers | Web / API | HTTP Request | See node parameters |
| SelectFields | Transform | Edit Fields | See node parameters |
| orderPreprocessing | Code | Code | See node parameters |
| Create Customer | Web / API | HTTP Request | POST |
| Set Business Central Customer Id | Transform | Edit Fields | See node parameters |
| Create Order Lines | Web / API | HTTP Request | POST |
| End | Routing | No Op | See node parameters |
| Split Out | Transform | Split Out | See node parameters |
| DELETE Sales Order | Web / API | HTTP Request | DELETE |
| D365 BC Environment Settings | Transform | Edit Fields | See node parameters |
| Create Sales Order | Web / API | HTTP Request | POST |
| Set Lines Invoice | Transform | Edit Fields | See node parameters |
| Set Lines SO | Transform | Edit Fields | See node parameters |
| Split Out Invoice | Transform | Split Out | See node parameters |
| Create Invoice Lines | Web / API | HTTP Request | POST |
| Filter | Routing | Filter | See node parameters |
| Create Sales Invoice | Web / API | HTTP Request | POST |
| End1 | Routing | No Op | See node parameters |
| Sales Invoice | Transform | Edit Fields | See node parameters |
| Lookup Sales Order | Web / API | HTTP Request | See node parameters |
| Sales Order Mapping | Transform | Edit Fields | See node parameters |
| New SO? | Routing | If | See node parameters |
| Lookup Sales Invoice | Web / API | HTTP Request | See node parameters |
| New Invoice? | Routing | If | See node parameters |
| POS? | Routing | If | See node parameters |
| DELETE Sales Invoice | Web / API | HTTP Request | DELETE |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- 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
httpHeaderAuthoAuth2ApishopifyAccessTokenApi
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 🚀
- Edit the "D365 BC Environment Settings" node with your own account values (Company Id, Tenanant Id, Tax & Discount Items).
- Go to the "Shopify" node and edit the connection with your environment. More help here.
- Go to the "Lookup Customers" node to edit the Business Central connection details with your environment settings.
- Set the required filters on the "Shopify Order Filter" node.
- Edit the "Schedule Trigger" node with the required frequency.
Useful Workflow Links 📚
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.
-
After the Sales Order gets created, all line items will be added into the Order.
-
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
-
Map on the "Sales Invoice Mapping" node any requiered fields to be integrated into Business Central.
-
The HTTP Node will perform a POST call to Business Central REST API to create the Sales Invoice.
-
After the Sales Invoice gets created, all line items will be added into the Invoice.
-
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.