Update Post
Modify existing posts, pages, or custom post types.
Overview
The Update Post action modifies an existing post, page, or custom post type. Use this to update content, change status, modify metadata, or synchronize content based on triggers.
Configuration
Required Fields
| Field | Type | Description |
|---|---|---|
| Post ID | integer | ID of post to update |
Optional Fields
| Field | Type | Description |
|---|---|---|
| Title | string | New post title |
| Content | string | New post content |
| Status | select | New status |
| Excerpt | string | New excerpt |
| Categories | multi-select | Category IDs |
| Tags | string | Comma-separated tags |
| Featured Image | string | Image URL or ID |
| Author | select | New author |
| Slug | string | New URL slug |
Finding the Post
By Post ID
Post ID: {{Trigger.post_id}}
By Meta Query
Post ID: Find by meta
Meta Key: order_id
Meta Value: {{Trigger.order_id}}
From Previous Action
Post ID: {{Action1.post_id}}
Example Configurations
Update Status
Post ID: {{Trigger.post_id}}
Status: publish
Append Content
Post ID: {{Trigger.post_id}}
Content: |
{{Trigger.post_content}}
<hr>
<p>Updated: {{Trigger.update_date}}</p>
Sync External Data
Post ID: {{Trigger.wp_post_id}}
Title: {{Trigger.external_title}}
Content: {{Trigger.external_content}}
Archive on Completion
Post ID: {{Trigger.related_post_id}}
Status: draft
Categories: Archived
Output Data
| Variable | Type | Description |
|---|---|---|
{{Action.post_id}} | integer | Updated post ID |
{{Action.post_url}} | string | Post permalink |
{{Action.modified}} | string | Modification date |
Partial Updates
Only specified fields are updated. Omit fields to keep existing values:
# Only updates status, keeps everything else
Post ID: 123
Status: publish
Best Practices
- Always verify post exists before updating
- Use conditions to prevent unintended updates
- Log updates for audit trails
- Consider revision history impact
Common Use Cases
- Status workflows - Move posts through review stages
- Content sync - Keep posts updated with external data
- Bulk updates - Update multiple posts via triggers
- Archival - Move old content to archive status