Automate Workflow to Create a WooCommerce Product via WP Webhooks

Automate Workflow to Create a WooCommerce Product via WP Webhooks

Do you want to automate workflow to create a wooCommerce product? We can do that using a popular WordPress automation plugin WP Webhook.

WP Webhook is a powerful WordPress plugin that allows you to automate any repetitive WordPress tasks to save time and resources. The plugin has powerful features that make automation within WordPress significantly more straightforward, and it also has a simple beginner-friendly user interface.

WP Webhook lets you initiate one-to-one connections between different plugins and create automation with all the triggers and actions. This plugin is also easy to set up, as all integrations are available within a single plugin file.

Key Features:

  • Advanced Developer Hooks
  • Unlimited trigger and actions
  • WordPress hook webhook action
  • Whitelabel feature
  • Log feature
  • Data mapping
  • IP Whitelist feature
  • Access token feature 
  • Fully translatable
  • Fully WPML compatible
  • Enhanced security
  • Webhook URL action whitelist
  • In-plugin assistant

Now, let’s move into the tutorials. 

Today we’re going to dive deep into how to automate workflow to create a wooCommerce product via WP Webhook.

Before that, use a Contact Form 7 plugin to create a simple contact form with fields product name, product price, product image and product description. Copy the shortcode of the contact form and paste it into the post’s content, and publish it. Now, use the contact form you just created to submit a WooCommerce product.  

Once you’ve done that, let’s move to the next step.

Setting Up WP Webhook

You can easily install and activate the WP Webhook automation plugin directly from the WordPress dashboard. Next, go to Plugins > Add New, search for WP Webhook, and click on the Install button. After that, activate the plugin. 

You’ll see a WP Webhook and Contact Form in your dashboard panel. 

That’s it! You’ve successfully set up WP Webhook. You can automate workflow to create a wooCommerce product via WP Webhook.

Setting Up the WP Webhook Flow

WP Webhook lets you create your own automations, add conditions and multiple actions. In order to create wooCommerce products automation, we’ll creat a simple workflow. 

Let’s see how  to set up the WP Webhook flow.

  • First of all, navigate to Dashboard >> Settings >> WP Webhooks Pro>> Automations (Flows).
  • Click on Create Flow button and enter a relevant flow name. 
  • Finally, click on the create button. 
craeate automate workflow

Now that you’ve created the flow, it’s time to configure it.

  • Hit the setting icon to edit the flow. 
  • Click on the Select Trigger button and choose Form Submitted as the trigger from the drop-down options. 
automate workflow to create wooCommerce product via webhook
  • To configure trigger settings, you can choose the form you’ve created using Contact Form 7 as a trigger. 
  • Since we are trying to automate workflow to create a wooCommerce product, allow the option of not sending mail as usual.
configure trigger setting for automation
  • Contact Form 7 does not add uploaded files to the Media Library by default. Thus, you need to enter 180 values to preserve uploaded form files. 
  • You can configure the rest of the trigger settings depending on your need. 
  • To configure trigger testing, set log data as data type. Next, you can see all the log data from the dropdown. Simply select a log you’ve created and hit the finish trigger. 

Now that you’ve configured the trigger, the next step is to create the WooCommerce product. For that, you can simply create an action by clicking on add action and integrating it with WordPress. Next, choose create_post action and hit the continue button. 

crate automation action for wooCommerce product

After that, jump on to action settings. Here, you can see many fields such as post author, post title, post status, etc. You can use details from common tags or Contact Form 7 to enter dynamic data. Set the current user display name as post author and form_submit_data> product-description as post content. Next, add form_submit_data> product-name as post title. Also, set post status as publish to ensure the product is created automatically as published and not saved as a draft.

When you scroll down a little, you’ll see a field to add/ update meta. From here, you can add the price wooCommerce uses for the product. Set price at the key field and form_submit_data> product-price at value.

set price automatically for wooCommerce product

Additionally, it also supports static data. Since the rest of the fields are not needed for product creation, you can leave them empty.  

Lastly, you may test the action by selecting fire the webhook action as datatype. Hit the fire action button and finish action. 

test action

For images, you can create another action and integrate it with WordPress. Then, select create_url_attachment action and click the continue button.

Now, go to the action setting and add the URL of the image uploaded in the contact form. Or you can do it dynamically by adding form_submit_data> product-image>file_url in the field. Next, add the post ID to add post thumbnail field. 

action settings for product image automation

To test action, repeat the steps mentioned above. Finally, change the status of the flow from inactive to active and click on the Save button.

That’s it! You’ve successfully automated workflow to create a wooCommerce product via WP Webhook.

Wrapping Up

Thus, this is how you can create wooCommerce products and automate using the WP Webhook plugin. This plugin can be extremely helpful for operations like auto-updating carts, adding extra product options, sale announcements, payment notifications, and many more. 

WP Webhook has 25+ popullar plugin integrations which makes WP Webhook the best WordPress plugin for creating codeless automations. The pricing for WP Webhook Pro starts at $149 per year for one site, and the pricing plans for ten sites and seventy-five sites are $249 per year and $499 per year, respectively. Besides that, they also have custom plans optimized as per your requirements.

If you find this article helpful, please comment and follow us on Facebook and Twitter.

If you’ve any queries, mention them in the comment section below.

You might also like to read the following article:

2 thoughts on “Automate Workflow to Create a WooCommerce Product via WP Webhooks

Leave a Reply

Your email address will not be published. Required fields are marked *