PRICING
PRODUCT
SOLUTIONS
by use cases
AI Lead ManagementInvoicingSocial MediaProject ManagementData Managementby Industry
learn more
BlogTemplatesVideosYoutubeRESOURCES
COMMUNITIES AND SOCIAL MEDIA
PARTNERS
Key takeaways:
Elevate your WordPress website's functionality by integrating WP Webhooks plugin with Latenode, creating a powerful automation system that streamlines workflows, enhances user engagement, and simplifies content management with ease. This seamless connection between your site and external applications through Latenode's automation capabilities ensures your website operates more efficiently and dynamically than ever before.
Hi! It's Daniel from Latenode. 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 in this article, Iâll show you how to do it with Latenode.com!
Best Part? Besides a step-by-step instruction, you can simply copy the whole scenario Iâll show you in this article! Youâll see the link in the end of this article.
Letâs go!
First things first, go to WP webhooks page and download the plugin as a zip file. You DONâT have to unzip it.
After that, on your 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.
Youâll see the WP Webhooks in your plugin tab. Click on Settings to start automating your website!
Youâll see various tabs inside of WP Webhooks settings, but using a free plan, youâll need only two of them: Send Data & Receive Data.
This tab contains:
Here you can find:
Well, itâs time to automate!
Thatâs the idea of the automation scenario Iâve come up with:
Once a user leaves a comment on my site, the user's nickname, email, and the comment itself are automatically sent to my Google Sheets form. If the comment contains any links, they would be deleted.
Works fine both for collecting feedback and moderating, isn't it? Actually, Iâve already made this scenario on latenode.com, have a look:
Let me explain what is happening here:
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!
Go to Latenode.com, 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.
Rename your scenario, otherwise, it will be called âuntitledâ. After that, save the changes.
Try to do it every time you change or modify your scenario. Safety first!
Now, click add node, and select the webhook trigger. Then, click on the node youâve added and copy the webhook link. Donât forget about the âsaveâ button!
Next thing you have to do is to choose the âcomment createdâ trigger in the Send Data tab of WP Webhooks plugin and click on the âAdd webhook URLâ button.
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!
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.
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.
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 âdata to iterateâ field. Then run it once and save the changes.
At this step, we fill out the cells of the spreadsheet with the name, email and comment of the user, and change âemptyâ status to âupdatedâ. Thatâs why 4 nodes are needed.
Click âadd nodeâ, then go to google sheets again and pick the âUpdate cellâ node.
Again, insert your authorization token and choose the path of the spreadsheet.
These actions are the same for all 4 nodes, so you can save this one and simply copy it!
To do so, just right-click on the node, then âcopyâ and paste it anywhere!
Then, connect them to the upper point of the Iterator.
To avoid confusion, rename the nodes to make them look different.
Now, letâs finish them up! Cell & Value for:
Cell: A (googlesheetnumber object from the Iterator)
Value: comment_author object from the webhook trigger
Cell: B (googlesheetnumber object from the Iterator)
Value: comment_author_email object from the webhook trigger
Cell: C (googlesheetnumber object from the Iterator)
Value: comment_content object from the webhook trigger
Cell: D (googlesheetnumber object from the Iterator)
Value: updated
Don't forget to save the changes!
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}.
Back to the âHTTP requestâ node, set the method as GET and save the changes.
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.
Thatâs it! Letâs test it out!
Letâs leave 2 comments: one with the link and one without, and see how it works.
Both comments are in my Google Spreadsheet now.
And thatâs how the scenario reacted:
In case with the comment without the link, the HTTP node wasnât activated, look:
And the one with the comment:
Well, I guess thatâs all for today! I hope this article was helpful for you!
As I promised Here you can copy this scenario as a ready-to-go template, but if you really like automating stuff, you are welcome to our Latenode Discord community, where you can find some help from our growing low-code enthusiast community, our developers, and me!
â
Related articles: