So I tried to create a small automation where I get WordPress post comments directly in my WhatsApp messages whenever anyone comments on any of my WordPress blog posts.

I used a Webhook and an HTTP Request node. As I understood it, the Webhook is a listener/receiver that receives data. When a comment is made on my WordPress site, the comment is sent to the Webhook using this code:
add_action('wp_insert_comment', function($comment_id, $comment) { $data = [ 'author' => $comment->comment_author, 'email' => $comment->comment_author_email, 'content' => $comment->comment_content, 'post' => get_the_title($comment->comment_post_ID), 'date' => $comment->comment_date ]; wp_remote_post('https://n8n.example.com/webhook/wp-comment', [ 'method' => 'POST', 'body' => json_encode($data), 'headers' => [ 'Content-Type' => 'application/json' ], ]);}, 10, 2);
The Webhook receives it in JSON format like this:
json
{ "author": "John", "content": "Nice post!", "post": "Hello World"}
The HTTP Request node is essentially an API caller — it gets data from the Webhook and forwards it to another server. In my case, it instructs Meta to send a WhatsApp message using:
So in summary, the Webhook is the data receiver and the HTTP Request is the data forwarder.
Issue I faced: The access token expired after some time, which caused the automation to stop working.
However, I’m happy that it worked — messages were coming through successfully until the access token expired!
