View as Markdown
Google Search Console icon

Google Search Console ACTION

Submit Sitemap

Submits a sitemap (or resubmits one already listed) to Google Search Console for a property, then reads the stored record back. Resubmitting is idempotent — it creates no duplicate, it updates lastSubmitted and sets isPending: true.

Use for a new sitemap, or when the user wants Google to pick up new or changed pages on a site: resubmitting an existing sitemap is the SUPPORTED way to ask Google to re-read it.

There is no API to request indexing of a single ordinary page. The "Request indexing" button in the Search Console UI has no API equivalent, and the Indexing API behind Submit URL for Indexing covers only JobPosting and BroadcastEvent pages. So the two legitimate options are this tool (have Google re-read the sitemap containing the page) and Inspect URLs (check the page's current index status). Say that plainly rather than implying a page can be force-indexed — and when the user asks to request indexing or force a recrawl, OFFER those two options and wait for them to pick one; do not run either unasked.

Returns { submitted: true, sitemap, previous_last_submitted }. The submit call itself returns an empty body, so sitemap is the record read back from Google immediately afterwards and is how you confirm it landed. previous_last_submitted is the lastSubmitted the sitemap had before this call, or null for a first submission — use it to tell a fresh submission from a resubmission. Right after a submit isPending is normally true and lastDownloaded still holds the old date (or is absent): Google fetches asynchronously, usually within minutes to days. So do NOT report a sitemap as "processed" or "indexed" on the strength of a successful submit.

Mistakes. sitemapUrl must be an absolute URL to the sitemap file (https://www.example.com/sitemap.xml) that lives under the property — not a page URL, a path (/sitemap.xml) or a property identifier. If the user has not given you a sitemap URL, ask for it rather than guessing a conventional path. Submitting is not indexing: Google may still choose not to index the URLs it finds. Do not delete and resubmit to "refresh" a sitemap — just resubmit. Requires siteOwner or siteFullUser (check with List Sites); a siteRestrictedUser gets 403.

See the documentation

  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Google Search Console account once, then configure and run Submit Sitemap from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "google_search_console-submit-sitemap",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_search_console: { authProvisionId: "apn_xxxxxxx" },
    siteUrl: "Property (siteUrl)",
    sitemapUrl: "Sitemap URL",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Submit Sitemap inputs
Property Type Description
siteUrl Property (siteUrl) string
Exact property identifier from List Sitessc-domain:example.com for a domain property, or a URL-prefix such as https://www.example.com/ (trailing slash; scheme and subdomain must match exactly, or the call 403s). Copy it verbatim, never construct it. For traffic questions prefer the domain property when one exists: it covers all subdomains and protocols.
Required
sitemapUrl Sitemap URL string
Full URL of the sitemap or sitemap index, e.g. https://www.example.com/sitemap.xml. It must live under the property given in siteUrl (for a domain property, any subdomain or scheme qualifies). Use List Sitemaps for the exact paths Search Console already knows.
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
google_search_console-submit-sitemap
Version
0.0.1
App
Google Search Console
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes