Trigger workflows on an interval or cron schedule.
Emit new Pub/Sub topic in your GCP account. Messages published to this topic are emitted from the Pipedream source.
Trigger your workflow on one or more days each month at a specific time (with timezone support).
Inserts rows into a BigQuery table. See the docs and for an example here.
Gets Google Cloud Storage bucket metadata. See the docs.
Downloads an object from a Google Cloud Storage bucket, See the docs
With Schedule - A trigger provided by Pipedream - You can easily build
automated workflows that run on regular times or intervals. Some examples of
things that you can build using the Schedule API include:
The Google Cloud API allows developers to access a variety of Google Cloud
services from their own applications. Services that can be accessed include
Google Cloud Storage, Google Cloud Datastore, Google Cloud Functions, and
Google Cloud Pub/Sub. With the Google Cloud API, developers can build a variety
of applications that take advantage of Google Cloud services.
module.exports = defineComponent({
props: {
google_cloud: {
type: "app",
app: "google_cloud",
}
},
async run({steps, $}) {
// Required workaround to get the @google-cloud/storage package
// working correctly on Pipedream
require("@dylburger/umask")()
const { Storage } = require('@google-cloud/storage')
const key = JSON.parse(this.google_cloud.$auth.key_json)
// Creates a client from a Google service account key.
// See https://cloud.google.com/nodejs/docs/reference/storage/1.6.x/global#ClientConfig
const storage = new Storage({
projectId: key.project_id,
credentials: {
client_email: key.client_email,
private_key: key.private_key,
}
})
// Uncomment this section and rename for your bucket before running this code
// const bucketName = 'pipedream-test-bucket';
await storage.createBucket(bucketName)
console.log(`Bucket ${bucketName} created.`)
},
})