Learn how to automatically update stock quantities in Google Sheets for every order in WooCommerce using Pabbly Connect. Step-by-step tutorial included. Navigate the automation landscape confidently with clear, structured guidance suitable for professionals regardless of prior technical experience.

Watch Step By Step Video Tutorial Below


1. Setting Up Pabbly Connect for WooCommerce Integration

To begin updating stock quantities automatically, first log in to your Pabbly Connect account. This integration tool will facilitate the connection between WooCommerce and Google Sheets, allowing for seamless updates. Once logged in, navigate to the dashboard where you can create a new workflow.

Click on the ‘Create Workflow’ button and give your workflow a relevant name, such as ‘Update Stock Status on Every Order from WooCommerce in Google Sheets’. Click on the create button to proceed. This workflow will consist of a trigger and an action, with WooCommerce as the trigger application.


2. Configuring WooCommerce as the Trigger Application

In this step, we will configure WooCommerce as the trigger application in Pabbly Connect. Select WooCommerce from the app options and choose the trigger event as ‘Order Updated’. This action will initiate the workflow whenever a new order is placed.

  • Choose WooCommerce as the app.
  • Select ‘Order Updated’ as the trigger event.
  • Copy the webhook URL provided by Pabbly Connect.

Next, navigate to your WooCommerce settings in your WordPress dashboard. Under the ‘Advanced’ tab, find the ‘Webhooks’ option and click on it. Create a new webhook by clicking on the ‘Add Webhook’ button, naming it as ‘Inventory Update’, and setting its status to active. Paste the copied webhook URL in the ‘Delivery URL’ field and select the topic as ‘Order Updated’ before saving.


3. Testing the Webhook with a Demo Order

After setting up the webhook, we need to test it by creating a demo order. In Pabbly Connect, click on ‘Recapture Webhook Response’ and proceed to your WooCommerce store to make a test purchase. Add a product to your cart and complete the checkout process.

Once the order is placed, return to Pabbly Connect to check if the response has been captured. You should see the order details, including customer information and product details, confirming that the webhook is functioning correctly.


4. Connecting Google Sheets to Update Stock Quantity

Now that we have the order details, the next step is to connect Google Sheets to update the stock quantity. In Pabbly Connect, select Google Sheets as your action application and choose the action event ‘Lookup Spreadsheet Rows’. Connect your Google account and select the spreadsheet containing your product inventory.

  • Select the correct spreadsheet from your Google Drive.
  • Specify the sheet name where your inventory is stored.
  • Map the product ID from the order details to find the corresponding row in the spreadsheet.

After configuring the lookup, you will receive the current stock quantity for the sold product. This information will be used to calculate the updated stock quantity after the sale.


5. Updating Stock Quantity in Google Sheets

To update the stock quantity in Google Sheets, use the ‘Number Formatter’ feature in Pabbly Connect. Select the action event ‘Perform Math Operation’ and configure it to subtract the sold quantity from the current stock quantity. Map the values accordingly to perform the calculation.

Once the new stock quantity is calculated, add another action step to update the row in Google Sheets. Connect Google Sheets again and select the action event ‘Update Row’. Map the row index of the product and the new stock quantity to update the inventory accurately.

After saving and sending the test request, check your Google Sheets to verify that the stock quantity has been updated correctly based on the recent sale. This automation ensures your inventory is always current without manual intervention.


Conclusion

Using Pabbly Connect, you can effortlessly automate the process of updating stock quantities in Google Sheets for every order in WooCommerce. This integration saves time and reduces manual errors, allowing you to focus on growing your business. Set up this automation today for seamless inventory management.

Ensure you check out Pabbly Connect to create business automation workflows and reduce manual tasks. Pabbly Connect currently offer integration with 2,000+ applications.