WordPress · Arazzo Workflow

WordPress Tag an Existing Post

Version 1.0.0

Find a tag by name and apply it to an existing post.

1 workflow 1 source API 1 provider
View Spec View on GitHub CMSContent ManagementOpen-SourceWordPressArazzoWorkflows

Provider

wordpress

Workflows

tag-an-existing-post
Resolve a tag by name and assign it to an existing post.
Searches tags for the supplied name, and when a tag is found reads the target post and updates it so the tag id is assigned in its tags taxonomy.
3 steps inputs: authorization, postId, tagName outputs: postId, status, tagId
1
findTag
listTags
Search the tags collection for a tag matching the supplied name, returning at most one result.
2
getTargetPost
getPost
Read the target post by id to confirm it exists before updating its tags.
3
applyTag
updatePost
Update the post so the matched tag id is assigned in its tags taxonomy.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: WordPress Tag an Existing Post
  summary: Find a tag by name and apply it to an existing post.
  description: >-
    A taxonomy-maintenance pattern that attaches an existing tag to an already
    published post. The workflow searches the tags collection for a tag matching a
    supplied name, branches on whether it exists, reads the target post to confirm
    it is present, and then updates the post so its tags array includes the matched
    tag id. Each step spells out its request inline, including the application
    password authentication WordPress requires for writes, so the flow can be read
    and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: wordpressRestApi
  url: ../openapi/wordpress-rest-api-openapi.yml
  type: openapi
workflows:
- workflowId: tag-an-existing-post
  summary: Resolve a tag by name and assign it to an existing post.
  description: >-
    Searches tags for the supplied name, and when a tag is found reads the target
    post and updates it so the tag id is assigned in its tags taxonomy.
  inputs:
    type: object
    required:
    - authorization
    - tagName
    - postId
    properties:
      authorization:
        type: string
        description: >-
          HTTP Basic Authorization header value built from a WordPress
          Application Password (e.g. "Basic dXNlcjpwYXNzd29yZA==").
      tagName:
        type: string
        description: The tag name to resolve (e.g. "wordpress").
      postId:
        type: integer
        description: The id of the post the tag should be applied to.
  steps:
  - stepId: findTag
    description: >-
      Search the tags collection for a tag matching the supplied name, returning
      at most one result.
    operationId: listTags
    parameters:
    - name: search
      in: query
      value: $inputs.tagName
    - name: per_page
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      tagId: $response.body#/0/id
    onSuccess:
    - name: tagFound
      type: goto
      stepId: getTargetPost
      criteria:
      - context: $response.body
        condition: $.length > 0
        type: jsonpath
    - name: tagMissing
      type: end
      criteria:
      - context: $response.body
        condition: $.length == 0
        type: jsonpath
  - stepId: getTargetPost
    description: >-
      Read the target post by id to confirm it exists before updating its tags.
    operationId: getPost
    parameters:
    - name: id
      in: path
      value: $inputs.postId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      postId: $response.body#/id
  - stepId: applyTag
    description: >-
      Update the post so the matched tag id is assigned in its tags taxonomy.
    operationId: updatePost
    parameters:
    - name: id
      in: path
      value: $steps.getTargetPost.outputs.postId
    - name: Authorization
      in: header
      value: $inputs.authorization
    requestBody:
      contentType: application/json
      payload:
        tags:
        - $steps.findTag.outputs.tagId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      postId: $response.body#/id
      status: $response.body#/status
  outputs:
    tagId: $steps.findTag.outputs.tagId
    postId: $steps.applyTag.outputs.postId
    status: $steps.applyTag.outputs.status

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/wordpress-tag-an-existing-post-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.