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
- In the WordPress admin, go to Zapify → Automations.
- Click Add New to open the builder.
- Name it clearly, such as Flag posts with feedback.

Step 2: Add the "A comment is approved" trigger
- Click Add Trigger.

- Choose WordPress as the app.

- Select A comment is approved.

Step 3: Add the "Update a post's custom field" action
- Click Add Action.

- Choose WordPress as the app.

- 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. |

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
- Set both the trigger and the action to Live.
- Click Save.

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
- Approve a test comment on a post.
- Check the post's custom field, using a custom-fields plugin or your theme's output.
- 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.