Assign badge to multiple users at once

Is there a way to mass give badges to a list of users?

Planning to give specific badges to hundreds of users. Not sure if there is any way to do so except for clicking into each user’s admin page and give a badge…

You can use the Bulk Award tool on the /admin/badges page for that. :+1:


Thanks for replying!
Quick question, so I uploaded a csv file starting with an email at each row.


However, it has been a while but the badges are not distributed.

So I tried adding comma afterwards just to test.
If the first row has comma, the system will prompt said the first row’s importing fails.

So I am now quite stuck, in the post, it looks right like this.

Is there any more specific examples of the right way of importing the csv?


Even this does not assign badges to the users. Any hints for debugging?

Based on:

This should be one email or username per line and looking at the code, you don’t need comma.
What you initially did should work. :thinking:

Did you see “Your CSV was received and x users will receive their badge shortly.”?

Also, note shortly; this is not immediate. I believe there is a job queue and you might have to wait one day. You can trigger manually the BadgeGrant job on the /sidekiq/scheduler page. It should empty the queue.

Thanks for your swift reply.

Did you see “Your CSV was received and x users will receive their badge shortly .”?

Yes, I saw that!

/sidekiq/scheduler is this an extension? I dont think we have sidekiq installed. And currently I wont be able to install the extension. Perhaps I will need wait for one day.

Great, that should be good then!

It’s not an extension. Discourse uses it internally to process background tasks.
Is your Discourse self-hosted? If so, you should be able to see it: <your_url>/sidekiq/scheduler.
You can also wait, for sure. :smile:

1 Like

The Bulk Awards are immediate. :+1: The BadgeGrant job is for the automatic ones.

Thank you! It is self-hosted.

However, I dont see it in scheduled job… And the badges are still not awarded yet.

I wonder if this is because the badge contains non-english characters if that matters?

Giving badge one by one works tho

Alright, thank you for informing me! To clarify, I didn’t actually test it out - I just examined the code. It appears that the code would place the items in a queue (but looking again, it seems that the queue would be processed immediately by default unless instructed otherwise). My bad! :pray:

I don’t think so, still no luck?


Found out the issue.

The first user in the csv was neglected somehow. I have been checking if the first user has it. But apparently all users except the first received the badge.

I have award the first user manually, now the issue is resolved :slight_smile:

Thank you for all your help!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.