# Cloud Run functions triggers (1st gen)

You can set up Cloud Run functions to execute in response to various scenarios by
specifying a *trigger* for your function. Triggers can be HTTP(S) requests or
one of a number of supported events. This page provides an overview of the
triggers supported by Cloud Run functions.

Broadly, triggers fall into two categories:

- **HTTP triggers** , which react to HTTP(S) requests, and correspond to
  [HTTP functions](https://docs.cloud.google.com/functions/1stgendocs/writing/write-http-functions.md.txt).

- **Event triggers** , which react to events within your Google Cloud project,
  and correspond to
  [event-driven functions](https://docs.cloud.google.com/functions/1stgendocs/writing/write-event-driven-functions.md.txt).

You specify triggers as part of
[function deployment](https://docs.cloud.google.com/functions/1stgendocs/deploy.md.txt). You cannot bind the
same function to more than one trigger at a time, but you can have the same
event cause multiple functions to execute by deploying multiple functions
with the same trigger settings.

> [!NOTE]
> **Note:** Trigger binding does not happen instantaneously. It may take several minutes for a deployed function to start triggering on incoming events.

## Supported triggers

Cloud Run functions supports the following types of triggers:

- [HTTP triggers](https://docs.cloud.google.com/functions/1stgendocs/calling/http.md.txt)
- Event triggers:
  - [Pub/Sub triggers](https://docs.cloud.google.com/functions/1stgendocs/calling/pubsub.md.txt)
  - [Cloud Storage triggers](https://docs.cloud.google.com/functions/1stgendocs/calling/storage.md.txt)
  - [Firestore triggers](https://docs.cloud.google.com/functions/1stgendocs/calling/cloud-firestore-1st-gen.md.txt)
  - [Google Analytics for Firebase triggers](https://docs.cloud.google.com/functions/1stgendocs/calling/google-analytics-firebase.md.txt)
  - [Firebase Realtime Database triggers](https://docs.cloud.google.com/functions/1stgendocs/calling/realtime-database.md.txt)
  - [Firebase Authentication triggers](https://docs.cloud.google.com/functions/1stgendocs/calling/firebase-auth.md.txt)
  - [Firebase Remote Config triggers](https://docs.cloud.google.com/functions/1stgendocs/calling/firebase-remote-config.md.txt)

## Additional triggers via Pub/Sub and webhooks

Because Cloud Run functions can be triggered by messages on a Pub/Sub
topic, you can integrate Cloud Run functions with any other Google service that
supports Pub/Sub as an event bus. In addition, by using HTTP triggers
you can also integrate with any service that provides HTTP callbacks (webhooks).
The following sections describe some example integrations.

### Cloud Logging

Cloud Logging can route logs to a Pub/Sub topic, where they can then
be consumed by Cloud Run functions. See
[Configure and manage sinks](https://docs.cloud.google.com/logging/docs/export/configure_export_v2.md.txt) in the
Cloud Logging documentation for more information.

### Cloud Scheduler

Cloud Scheduler jobs can send messages to a Pub/Sub topic, where
they can then be consumed by Cloud Run functions. See the Cloud Scheduler
tutorial
[Using Pub/Sub to trigger a Cloud Run function](https://docs.cloud.google.com/scheduler/docs/tut-gcf-pub-sub.md.txt)
for more information.

### Cloud Tasks

Cloud Tasks HTTP Target tasks enable you to run task handlers at any
HTTP endpoint, so a Cloud Run function with an HTTP trigger can be used
as a task handler. You can also use tasks to throttle or rate-limit function
invocations. See
[Create HTTP Target tasks](https://docs.cloud.google.com/tasks/docs/creating-http-target-tasks.md.txt) in the
Cloud Tasks documentation for more information.

### Gmail

Using the Gmail
[Push Notification API](https://developers.google.com/gmail/api/guides/push),
you can send Gmail events to a Pub/Sub topic and consume them
with Cloud Run functions.