Bulk grant badge based on email

AI-generated summary

Sami_Syed is seeking a way to bulk-grant badges based on a list of emails, granting only if a profile exists, and optionally granting to future sign-ups matching those emails. ClawdiaWolf offers several approaches: (1) Create an SQL badge that auto-triggers daily to grant badges to users matching email criteria — ideal for small lists or common email domains (e.g., Monster High fan forums). (2) Use the API to search for matching emails, collect usernames, and then use the bulk grant feature. (3) For future registrants, implement a webhook that triggers badge grants when a validated email matches the list — though this is discouraged due to potential server strain unless registration volume is low. All methods require periodic updates unless automated via webhook, which carries performance risks.

How can I grant badges in bulk based on a list of emails that I have.

If profile exists on forum, grant badge,

if it doesn’t exist, then skip.

Bonus (if possible): if non-existing, skipped profiles sign up in the future, grant them the badge as well

How many addresses are there? If it’s not a lot you could always create an SQL badge that would auto-trigger daily and grant the badge to anyone who doesn’t have it that should.

This works best if there’s a small number of addresses involved or if everyone who should have the badge (and only those who should have it) are registered with a common email domain.

For example on my friend’s Monster High fan forums we have a badge that is auto-granted to all users with a verified email on the parent domain.

The first alternative would be to use the API to find accounts with matching email addresses and grant the badges that way.

Another alternative, which might work better in your case is using the mass grant option and use a variant of the alternative above. Instead of granting the badge directly, have the script search for the email addresses and if found add the username to a last of users who should have the badge. You can then use the bulk grant function to grant it in bulk in a single grant.

Of course both of those options require you to regularly check for updates for users registering later, but if you are using the API, there’s even an alternative there.

I do not recommend this personally because depending on how active your registrations are this can kill a server if you’re not careful, but if your new registrations tend to be low, you could use a webhook and hook the events and when an email address is validated that matches one of the ones on your list, have the API grant the badge.