Integrating Power Automate into our WooCommerce online store

Integrating Power Automate into our WooCommerce online store

Since I am automating my online shop I wanted to share some of the key elements that I came across.

Background:

I have a website where I sell 3d printed Harry Potter wands and I want to automate the whole process, starting when I get the order, to 3d printing and scheduling the order in the post office. (If you want to check it out > https://leviosashop.rs/)

The Plan:

The first thing for me would be to integrate Power Automate with WooCommerce so my flow can run each time I receive an order.

This automation is going to be expanded, in a way that it is going to serve as Inventory Management (it is going to check if the ordered item is in stock or not), and as Order Tracking System / Customer Notification, where I am going to check if the customer has received his order or not and notify them about the state in which their order is).

I will write more on that once I complete the parts of the implementation.

In today's blog post, I am going to focus on how I integrated Power Automate and WooCommerce and explain two different ways of doing this - one with paid Plugin from WooCommerce and the second one free using Rest API.

  1. WooCommerce Plugin for Power Automate

Power Automate for WooCommerce?enables our WooCommerce store to be connected to over 675 services through Microsoft Power Automate. It is a paid plugin so we need to buy it from WooCommerce Marketplace

How to install it?

  1. Purchase?the plugin from the WooCommerce Marketplace.
  2. Download?the .zip file or alternatively, install it from the WooCommerce Marketplace and skip to step 4.
  3. Go to: WordPress Admin > Plugins > Add New?and?Upload Plugin.?Choose File?with the file you downloaded in step 1.
  4. Install Now?and?Activate?Plugin.

Now we need to create a REST API key (this is also going to be needed for an alternative connection method that does not require the plugin).

Go to:?WordPress Admin > WooCommerce > Settings > Advanced > REST API?and create a?REST API Key. Once created, make a note of the?Consumer Key?and?Consumer Secret.

No alt text provided for this image

This plugin is very powerful and it has one of the capabilities that we need and that is to create a trigger for our flow to start once we receive a new order.

If it is our first time connecting Power Automate to one of our websites we need to create a connection first

No alt text provided for this image

Here we can write the Consumer Key and Consumer Secret that we have just created on the REST API key page.

After that we should be able to see the trigger below:

No alt text provided for this image

There is only 1 trigger and we can configure it for multiple use cases. We can trigger our flows on Customers, Coupons, Orders, Products, and Subscriptions.

Other than that Power Automate for WooCommerce has multiple actions that we can use:

No alt text provided for this image

The activities above are really powerful to use.

Example: If we have an online shop that is growing, we could create a trigger that is monitoring certain changes in one of our online files or folders, and once the BOT detects the changes it would take all the items from the spreadsheet and add them to our webshop.

For our current automation, we don't need these activities.

2. WooCommerce REST API configuration

Since I don't want to pay for WooCommerce Plugin (maybe in the future) I opted out of the second approach which is invoking WooCommerce Rest API and getting new orders from my Website.

This approach will be slightly different since we are not triggering the BOT on new Order, we are triggering the BOT on the Email that we receive when we get a new Order (It is the same, but different in the view of automation and implementation).

Let's head to WooCommerce Rest API documentation.

https://woocommerce.github.io/woocommerce-rest-api-docs

There is a lot of activity that we can do but we are interested only in one, and that is getting the new Order.

No alt text provided for this image

Since my Website is generating emails with order numbers I can easily extract that information and query this API to get the results.

Let's first test the call in Postman to see what kind of response we can expect (And write down that response)

These are the configurations of the call

No alt text provided for this image

As we can see from the response, we can easily extract Customer information such as First and Last Name, City, Address, and phone number.

We can also extract the information about the order, the name of the item, quantity, and total price (we will need this information later when we check if we have this item in stock)

No alt text provided for this image

Save this response somewhere because we will need it during implementation in Power Automate.

Let's do the same call in Power Automate.

The activity that we need for this is HTTP Request.

No alt text provided for this image

In the Username and Password fields we need to type in Consumer Key and Consumer Secret values.

We are querying our WooCommerce webshop for any Orders that are in status processing.

The next activity that we need is Parse JSON. We can use the response from Postman and create a Schema according to the response that we are going to receive.

After that, it is really easy to get all the information that we need since we will have them as variables when choosing Dynamic values.

Take a look at the sample that I extracted for one of my customers

No alt text provided for this image

This in combination with the email trigger will give me exactly what I need to continue with the automation.

Did you find this blog interesting or do you want to do something similar for your e-commerce shop? Feel free to reach out to me.


Manas Kumar Senapati

Customer Technology Solution Specialist ,at FedEx Express | BE | Post Graduate Diploma in Supply Chain Management - Symbiosis

1 年

Thanks for sharing

Reda Marzouk

AI/RPA Automation Consultant | 4 x UiPath MVP

1 年

Interesting use case Sr?an Su? I remember trying to implement an e-commerce process in Shopify a few years back since all of the extensions were paid and some were kind of overpriced, but it was all through web automation rather then using APIs. My question is, if you were to want to deploy the same process for another store, is it as simple as sharing the process and downloading the PA extension?

Sr?an Su?

Automating boring task's so you don't have to! | UiPath MVP | RPA Developer | RPA Business Analyst | RPA Solution Architect | 3D Print enthusiast

1 年

Special thanks to Milan Mili?ev for inspiring me to write this

要查看或添加评论,请登录

Sr?an Su?的更多文章

  • Using UiPath's Integration Service to connect to Google Sheets

    Using UiPath's Integration Service to connect to Google Sheets

    In the following few blog posts, I am going to talk about how we can easily integrate Google products such as Google…

    1 条评论
  • How to use GPT API with UiPath

    How to use GPT API with UiPath

    ChatGPT is an innovative tool that, much like bots, we should integrate into our daily routines to enhance efficiency…

    2 条评论
  • How to use GPT API as middleware

    How to use GPT API as middleware

    The problem The sample that I am going to showcase is not a complex one, but it is really useful and can be used for…

    3 条评论
  • Using Generative AI in UiPath for Classification and Extraction

    Using Generative AI in UiPath for Classification and Extraction

    Generative AI technology has undeniably reshaped the landscape of automation, yet seamlessly integrating it into our…

    1 条评论
  • HR Automation Journey

    HR Automation Journey

    The Importance of Automation Awareness within the Company It is crucial for both companies and employees to understand…

    2 条评论
  • Sending notifications from UiPath to Microsoft Teams via Webhooks

    Sending notifications from UiPath to Microsoft Teams via Webhooks

    This is going to be a quick blog post, where I will explain how to send notifications to Teams chat about whether our…

  • How to use work queue activity in Power Automate Desktop

    How to use work queue activity in Power Automate Desktop

    I have already talked about the importance of having a Queue in our automation so I am not going to go into too much…

    1 条评论
  • How to start UiPath Job through API

    How to start UiPath Job through API

    In today’s article, we will start the UiPath process through an API call. We will work with two examples, one with and…

  • How to call ChatGPT API from Power Automate?Desktop

    How to call ChatGPT API from Power Automate?Desktop

    In a previous blog post, I explained how to integrate Chat GPT and UiPath, and in the meanwhile, even some custom…

  • Robotik Proces Automatizacija u Bankama

    Robotik Proces Automatizacija u Bankama

    U svom cilju ka digitalnoj transformaciji, bankarske organizacije i druge finansijske institucije su se postavile kao…

社区洞察

其他会员也浏览了