Notion · Arazzo Workflow

Notion Search for a Page and Comment on It

Version 1.0.0

Search the workspace by title for a page, then leave a comment on the first matching page.

1 workflow 3 source APIs 1 provider
View Spec View on GitHub CollaborationDatabaseIdeasNotesProductivityProjectT1TaskWikiWorkspaceArazzoWorkflows

Provider

notion

Workflows

search-page-comment
Search for a page by title and add a comment to the first match.
Searches for pages matching a title query, and when a page is found, retrieves it and creates a comment on it with the supplied text.
3 steps inputs: commentText, notionVersion, query, token outputs: commentId, discussionId, pageId
1
searchPages
Search the workspace for pages whose title matches the query, filtering results to the page object type and returning a single match.
2
retrievePage
Retrieve the matched page to confirm it exists and is accessible before commenting on it.
3
createComment
Create a comment on the matched page using its ID as the comment parent.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Notion Search for a Page and Comment on It
  summary: Search the workspace by title for a page, then leave a comment on the first matching page.
  description: >-
    A discovery-then-engage pattern. The workflow searches the workspace for
    objects matching a title query while filtering to pages only, branches on
    whether a page was found, retrieves the matched page to confirm it, and then
    creates a comment on that page. Every step spells out its request inline —
    including the Authorization bearer token and the required Notion-Version
    header — so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: commentsApi
  url: ../openapi/notion-comments-api-openapi.yml
  type: openapi
- name: pagesApi
  url: ../openapi/notion-pages-api-openapi.yml
  type: openapi
- name: searchApi
  url: ../openapi/notion-search-api-openapi.yml
  type: openapi
workflows:
- workflowId: search-page-comment
  summary: Search for a page by title and add a comment to the first match.
  description: >-
    Searches for pages matching a title query, and when a page is found,
    retrieves it and creates a comment on it with the supplied text.
  inputs:
    type: object
    required:
    - token
    - notionVersion
    - query
    - commentText
    properties:
      token:
        type: string
        description: Notion integration token passed as a bearer credential.
      notionVersion:
        type: string
        description: The Notion API version date sent in the Notion-Version header.
      query:
        type: string
        description: The text to search for in page titles.
      commentText:
        type: string
        description: The plain-text body of the comment to create on the matched page.
  steps:
  - stepId: searchPages
    description: >-
      Search the workspace for pages whose title matches the query, filtering
      results to the page object type and returning a single match.
    operationId: search
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.token"
    - name: Notion-Version
      in: header
      value: $inputs.notionVersion
    requestBody:
      contentType: application/json
      payload:
        query: $inputs.query
        filter:
          property: object
          value: page
        page_size: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      matchedPageId: $response.body#/results/0/id
    onSuccess:
    - name: pageFound
      type: goto
      stepId: retrievePage
      criteria:
      - context: $response.body
        condition: $.results.length > 0
        type: jsonpath
    - name: nothingFound
      type: end
      criteria:
      - context: $response.body
        condition: $.results.length == 0
        type: jsonpath
  - stepId: retrievePage
    description: >-
      Retrieve the matched page to confirm it exists and is accessible before
      commenting on it.
    operationId: retrievePage
    parameters:
    - name: page_id
      in: path
      value: $steps.searchPages.outputs.matchedPageId
    - name: Authorization
      in: header
      value: "Bearer $inputs.token"
    - name: Notion-Version
      in: header
      value: $inputs.notionVersion
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      pageId: $response.body#/id
  - stepId: createComment
    description: >-
      Create a comment on the matched page using its ID as the comment parent.
    operationId: createComment
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.token"
    - name: Notion-Version
      in: header
      value: $inputs.notionVersion
    requestBody:
      contentType: application/json
      payload:
        parent:
          page_id: $steps.retrievePage.outputs.pageId
        rich_text:
        - type: text
          text:
            content: $inputs.commentText
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      commentId: $response.body#/id
      discussionId: $response.body#/discussion_id
  outputs:
    pageId: $steps.retrievePage.outputs.pageId
    commentId: $steps.createComment.outputs.commentId
    discussionId: $steps.createComment.outputs.discussionId

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/notion-search-page-comment-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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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