GCP PubSub maps Machine States through a schema and sends them to a Google Cloud Pub/Sub topic. Select `GCP PubSub` in the creation screen.

## Prerequisites

An owner configures the Integration. Prepare a destination Pub/Sub topic and service account credentials with permission to publish to it. Account quotas apply.

## Configure the Integration

1. Open [Integrations](https://now.obniz.com/integrations), add an Integration, and select `GCP PubSub`.
2. Select the Machines and enter a display prefix.
3. Enter the `Topic Name` and service account JSON in `Credentials`.
4. Follow the [shared schema settings](integration#schema-settings) to map State keys to output fields. Check the result with `Transform Data`.
5. Check the send interval, timestamp format, and Machine identification under `Advanced Settings`, then save.

Credentials are secret. Do not include them in documentation examples, public code, or screenshots.

Saving enables the definition. Check the destination and payload before saving.

## Verify delivery

Wait for the configured interval and check for messages at the destination subscriber. A successful transformation preview does not establish successful Pub/Sub delivery.

If messages do not arrive, check the topic name, service account permissions and credentials, Machine States, interval, and quota.
