style_doc_text_by_match

Find every occurrence of `needle` and apply the given text style.

writeGoogle Sheets, Docs & Drive

Combines find_doc_text + update_doc_text_style in one call.

Call it

In an AI client (MCP)

tools/call
{
  "name": "style_doc_text_by_match",
  "arguments": {
    "documentId": "<documentId>",
    "needle": "<needle>"
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/style_doc_text_by_match \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"documentId":"<documentId>","needle":"<needle>"}'
Early access — the Tool API is open on request, contact us.

Arguments

NameTypeDescription
documentIdrequiredstringthe Google Docs document ID.
needlerequiredstringLiteral text to find.
matchCasebooleanCase-sensitive match.Default: false
boldbooleanset true or false; omit to leave as is.
italicbooleanset true or false; omit to leave as is.
underlinebooleanset true or false; omit to leave as is.
strikethroughbooleanset true or false; omit to leave as is.
fontSizenumberpoints.
fontFamilystringe.g. 'Arial'.
foregroundColorobject[][r, g, b] in 0–1.
backgroundColorobject[][r, g, b] in 0–1.
linkUrlstringmake every match a link to this URL.

Result

Every tool answers {notification, data, human_action}; data carries:

  • { matches: N }

Example

make every occurrence of "SellerSheet" bold and blue:
style_doc_text_by_match(
    documentId=..., needle="SellerSheet",
    bold=True, foregroundColor=[0.12, 0.35, 0.85],
)

Gotchas

  • Matches through find_doc_text's search, so text inside tables, headers or footers, or a phrase split across differently-styled runs, is not styled (matches: 0).

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude