Bulk Invite Users

AI-generated summary

The discussion outlines a proposal to add a bulk user invite feature to Discourse, triggered via the user page’s existing Invites area. codinghorror suggests a “Batch Invite from File” button accepting CSV files with columns for email, long name, and short username. techAPJ submitted an initial pull request, which codinghorror refined by requesting updated UI copy linking to a permanent how-to guide. techAPJ confirmed implementation and shared the guide link. codinghorror later specified that the CSV format should prioritize email, followed by long name and short name to pre-fill user data. tobiaseigen questioned the necessity of pre-filling names, suggesting users might prefer to set them upon login, and highlighted more urgent needs like recognizing direct logins and group assignment. codinghorror clarified that pre-filling is optional (omit fields to skip) and deferred group support to post-V1.0. precise54 offered assistance but later withdrew due to exams precise54, admitting negligible progress precise54. codinghorror asked if work was active, leading techAPJ to take over the task.

We should have a user interface for bulk inviting users to Discourse, since it comes up so often.

Probably the best place to trigger this is from the user page, which already has an Invites area:

  • Add a button, “Batch Invite from File”
  • File should have format explained on the page
  • Format should probably be CSV, one line per user, in the format username, Very Long Name, email@example.com (should we support group here @sam)
  • Uploading the file triggers sending invites to everyone in the file, and adding them to the invite directory on that page, same as if you had clicked the “Send an Invite” button 100, 200, 500 times and done it manually.

I am not sure if the invites support pre-staging the username (short+unique) and name (long+not-unique), but we should support it for the file upload case.

6 „Gefällt mir“

Sent a PR for this:

https://github.com/discourse/discourse/pull/2415

3 „Gefällt mir“

One other tweak @techapj. When the panel is empty, it says:

No invites were found.

This copy should change to include

No invites were found.

You can send invites individually, or to larger groups by submitting an invite file.

The invite file link should link to a permanent howto topic here on meta that describes the invite file format, how it works, and walks people through the process with screenshots.

2 „Gefällt mir“

This is now implemented:

Here’s the howto for detailed description:

1 „Gefällt mir“

Looks great! We need to add support for two more fields in the CSV file:

  • long name (non-unique, unicode user name)

  • short name (unique, max 20 chars ASCII username)

Keep email as the first field, so:

maxwell@example.com, Maxwell P Username Jr., maxuser
sadie@example.com, Sadie Pushweather, sadiep
1 „Gefällt mir“

Don’t you think it’s ok to let the user decide their own long name and short name, or have this come from google etc along with their photo if they log in via that method? Or am I missing something?

More urgent (to me) would be to have invites recognized even if the person ignores the invite link and logs in directly, and to have the ability to add people to groups as they are bulk invited.

1 „Gefällt mir“

This pre-fills the information for them. If you don’t want it, don’t add those fields to that line of the CSV file. Simple.

Groups will be added later, post V1.0 probably.

1 „Gefällt mir“

Hi guys

I’d love to help out here. If you need any help with this feature please let me know.

Thanks, David

1 „Gefällt mir“

So I’ve started working on this at a really inopportune time. My final exams are looming, so I’m going in to full lock-down for the next fortnight. If it’s still outstanding at that point I’ll jump back on it, just wanted to let you all know in case someone is hanging out for this feature.

1 „Gefällt mir“

Are you working on this now? @techAPJ can take over if it is a bad time.

1 „Gefällt mir“

No I’m not. Progress up to this pint has been negligible. If @techAPJ can take over that would be great.

Okay, no problem. I’ll take this over. Thanks for your efforts though!