Shopify (n8n)

In this article we will explore how to create an Onfleet Task on n8n when a Shopify Order is made. You can automate your order-to-delivery process with this simple workflow.  

In this article, we will be using Shopify’s "Order Created" trigger and Onfleet’s Create Task endpoint as our example of setting up the notification. 

This requires you to have already created an Onfleet node workflow. You can find the details here: Create an Onfleet Task using the workflow

The Steps for this integration is as follows:

Creating a Private App for Shopify

To create a Shopify credential on n8n Workflow, you will first need to create a Shopify Private App on your Shopify store.

  1. Go to your Store Admin Page
  2. Press Apps
  3. Scroll down to the bottom to “Develop App for your Store”
  4. Create an appcreate_shopify_app.gif

This will then allow you to get the needed information to connect your n8n Shopify node to your Shopify store.

  1. Go to API Credentials
  2. Clicking on install app, write down Admin API access Token, API Key, API Secret Key - you will need all three items to create your Shopify connection on n8n.admin_access_token.png

Create a Shopify Node on n8n

Next we will Create a Shopify Node on n8n to connect with the Onfleet node.

  1. Click on the + sign in the top right corner
  2. Search for Shopify Trigger
  3. Select Shopify Triggershopify_trigger.png

After you have created the Shopify Trigger Node, we will have to enter the credentials from your Shopify Store to connect your Shopify Store to your Shopify node.

  1. Create new Shopify Credential
  2. Input previous recorded API keys from Shopify apps
  3. Shopify API goes into API Key
  4. Admin Access Token goes to Password
  5. API Secret Key goes to Shared Secretcreate_new_shopify_connection.gif

 

After you have entered the required information, it should look something like this:n8n_shopify.png

 

Then choose an event you would like to start your integration with. For our purpose, we will use Order Created. Please select Order Created on the Topic dropdown.shopify_Order_created.png

Connect Shopify Node to Onfleet

Once we have finished creating the Shopify Private App, Shopify node, and connected them together, we are ready to connect them to the Onfleet n8n node and create a task in Onfleet.

  1. Drag the Shopify Node to Onfleet Nodeconnect_Shopify_to_onfleet.gif
  2. Press Execute Workflow at the bottom of your n8n templateWorkflow.png
  3. Create a Test Order on ShopifyCursor_and_onfleetthomas_devstore___Orders___Shopify.png
  4. Click on Onfleet Node
  5. Click on Add a destinationaddress1.png
  6. Click on Destination Addressaddress2.png
  7. Check your Onfleet Dashboard for the task:

Onfleet_created.png

 

Congratulations, you have successfully connected Shopify to Onfleet via n8n.