Can a plugin auto-create a topic after_create of a category?

I want every category to have an auto-generated topic, much like default “About the [catgegory name] category” at the top of every category. Is there a way I can hitch on the after_create event of Category? I can’t find any plugin that does anything similar, or even how to insert a topic record.

1 Like

I think you’d need to use the Discourse API to achieve this?

There is a DiscourseEvent called category_created.

You’d want to tie into that event and follow this example:

Hope that helps!

5 Likes

This is exactly what I needed! I just KNEW there had to be an event I could catch, I just couldn’t find it. Many thanks!

2 Likes