extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[firestore-send-email] Only works on (default) database

Open BOXNYC opened this issue 1 year ago • 1 comments

I have multiple databases, “(default)” and “development”. I have firestore-send-email extension installed from the Extentions tab and another one installed from after I select the “development” database.

They are configured identically but it only sends an email when I add a document to the “(default)” database ‘mail’ collection.

When I look at the processQueue Cloud Function the extension creates, it has an Environment Variable DATABASE_INSTANCE that is empty. When I try to set it to "development" through the Firebase Console, I get an error "Users can't set environment variables, only the system can." (not verbatim)

BOXNYC avatar Jun 18 '24 21:06 BOXNYC

Hi there, yes extensions only support events on the (default) firestore instance currently. This is blocked as v2 cloud functions are not fully supported in extensions. I will relabel this as a feature request for now.

cabljac avatar Jul 02 '24 15:07 cabljac

Good news, after investigating and escalating with the team, v2 firestore triggers ARE now supported on extensions. I will remove the blocked label and prioritise accordingly

cabljac avatar Mar 17 '25 09:03 cabljac

Great news! Thanks for the update!

BOXNYC avatar Mar 17 '25 12:03 BOXNYC

This feature is really needed, any update on this?

hussainhabib2 avatar Mar 24 '25 22:03 hussainhabib2

Still an issue from what I can tell, I also would like to be able to specify which database for the trigger to listen to besides (default). Is there a plan to implement such a feature still?

mattanimation avatar Mar 30 '25 18:03 mattanimation

Hi there, we have a PR in the works which should add v2 support and non-default database support here: https://github.com/firebase/extensions/pull/2359

cabljac avatar Apr 02 '25 07:04 cabljac