Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync existing user email addresses when connecting Mailchimp Extension to Firebase #415

Closed
zkhalapyan opened this issue Aug 6, 2020 · 9 comments
Assignees
Labels
in-review Awaiting review by FE team. type: feature request New feature or request

Comments

@zkhalapyan
Copy link

[READ] Step 1: Are you in the right place?

Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.

[REQUIRED] Step 2: Extension name

This feature request is for extension: auth-mailchimp-sync

What feature would you like to see?

After I connected mailchimp extension to firebase, I realized that the existing user email addresses were not synced. New users are added, but I have to manually backfill. Would be great if by connecting mailchimp, firebase automatically imported all the existing users as audience members in mailchimp.

How would you use it?

Send out emails to my users just how mailchimp is intended. It would prevent me the headache of manually back-filling.

@Salakar Salakar added type: feature request New feature or request in-review Awaiting review by FE team. labels Aug 6, 2020
@Salakar
Copy link
Member

Salakar commented Aug 6, 2020

Hey @zkhalapyan - thanks for raising this feature request. We'll discuss internally with the Firebase Extensions team and get back to you.

Quick thoughts on this though; I don't think this would be feasible in the extension itself as the extension only reacts to the auth onCreate functions trigger - so it is not aware of existing users. However maybe something like a manual one time run import script that uses the firebase-admin SDK to list all users and sync to Mailchimp - whether that is in scope for this extension though is something we need to discuss internally.

References:

@zkhalapyan
Copy link
Author

I am not completely aware of the extensions architecture overall, but it probably makes sense to have some API for setupExtension that gets called when an extension is installed and at which point you can do a one time read/push to MailChimp. After that, all additional users will be added from onCreate.

From business perspective, I think there is a fairly strong need for this; I am assuming most likely what project owners would do is a manual export/import or maybe get a developer to write the feature above, but both of these sound painful.

Thanks for getting back so quickly 😊

@HyperNexus
Copy link

Kind of related to this. There is no authentication triggers for when users update their email address. So this plugin wouldn't handle that case. Maybe some kind of recurring job that checks for these changes is the way to go. Such a job could tie in with setupExtension.

@zkhalapyan
Copy link
Author

@HyperNexus I think makes sense, but that seems less of a "one time setup" and more of an ongoing update trigger. Probably best to open a new task.

@i14h
Copy link
Member

i14h commented Sep 28, 2020

@Salakar what do you think if we write a script that the user can manually invoke to sync auth with mailchimp? another option is to build it as a scheduled function, but that will run for all users even if they don't need this.

@dackers86
Copy link
Member

Given the multiple scenarios. We could potentially introduce two new tasks...

setupExtension or syncContacts - This would be a manual task that would do as @zkhalapyan suggested, that would sync existing users. In theory this can be ran at any time - so would need to ensure no duplicates are created.

For @HyperNexus, perhaps a new trigger for updating a user could update mail-chimp. A scheduled function would potentially cause delays in synchronisation and as mentioned - be unnecessary for the majority of users

@dackers86
Copy link
Member

After further investigation. setupExtension or syncContacts will perhaps need to be a manual process that can be explained within a setup guide. This will then need to be executed manually?

The main issues here are based around...

  • Timeout limitations through http requests.
  • Potential memory usage based on how many users (though I doubt we would ever hit the 2gb limit)

Please see https://firebase.google.com/docs/functions/quotas.

@dackers86 dackers86 self-assigned this Oct 6, 2020
@dackers86
Copy link
Member

dackers86 commented Oct 6, 2020

Initial PR script added at #464

@dackers86
Copy link
Member

Closing in favour of mailchimp/Firebase#29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-review Awaiting review by FE team. type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants