# How to send data from GCP to Losant

**URL:** <https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349>\
**Category:** Help\
**Tags:** gcp, iot\
**Created:** [February 10, 2022, 1:43pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349 "2022-02-10T13:43:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nagarjuna\_Reddy](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@Nagarjuna\_Reddy](https://forums.losant.com/u/Nagarjuna_Reddy)\
**Post date:** [February 10, 2022, 1:43pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/1 "2022-02-10T13:43:12Z")

</div>

could you please anybody help me with how to send GCP live data to Losant application.

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [February 10, 2022, 2:02pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/2 "2022-02-10T14:02:54Z")

</div>

Hello @Nagarjuna_Reddy,

Welcome to the Losant Forums, we’re happy to have you!

Would you be able to provide a little more context on your use case? From the looks of your question, it seems as if you are trying to get data from GCP to Losant, is that correct?

What type of data? From what service are you trying to send your data?

Any additional information you can provide will definitely help me give you better instruction and point you in the right direction.

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Nagarjuna\_Reddy](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@Nagarjuna\_Reddy](https://forums.losant.com/u/Nagarjuna_Reddy)\
**Post date:** [February 10, 2022, 2:08pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/3 "2022-02-10T14:08:17Z")

</div>

i am just trying to send some static data using pub sub method.  
Ex: when I publish some data in GCP immediately that data should come to Losant also?

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [February 10, 2022, 2:19pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/4 "2022-02-10T14:19:57Z")

</div>

@Nagarjuna_Reddy,

I am assuming you are using a [GCP Pub/Sub Integration](https://docs.losant.com/applications/integrations/#google-pubsub) in your Losant Application. From there, you will need to create an [Application Workflow](https://docs.losant.com/workflows/application-workflows/) with an [MQTT Trigger](https://docs.losant.com/workflows/triggers/mqtt/) set to the Pub/Sub integration.

With this setup, the workflow will fire for messages received on **any topic** configured through the integration. From there you can do any sort of data manipulation you need to do with other nodes, and then you can save that data as [Device State](https://docs.losant.com/devices/state/) for a device in Losant with a [Device: State Output Node](https://docs.losant.com/workflows/outputs/device-state/).

Let me know if this helps or if need any more explanation.

Heath

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [February 10, 2022, 4:31pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/5 "2022-02-10T16:31:43Z")

</div>

@Nagarjuna_Reddy,

I mentioned the MQTT trigger for the Pub/Sub integration, which is the incorrect trigger to use in this case. You should instead use the [GCP Pub/Sub](https://docs.losant.com/workflows/triggers/google-pub-sub/) trigger.

We also have a great [blog post](https://www.losant.com/blog/getting-started-with-google-pub-sub-and-losant) that covers this exact thing.

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Nagarjuna\_Reddy](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@Nagarjuna\_Reddy](https://forums.losant.com/u/Nagarjuna_Reddy)\
**Post date:** [February 11, 2022, 3:19pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/6 "2022-02-11T15:19:05Z")

</div>

i have followed same thing what you said, but I haven’t received any data from GCP cloud after publish the data?

 ![Capture](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/d/d2bf3a8b97c09a02c3812ef5c434af39995720d7.png)  
 ![Capture1](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/8/89064f055b9fe9fbc9e070fe4dac4b347f9297d8.png)  
 ![published data](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/0/050e4b21e3e115ee23dcc58ce540ffe9acb3f3cd.png)

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [February 11, 2022, 3:58pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/7 "2022-02-11T15:58:25Z")

</div>

Hello @Nagarjuna_Reddy,

In the top right of your first screenshot, it looks like your integration is not connected, indicated by the red Plug with a slash through it.

Once your connection is established, your workflow should fire as intended.

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Gambit\_Support](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/gambit_support/32/826_2.png) [@Gambit\_Support](https://forums.losant.com/u/Gambit_Support)\
**Post date:** [February 13, 2022, 2:51pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/8 "2022-02-13T14:51:57Z")

</div>

In order for it to connect, make sure your topic name matches. You show your subscription, but you don’t show our GCP topic setting. The leaf name needs to be the same as you configure on the Losant side. We learned that recently ourselves.

---

<div class="post-metadata">

**Author:** ![Nagarjuna\_Reddy](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@Nagarjuna\_Reddy](https://forums.losant.com/u/Nagarjuna_Reddy)\
**Post date:** [February 14, 2022, 6:04am UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/9 "2022-02-14T06:04:46Z")

</div>

Where i did the mistake. why is the connection not yet established?

 ![topicname](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/0/0a9ea5c0dd6ddda85fb3dab3368f86429196a918.png)

---

<div class="post-metadata">

**Author:** ![Nagarjuna\_Reddy](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@Nagarjuna\_Reddy](https://forums.losant.com/u/Nagarjuna_Reddy)\
**Post date:** [February 14, 2022, 6:06am UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/10 "2022-02-14T06:06:05Z")

</div>

Where i did the mistake. why is the connection not yet established?

 ![topicname](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/0/0a9ea5c0dd6ddda85fb3dab3368f86429196a918.png)

---

<div class="post-metadata">

**Author:** ![Nagarjuna\_Reddy](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@Nagarjuna\_Reddy](https://forums.losant.com/u/Nagarjuna_Reddy)\
**Post date:** [February 14, 2022, 7:10am UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/11 "2022-02-14T07:10:58Z")

</div>

Hi can you look out the below image which I point out

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/1/1542aa5c5abf0e1f76d5de2c126832e171f94abb.png)

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [February 14, 2022, 2:28pm UTC](https://forums.losant.com/t/how-to-send-data-from-gcp-to-losant/4349/12 "2022-02-14T14:28:32Z")

</div>

Most likely the service account you set up in Google Cloud most likely does not have the necessary [permissions](https://cloud.google.com/iam/docs/service-accounts#service_account_permissions) applied to it to establish a connection to your PubSub service.

The [blog post](https://www.losant.com/blog/getting-started-with-google-pub-sub-and-losant) that @Heath suggested in an earlier reply also touches on this. I recommend checking that out if you have not done so already.
