Google Cloud ACTION
Create Scheduled Query
Creates a scheduled query in Google Cloud. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Google Cloud account once, then configure and run Create Scheduled Query 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_cloud-create-scheduled-query",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
google_cloud: { authProvisionId: "apn_xxxxxxx" },
destinationDatasetId: "Destination Dataset",
datasetRegion: "Dataset Region",
},
})
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_cloud-create-scheduled-query",
"configured_props": {
"google_cloud": { "authProvisionId": "apn_xxxxxxx" },
"destinationDatasetId": "Destination Dataset",
"datasetRegion": "Dataset Region"
}
}'// 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_cloud",
},
},
},
)
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_cloud-create-scheduled-query",
arguments: {
destinationDatasetId: "Destination Dataset",
datasetRegion: "Dataset Region",
},
})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 |
|---|---|---|
destinationDatasetId Destination Dataset | string | The name of the dataset to create the table in. If the dataset does not exist, it will be created. Required Dynamic |
datasetRegion Dataset Region | string | The geographic location where the dataset should reside. See the documentation here Optional |
displayName Display Name | string | The user-friendly display name for the transfer config. Required |
query Query | string | The GoogleSQL query to execute. Eg. SELECT @run_time AS time, * FROM `my_dataset.my_table` LIMIT 1000. See the documentation here. Required |
schedule Schedule | string | Data transfer schedule. If the data source does not support a custom schedule, this should be empty. If it is empty, the default value for the data source will be used. The specified times are in UTC. Examples of valid format: every 24 hours, 1st,3rd monday of month 15:30, every wed,fri of jan,jun 13:15, and first sunday of quarter 00:00. See more explanation about the format here. Optional |
writeDisposition Write Disposition | string | The write preference you select determines how your query results are written to an existing destination table. See the documentation here. Optional |
destinationTableNameTemplate Destination Table Name Template | string | The destination table name template can contain template variables such as {run_date} or {run_time}. See the documentation here. 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_cloud-create-scheduled-query
- Version
- 0.0.5
- App
- Google Cloud
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗