Skip to content

Conversation

@joehan
Copy link
Contributor

@joehan joehan commented Dec 2, 2022

Adds a lifecycle event to let users automatically add existing auth users to the specified Mailchimp audience.

I'm part of the Firebase Extensions team, and we recently added a new feature called lifecycle events that enables extensions to trigger functions whenever an instance is installed, configured, or updated. I wanted to make some code samples to show off the new feature, and this extension was a good example of an auth triggered extension. Feel free to edit this as you see fit - happy to help answer any questions about the code changes or the feature in general.

@barticus
Copy link
Collaborator

barticus commented Jan 3, 2023

Hi @joehan , thanks for contributing!
New code looks good, thanks for that. We'll need to cover it with some tests first.
I do wonder if theres a way we can also sync specified tags, activities and merge fields (specified by config) for users as well, otherwise artificial updates will still need to be performed to push all details to mailchimp. I'll have a think about whether this can be achieved.

@barticus
Copy link
Collaborator

barticus commented Apr 4, 2023

Hi @joehan , is there any way to test the new lifecycle hooks without deploying the extension currently?
Currently I get this:

⚠  Unsupported function type on ext-mailchimp-firebase-sync-addExistingUsersToList. Expected either an httpsTrigger, eventTrigger, or blockingTrigger.
i  functions[{region}-ext-mailchimp-firebase-sync-addExistingUsersToList]: function ignored because the unknown emulator does not exist or is not running.

From what I have seen online this is using Cloud Tasks which there is no emulator for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants