Skip to content

WordPress Automations

Update a Post's Custom Field When a Comment Is Approved

Custom fields are how themes and plugins remember things about a post. If you want a post marked once it gets its first approved comment, Zapify can write that flag with the A comment is approved trigger and the Update a post's custom field action. Both are free.

What this automation does

The automation is one trigger plus one action:

  • Trigger: A comment is approved (WP_COMMENT_APPROVED, WordPress)
  • Action: Update a post's custom field (WP_UPDATE_POST_META, WordPress)

When a comment goes live, Zapify sets the custom field you name on the post the comment belongs to.

Before you start

  • You need the exact meta key your theme or plugin reads, for example has_feedback.
  • Both the trigger and the action are free.

How to build the automation

Step 1: Create a new automation

  1. In the WordPress admin, go to Zapify → Automations.
  2. Click Add New to open the builder.
  3. Name it clearly, such as Flag posts with feedback.

Create a new automation

Step 2: Add the "A comment is approved" trigger

  1. Click Add Trigger.

Add a trigger

  1. Choose WordPress as the app.

Select WordPress as the trigger

  1. Select A comment is approved.

Select A comment is approved

Step 3: Add the "Update a post's custom field" action

  1. Click Add Action.

Add an action

  1. Choose WordPress as the app.

Select WordPress as the action

  1. Select Update a post's custom field.

Select Update a post's custom field

Step 4: Configure the action

Field Required What it does
Post ID Yes Insert the trigger's Post ID token so the field is written to the commented post.
Meta key Yes The exact custom field name, for example has_feedback.
Value No What to store, for example 1.

Configure the Update a post's custom field action

Protected keys are blocked

WordPress treats keys starting with an underscore as protected. The action refuses to write them and reports an error — pick a key without a leading underscore.

Step 5: Set the steps Live and save

  1. Set both the trigger and the action to Live.
  2. Click Save.

Set the automation live

Tokens this action makes available

Token What it holds
Meta key The field that was written.
Meta value The value that was stored.

How to test it

  1. Approve a test comment on a post.
  2. Check the post's custom field, using a custom-fields plugin or your theme's output.
  3. If it isn't there, open Zapify → Logs for the reason.

Conclusion

With the A comment is approved trigger and the Update a post's custom field action, Zapify lets community activity shape how a post is treated. Next, tell the commenter it's live with an email when a comment is approved.

FAQs

Does this work with any trigger that has a post?

Yes. Any trigger that exposes a Post ID token can feed this action.

Is this feature free?

Yes. Both the trigger and the action are free.

Do I need to write any code?

No. Everything is configured in the Zapify visual builder.

Was this page helpful?