Skip to main content

GCP Pub/Sub Trigger

The GCP (Google Cloud Platform) Pub/Sub Trigger fires a workflow whenever a message is sent to one of the topics defined on a given Google Pub/Sub integration or when the integration receives a connection event.

Google Pub/Sub Trigger

Node Properties

The GCP Pub/Sub Trigger requires choosing a Pub/Sub integration, as well as at least one of the following events on which to fire the trigger:

  • Trigger on a connection
  • Trigger on a message (checked by default)
  • Trigger on a disconnection
  • Trigger on a failure to connect

Payload

The payload will include the received message in the data field. In the general case, a Google Pub/Sub Trigger workflow payload will look like the following:

{
"applicationId": "555555555555eeeeeeeeeeee",
"applicationName": "My Great Application",
"data": {
"attributes": {
"key": "value"
},
"data": "my message",
"disconnectReason": "Connection Lost",
"failureReason": "Unauthorized",
"id": "Google Cloud Pub/Sub message ID",
"timestamp": "Google Cloud Pub/Sub message timestamp",
"topic": "myGoogleTopic",
"topics": [
"myGoogleTopic",
"anotherGoogleTopic"
],
"type": "connect|message|disconnect|failure"
},
"flowId": "333333333333cccccccccccc",
"flowName": "My Great Workflow",
"flowVersion": "myFlowVersion",
"globals": {
"aJsonGlobal": {
"key": "value"
},
"aNumberGlobal": 42,
"aStringGlobal": "My value"
},
"relayId": "<ID of the integration>",
"relayType": "integration",
"time": Fri Feb 19 2016 17:26:00 GMT-0500 (EST),
"triggerId": "<ID of the integration>",
"triggerType": "integration"
}

In addition to the standard workflow payload information, the payload will include an object in the data field, which will include the following properties:

  • attributes: A key/value map of attributes passed with the message
  • data: The message that was published on the topic
  • id: The Google Cloud Pub/Sub message ID
  • timestamp: Google Cloud Pub/Sub message timestamp
  • topic: The topic on which the message was received

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.