Google Docs ACTION
Insert Date
Insert a date smart chip into a Google Doc: a real date chip readers can click, not typed text. Use it for due dates, meeting dates, deadlines and timelines. Pass a calendar date (
2026-11-14), or a date and time plus Time Zone to show the time as well (2026-11-14T15:00 with America/New_York -> Nov 14, 2026 3:00 PM EST). Place the chip with Placeholder (replace text such as {{due}} that you wrote with Insert Text) or with Position; in a multi-tab document either set Tab ID (from List Tabs) or use Placeholder. Use Find Document to resolve a document's name to its ID. Example: call with documentId=1AbC..., date=2026-11-14, placeholder={{due}} -> a chip reading Nov 14, 2026; returns chipsInserted, each chip's tabId and index, and the document url. See the documentation- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Google Docs account once, then configure and run Insert Date 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_docs-insert-date",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
google_docs: { authProvisionId: "apn_xxxxxxx" },
documentId: "Document ID",
date: "Date",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "google_docs-insert-date",
"configured_props": {
"google_docs": { "authProvisionId": "apn_xxxxxxx" },
"documentId": "Document ID",
"date": "Date"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "google_docs",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "google_docs-insert-date",
arguments: {
documentId: "Document ID",
date: "Date",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
documentId Document ID | string | The ID of the Google Doc. This is the long string in the document's URL: https://docs.google.com/document/d/{DOCUMENT_ID}/edit. Use Find Document to resolve a document's name to its ID. Required |
date Date | string | The date as YYYY-MM-DD (e.g. 2026-11-14), or a date and local time as YYYY-MM-DDTHH:MM (e.g. 2026-11-14T15:00) to show a time too. A time needs Time Zone. A trailing Z or offset (2026-11-14T20:00:00Z) is read as that exact instant and shown in Time Zone. Required |
timeZone Time Zone | string | IANA time zone for a Date that includes a time, e.g. America/New_York or Europe/London. Required when there is a time; the chip shows the time with the zone's abbreviation. Ignored for a date without a time. Optional |
dateFormat Date Format | string | How the chip displays the date: month_day_year -> Nov 14, 2026 (default), month_day -> Nov 14, month_day_full -> November 14, iso -> 2026-11-14. Optional |
placeholder Placeholder | string | Existing text to replace with the chip, matched exactly (case-sensitive). Typically a placeholder you wrote with Insert Text, such as {{owner}}, or a name already in the document. Searches every tab unless Tab ID is set. When set, Position is ignored. This is the reliable way to put a chip mid-sentence: no character index needed. Optional |
occurrence Occurrence | string | Which matches of Placeholder become chips: all (default) or first. Optional |
position Position | string | Where to insert the chip when no Placeholder is given: end to append to the end of the tab (default), beginning, or a numeric character index (e.g. 12) from Get Document. The chip joins the paragraph at that point, so to start a new line insert a newline with Insert Text first. Optional |
tabId Tab ID | string | For a multi-tab document, the ID of the tab to insert into (e.g. t.0); get IDs from List Tabs, or use the ID returned by Create Tab. Required when the document has more than one tab and the chip is placed by Position: the tool will not guess, so a chip never lands in the first tab by accident. With Placeholder, omit it to search every tab. Optional |
suggestMode Suggest Changes | boolean | Make the change as a suggestion (Google Docs Suggesting mode) that the document's editors can accept or reject, instead of editing the document directly. The response's suggestionIds lists the suggestions the change created or extended - an edit next to an existing suggestion can join it rather than create a new one. Pass the IDs to Resolve Suggestions, or use List Suggestions to see every open suggestion. While a suggestion is open, the document text this returns shows the suggested and the original text side by side. Set true to propose the edit, or leave false (default) to edit directly. Optional |
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_docs-insert-date
- Version
- 0.1.0
- App
- Google Docs
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗