Include 'Reason' in Grant Badge Discourse Action in Workflows

AI-generated summary

The feature request, initiated by gassim, asks for the addition of a “Reason” field to the “Grant Badge” action within Discourse Workflows. Currently, while the admin interface and API allow granting badges with a reason (such as a link to a specific post), the Workflow action does not support this attribute. gassim argues that adding this option would simplify maintenance and avoid the need for custom API calls.

Frully seconded the request, explaining their use case involving AI-assisted moderation where they wish to grant a badge and automatically link it to the specific reported post. They noted that while an HTTP API call is a possible workaround, integrating the attribute directly into the workflow node would be more elegant.

awesomerobot acknowledged the validity of the request and confirmed that the feature has been implemented, providing a link to the corresponding GitHub pull request. The original poster and the second commenter expressed their gratitude for the swift addition.

Hi

I know that it’s possible to create an API request that grants badges and includes the ‘topic reason’; however, given that ‘Grant Badge’ action in workflows is already available, would it be possible to add the option to include the ‘reason’?

When granting badges, it’s possible to mention the reason. (See admin settings of a profile, click badges, and you will be able to select badge then add link to topic/post:

However, in the Discourse actions in workflows, it’s not possible to include the ‘reason’:

Adding this option will be very helpful and much easier to maintain than creating the API request.

Thanks!

2 Likes

Me Too!

Was just about to post this same thing. Using AI to detect a particular type of post, we want to tag the post, and grant a badge thanking the person for making the report. The workflow node doesn’t have the Reason attribute in order to link back to the post.id.

It’s a minor thing, but should be trivial to add. Gemini suggested an http api call as a workaround since that api can handle the reason attribute. Would be much more graceful as a node.

2 Likes

Seems reasonable! I’ve added the feature here:

3 Likes

@Frully thank you for supporting this feature and sharing why it’s needed on your side as well. I’m glad it’s a shared interest for other community managers. :slight_smile:

@awesomerobot Thank you so much!