Skip to main content

Google Cloud Pub/Sub

Use Google Cloud Pub/Sub when a data pipeline or application already reads from a Pub/Sub subscription. Files.com publishes to a topic in your Google Cloud project. The subscriptions on that topic determine which applications receive the messages.

Files.com can publish folder activity, events selected by an Event Channel subscription, or a message built in an Automation v2 branch.

Configuration in Google Cloud

Enable Pub/SubExternal LinkThis link leads to an external website and will open in a new tab in the project that owns your topic. Create or identify the topic and note the project ID and topic ID. Configure the subscriptions that your receiving applications use.

Create a service account for Files.com and grant it the Pub/Sub Publisher roleExternal LinkThis link leads to an external website and will open in a new tab on the topic. Generate a JSON key for the service account. Store the key securely so it is available when you configure or rotate the Files.com credentials.

Creating a Google Pub/Sub Notification

Add a Google Pub/Sub folder Notification for the folder you want to monitor. Site, Workspace, and Folder Administrators can configure notifications within their scope. Enter the project ID, topic ID, and service account JSON key.

Choose the file actions to report and whether activity in subfolders is included. Both subfolder activity and all supported file and folder actions are included by default. The notification sends a message when matching activity is recorded.

Event Channels

Create a Google Cloud Pub/Sub target with the project ID, topic ID, and service account JSON key. Select the target in the subscription that matches the events to publish. Files.com sends the event as JSON in the Pub/Sub message data. The target keeps the key private after saving. Check Delivery Attempts for the result and retry status.

Automations v2

In the Publish to Google Pub/Sub action, enter the project ID and topic ID. Select a Key/Value Secret containing the service account credentials. The node publishes the JSON built from each item that reaches it.

What Is Included in Google Cloud Pub/Sub Notification Messages

Files.com publishes a JSON object in the Pub/Sub message data. The object contains the following fields when their values are available.

FieldDescription
default.sourceIdentifies Files.com as the publisher. The default object contains "source": "Files.com".
actionType of operation: create, copy, move, archived_delete, update, read, or destroy.
interfaceThe interface used for the action, such as web, restapi, sftp, or robot.
pathThe source file or folder path when the action records a source; otherwise, the path of the file or folder acted on.
destinationThe resulting file or folder path, when available. This can be the same as path, as with an upload or update, or a different path, as when creating an output file, copying, or moving.
atEvent timestamp in ISO-8601 format, such as 2026-09-16T14:03:11+00:00.
usernameUsername of the account that performed the action, when available. A site-wide API key has no associated username.
ipThe IP address of the session that started the action, when available.
typefile or directory, when available.
sizeFile size in bytes, when available.

The file action fields are at the top level of the JSON object. They have the same path relationships as standard Files.com Webhooks: a create event can identify an original source in path and a new output file in destination, while an upload or update can use the same path for both. The destination field is omitted when no destination is recorded, and its presence does not imply a copy or move.

Timing of Google Cloud Pub/Sub Messages from Files.com

Your site sends messages to your Pub/Sub Topic within seconds of Files.com recording matching folder activity. For changes made directly on remote storage, this follows detection by a Remote Metadata Index scan.

Common Failure Patterns

If no message arrives, confirm that the configured project still owns the topic and has Pub/Sub enabled. If the topic was moved or recreated, check both IDs. If the receiving application uses a different topic or subscription, check its configuration in Google Cloud.

Check that the service account is active and can publish to the topic. If the key was deleted or disabled, generate a new service account key and update the Files.com configuration or Secret that uses it. Confirm delivery in the receiving subscription and successful processing in the application.