I found some talk of this in other posts, but nothing that answers my question, but apologies if I missed the answer or if this is considered duplication.
I have a product fleet that I am hoping to use the google maps geolocation integration with. The ideal scenario, is that periodically the particle calls the geolocate integration, and then the location data from the response is then passed a google pub/sub integration along with the devices id. I will then take the data from there and get it into Firestore. The particle does not need to listen to the response from the geolocate hook.
My question is, short of receiving the data from the response directly on our device and republishing from the device as a fresh event, is there anyway to catch the Google API response, add in the device id and hand over the the gcloud integration?
Since you cannot have a webhook response trigger another webhook, there a few possibilities:
Have the response go all the way back to the device and have the device trigger a new event with the location data for your server to respond to using a webhook.
Monitor the server sent events stream from your server for the location response messages instead of using a webhook.
Instead of triggering the location lookup from a webhook, have the location request sent to your own service using a webhook. Using something like Google cloud functions or Amazon lambda, send the request to Google Geolocation and then the response will go back to you, instead of the device.