---
title: Use Custom Attributes in the Google Cloud Pub/Sub Connector
slug: manufacturing-connect-edge/use-custom-attributes-in-the-google-cloud-pubsub-connector
docTags: 
createdAt: 2023-11-02T13:53:41.602Z
---

When integrating the [Google Cloud Pub/Sub](docId:-JIOC-Br1R93089p-13i1) connector, you have the option to configure custom attributes. Review the following use case for using custom attributes.&#x20;

# Use Case Overview

Consider a scenario where you have multiple manufacturing sites worldwide, and one Manufacturing Connect Edge instance is connected to each site. Each Manufacturing Connect Edge instance also has one Google Cloud Pub/Sub Connector integrated with an outbound connection. To categorize the data being sent from Manufacturing Connect Edge to the Google Cloud Platform, you want to add custom attributes to each connector so that you know the origin of the data.&#x20;

You will create the following key custom attributes:

- Country
- City
- Site ID

# Configure Custom Attributes

To review the entire workflow for setting up an outbound connection with the Google Cloud Pub/Sub Connector, refer to the [Google Cloud Pub/Sub Integration Guide](docId:-JIOC-Br1R93089p-13i1). The steps below focus on configuring the custom attributes for one of the Manufacturing Connect Edge instances described in the use case above.&#x20;

**To configure custom attributes:**

1. Navigate to **Integration**.&#x20;
2. From the *Integration&#x20;*&#x70;ane, click **Add a connector**.&#x20;
   The *Add a Connector* dialog box appears.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/YuLY4kcHRlrNdJimuQ0vc_addconnectormc.png" size="80" width="1193" height="612" position="center" caption="Add a connector icon" showCaption="true"}
3. Select **Google Cloud Pub/Sub Connector**.&#x20;
4. Configure the connection parameters to set up a connection with the Google Service account. Refer to the [Google Cloud Pub/Sub Integration Guide](docId:-JIOC-Br1R93089p-13i1).&#x20;
5. Click the checkbox for **Show Custom Attributes**. The configuration section displays.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/BOZOGsh-dtS_v--K55aAl_showcustomattributescheckboxmc.png" size="80" width="1171" height="754" position="center" caption="Show Custom Attributes checkbox" showCaption="true"}
6. Enter the following Key/Value pairs and click **+ Add&#x20;**&#x66;or each pair.&#x20;
   - **Key**: Country **Value**: United States
   - **Key**: City **Value**: Chicago
   - **Key**: Site ID **Value**: 2463
7. Review the configured custom attributes and all other connection parameters. Then, click **Add**.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/zu62FRGD01SNMoSLDPNiZ_image.png" size="80" width="1175" height="754" position="center" caption="Custom Attributes Configured" showCaption="true"}

The connector displays in the *Integration&#x20;*&#x70;ane with the custom attributes in the connector configuration.&#x20;

# Sample Payload with Custom Attributes

Review the following payload with custom attributes configured.&#x20;

- The *Attribute keys* column displays custom attributes that are created for the payload (*location&#x20;*&#x61;nd *source*).&#x20;
- The *attribute.location* column displays the value for the *location&#x20;*&#x61;ttribute (toronto).&#x20;
- The *attribute.source* column displays the value for the *source&#x20;*&#x61;ttribute (mce).&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/OXFLvK3BPmUjAeF7mhw5Y_image.png" size="80" width="1417" height="555" position="center" showCaption="false"}

