first, you will use an azure function. this is the perfect glue for this kind of integration. create a new function app, and within it, create a function that is triggered by the iot hub. you can use the 'azure event hubs' trigger, because iot hub presents an event hub compatible endpoint for reading device messages.
when your function is triggered by a new device message from iot hub, the function's code will run. inside this function, you will write the logic to take the incoming data and write it to your google firestore database. you will need to use the firestore client libraries for .net, python, or node.js, depending on which language you write your function in.
for the other direction, sending commands from firestore to devices, you need a way to trigger an action when data changes in firestore. google cloud functions have a built in trigger for firestore events. so you would create a google cloud function that is triggered when a document is created or updated in a specific firestore collection. this google function would then call the azure iot hub's rest api to send a cloud to device message to your specific device.
so, your two way communication looks like this.
device to cloud.
iot device > azure iot hub > azure function > google firestore.
cloud to device.
web app updates firestore > google cloud function > azure iot hub api > iot device.
this pattern of using serverless functions as a bridge is very common and works for connecting any two web services that do not have a direct plugin.
just remember to manage your secrets securely. use azure key vault to store your firestore credentials for the azure function, and use google secret manager for your iot hub connection string in the google cloud function.
good luck with your project
rgds,
Alex