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

FieldTypeDescription
Post IDintegerID of post to update

Optional Fields

FieldTypeDescription
TitlestringNew post title
ContentstringNew post content
StatusselectNew status
ExcerptstringNew excerpt
Categoriesmulti-selectCategory IDs
TagsstringComma-separated tags
Featured ImagestringImage URL or ID
AuthorselectNew author
SlugstringNew 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

VariableTypeDescription
{{Action.post_id}}integerUpdated post ID
{{Action.post_url}}stringPost permalink
{{Action.modified}}stringModification 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

  1. Status workflows - Move posts through review stages
  2. Content sync - Keep posts updated with external data
  3. Bulk updates - Update multiple posts via triggers
  4. Archival - Move old content to archive status