Extracting email addresses for a group

AI-generated summary

In a support discussion titled “Extracting email addresses for a group,” HAWK asks how to export email addresses of members from a specific group without using plugins, due to being on a hosted Discourse plan. cpradio suggests the Data Explorer plugin, which is supported by Discourse core, and notes that hosted users can request its installation via email to team@discourse.org as quoted by riking. HAWK confirms the need for a plugin-free solution, but later accepts the plugin approach after learning it’s officially supported. cpradio attempts a query to extract group emails and shares a downloadable script (group-emails.dcquery.json), though initially encounters a plugin error related to missing avatar-template module. riking identifies the issue as outdated plugin code and confirms it’s now fixed in the latest update. cpradio verifies the fix works after commenting out the problematic code and shares a screenshot of sample output. HAWK thanks cpradio for the help, calling him “a star.” The thread concludes with a functional workaround using the Data Explorer plugin, pending its installation on the hosted instance.

Is there any way that I can pull a list of email addresses for all members of a particular group?

Would the Data Explorer Plugin do this? I really need to install that locally to see what can be done with it. (bbiab while I go do that before I forget)

I need a way to do it without plugins. I’m on a hosted plan which limits which stops me from installing them.

With Discourse? As they’ll install that one, it is supported by core.

Ok, that’s good to know. (Yup, with Discourse).

Okay, this is going in blind as for whatever reason, the plugin doesn’t produce a table of results for me (for any query), but this is my first stab at what you are looking for (I think).

group-emails.dcquery.json (606 Bytes)

It’s due to not keeping up with changes in core:

Uncaught Error: Could not find module `discourse/lib/avatar-template` imported from `discourse/plugins/discourse-data-explorer/discourse/components/query-result`

I just grabbed latest, or are you saying that the plugin needs to be adjusted? (seems to be the plugin… based on the error)

OK, just fixed it, data-explorer will be fixed when you next update it :wink:

Sweet, as I just commented out the avatar template usage to see if my query works and it does.

@HAWK, when you get the plugin, you can import my script above, here is a sample of the output

Thanks Matt, you’re a star.