How I automate my WordPress website in 10 minutes using only 2 tools:tutorial

[ad_1]

Hey r/ community!

I’m Daniel and I’m ready to share my experience with you. If you ever created a website with WordPress, you have probably noticed that there’s no ability to send WP data to external services, or receive data from external sources without additional plugins.

WP Webhooks appear to be one of the most popular solutions in such cases. Thanks to this plugin, you can use webhooks and HTTP requests to send any data from your WP website and perform any action on it remotely.

What does it mean? It means you can automate your WordPress workflow, and I’m gonna show you how you can do it!

And also **I prepared for you a step-by-step instruction**,so you can simply copy the whole scenario… Let’s dive into that!

**Step 1:WP Webhooks installation & plugin download**

First things first, go to [**WP webhooks page**](https://wordpress.org/plugins/wp-webhooks/) and download the plugin as a zip file. **You DON’T have to unzip it.**

https://preview.redd.it/yivbt0bhri4d1.png?width=2155&format=png&auto=webp&s=8264cd566361d0b4ed583abf8a7c3dfdc8dae20c

​

### Installation:

After that, on your [**wordpress.com**](http://wordpress.com/) website managing page, go:

**My Site** \> **Plugins** \> **Add New** **Plugin** \> **Upload**

Then choose the zip archive you’ve just downloaded and wait for the plugin to install.

https://i.redd.it/jm92oqtlri4d1.gif

You’ll see the WP Webhooks in your plugin tab. Click on Settings to start automating your website!

https://preview.redd.it/52ppet1sri4d1.png?width=2152&format=png&auto=webp&s=e55071f5d9db555d81646a9759f32dab2e7a0c98

​

​

**Step 2:Settings overview**

You’ll see various tabs inside of WP Webhooks settings, but using a free plan, you’ll need only two of them:

**Send Data:**

1. **List of available triggers.** In other words, here you can choose what event on your website will trigger the execution of an automation workflow you’re going to create.
2. **Description of the selected trigger.**

https://preview.redd.it/my5wtxkvri4d1.png?width=2141&format=png&auto=webp&s=3fd1fc871af13f6b77f7927edc51f06cdade9a88

​

**Receive Data:**

1. **Webhooks Actions URL with an API key**. You already have one from the start.
2. **List of available actions with descriptions**

https://preview.redd.it/xpv1p8eyri4d1.png?width=2138&format=png&auto=webp&s=3f097e0c042988d19c3ae2d3f55fcd57258ce43a

​

**Step 3: Automating your website**

Well, it’s time to automate!
That’s the idea of the automation scenario I’ve come up with:

https://preview.redd.it/u0gs7cz0si4d1.png?width=2139&format=png&auto=webp&s=552ae1c1e41673478b4b3f27454299c5dc73692a

​

Let me explain what is happening here:

1. **First is the webhook trigger** that activates the scenario every time a new comment on my page appears, and gets all the required comment data.
2. **This Google Sheets node** generates a new empty row in my spreadsheet.
3. **The next Google Sheets node** searches for the row that has an ’empty’ value in the status column.
4. **Iterator** processes the value from the previous node. Nodes connected to the upper point are executed first.
5. **These Google Sheets** nodes update cells with comment info and change status to ‘updated’
6. **Then goes** **HTTP request node** that deletes the comment. It is activated only in case there is a link in the comment.

**But you don’t need to build this scenario on your own!** Just copy it from the link at the end of the article! And now, it’s time to show you each and every step of creating this automation workflow, let’s go!

### Create a new scenario

Go to the Latenode website, log into your account and click the purple button in the upper left corner of the page. After that, you’ll find yourself on the scenario’s creating tab.

https://i.redd.it/meebn8x4si4d1.gif

​

### Webhook trigger

Now, click add node, and select the **webhook trigger**. Then, click on the node you’ve added and **copy the webhook link**.

​

https://i.redd.it/71w2eql6si4d1.gif

Then choose the **“comment created”** trigger in the Send Data tab of WP Webhooks plugin and click on the **“Add webhook URL”** button.

https://i.redd.it/cdtxyob8wi4d1.gif

​

​

After that, name the trigger and insert the webhook URL from the Latenode scenario.

And if you click on the **“deploy”** button (next to “save”), and then **“send demo”** (actions section of the WH trigger), you’ll see that the connection is already working, nice!

https://i.redd.it/822vwincwi4d1.gif

### Google Sheets: Add single row

Now, click “add node”, look for Google sheets group, and choose **“add single row”**.
**Sign up with Google** to get an authorization token, then select the path of the needed spreadsheet.
The answer for **“Does the first row of the sheet have headers?” is “yes”**. Then, write **“empty” in the “status”** field and save the changes.

https://i.redd.it/kmdf5h0fwi4d1.gif

​

### Google Sheets: Find row

You’ll find this node the same way as a previous one, but now you have to select the **“Find row”** node.**‍**

**Choose the same authorization token** and the path for your spreadsheet.

**In the column section, insert “D”**(if you’re using the sheet I’ve provided), **and “empty” in value.**

Simply saying, this node shows where to insert comment data, “empty” status is a marker.

https://i.redd.it/1prhqgciwi4d1.gif

https://preview.redd.it/sg1gz3g8xi4d1.png?width=2133&format=png&auto=webp&s=343003d692e5e3fba64fecc17835da51dca09154

### Iterator

Before adding the Iterator, **run once two Google Sheets nodes that you have to make the data flow.**
After that, click “add node” and choose **“other tools”**. Here you’ll find it.
To set it up, simply place the results object from the previous node in the **“data to iterate”** field. Then run it once and save the changes.

https://i.redd.it/ijgvmv8jwi4d1.gif

### Google Sheets: Update cell x4

Fill out the spreadsheet cells with the user’s name, email, and comment, changing the status from “empty” to “updated.” Four nodes are needed for this.

1. Click “add node” and select the “Update cell” node in Google Sheets.
2. Insert your authorization token and choose the spreadsheet path.
3. Save the node and copy it by right-clicking, then paste it as needed.
4. Connect them to the upper point of the Iterator.
5. Rename the nodes to avoid confusion.

https://i.redd.it/px7t7topwi4d1.gif

Finally, set Cell & Value for each node.

1. **Name**

Cell: A (googlesheetnumber object from the Iterator)

Value: comment\_author object from the webhook trigger

1. **Email**

Cell: B (googlesheetnumber object from the Iterator)

Value: comment\_author\_email object from the webhook trigger

1. **Comment**

Cell: C (googlesheetnumber object from the Iterator)

Value: comment\_content object from the webhook trigger

1. **Status**

Cell: D (googlesheetnumber object from the Iterator)

Value: updated

https://i.redd.it/jnklxywtwi4d1.gif

Don’t forget to save the changes!

​

### HTTP request

Wow, the last one! Add node to the right connection point of the iterator, look for “**HTTP request**” in the app list.

To set it up, you need to **put the Webhook action URL from the Receive Data tab of the WP Webhooks plugin.** Then go to Webhook actions.

In this case, we’re looking for the “**Delete comment**” action. To perform this action, you’ll need to modify the URL with &action=delete\_comment (check the details) and &comment\_id={comment\_id object}.

https://i.redd.it/yv18iy7wwi4d1.gif

Back to the “**HTTP request”** node, **set the method as GET** and save the changes.

https://i.redd.it/sfs80nsxwi4d1.gif

**And one more thing!** If we leave things like that, this scenario will delete every comment.

**We have to set up the filter**, and that’s how to do it:

**Click on the connection** between the Iterator and HTTP-request, then **“set up filter”.**‍

In the opened window, insert name of the filter in the **“Label”** field

In **“condition”** field, put **“contains”** function from the Operators window, after the first gap **put comment\_id** object from the webhook trigger. And after the semicolon, put “**https://”**. So every comment that has the beginning of the link gets deleted.

https://preview.redd.it/jce9acy2xi4d1.png?width=2141&format=png&auto=webp&s=8f05d08fb9754a18bceaa0fc141f9cabd9c4eabb

And the one with the comment:

https://preview.redd.it/9zzxz1k2xi4d1.png?width=2127&format=png&auto=webp&s=ddb5249fec512a93af116146d45e1cdfd8679bed

## Thats it! As i said, only 2 tools: WP and Latenode. Thank you for your attention! If you have any questions I’ll be glad to answer…

## Cheers!

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer