Skip to content

Creating a Custom Connector for Shopify in Power Automate (PART 1)

Introduction:

In this blog we’ll cover the steps that go into creating a custom connector for Shopify.

Steps to get an ‘API key’ and a ‘Password’, to authenticate Shopify:

  1. Go to Apps and click on “Manage private apps”
  1. Click on “Create private app”
  1. Provide app name and email
  1. Give permissions based upon your requirements
    • No Access
    • Read Access
    • Read and write
  1. Click on “save”
  1. Click on “Create App”
  1. Once you create an app you will get the API Key and Password. (Copy the API key and Password, it will be used in the authentication)

Creating Custom Connector (you can create a custom connector from PowerApps or from the Power Automate platform)

  1. Data –> Custom Connectors
  1. Click on “+ New custom connector” –> Create from blank
  1. Give a name to your connector and click on “continue”

General section

  1. You can upload a connector icon, background image, and description of your custom connector
  2. Provide Host
  1. Click on Security to go to Next section

Security Section

  1. Select Authentication Type as “Basic Authentication”
  1. Give label to parameters
  1. Now Click on “Definition” to go to Next Section

Definition section

  1. In Definition, you can create Triggers and Actions based on your requirements.

We will create an Action for retrieving one customer detail.

Action for Retrieving one Customer

  1. Click on “New Action”
  1. Enter Summary, Description and Operation ID
  1. Go to Request and Click on “Import from sample”
  1. Select the verb and Get request URL to retrieve the single customer detail
Verb: GET
URL: 
https://{apikey}:{password}@{hostname}/admin/api/2020-10/customers/{customer_id}.json
Example: https://ee28cad19:shp_8dba8dffe0c4f@vvyas.myshopify.com/admin/api/2020-10/customers/{customer_id}.json
Here, {Customer_id} is the input parameter.

A Request would look like the one given below:

  1. Add Response

Go to Response section and click on “+Add default Response”

NOTE: you can add sample response from the Shopify API Documentation

Paste the sample in “Body” and click on Import

  1. Once your Action is ready click on “Create Connector”
  1. Now click on “Test” to test your connector.

Test

  1. Create a connection to Shopify
  2. Click on “+New Connection”
  1. Add the Username (API Key) and the password. (Paste the key and password which we had copied from the Shopify private app)
  1. Enter the customer id

Shopify API Documentation: https://shopify.dev/docs

In Part 2, we will create more Actions and Triggers for the Shopify connector. Stay tuned for the next blog post!

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments