Imagine a member has selected groups and sub-categories he is interested in.
I want to send an announcement to those who selected either of those groups and sub-categories.
Example: In a city made of the global main city, several boroughs and matters.
I would also have groups that are borough-matter specific.
The user can select:
A specific matter (Which as a general group),
A group in his borough for this matter,
A group in two other borough for this matter,
A second specific matter (Which as a general group),
All groups in all boroughs for this matter,
The main group for the main city;
If I wish to send an email to one or more groups or subcategories in these groups, some users might end up receiving more than one email of the same announcement, especially if the person selected the main city group that would forward the info from all boroughs and matters, plus some subgroups, etc.
The question: How can I prepare a mailing touching more than one targeted group and sub-categories list, duplicate-free, and send that message?
Thanks, Do you know if we can automate that, such as requesting the API to receive messages for each new member registration/withdraw or group/category selection, and receive only the new changes OR (less good) the whole list with their group/category, that can be requested by a Python program?
(I can manage to code Python). The question is more about automating communication between Discourse and Python AND Python and Mailing processor.
Discourse provides a robust REST API that allows you to:
List all users, groups, and user-group memberships
Monitor new user registrations and group join/leave actions (via polling or webhooks)
Retrieve category membership configurations
You can query either the full list or attempt to track recent changes. For full incremental change detection, you may need to implement time-based checks and manage differences locally. Authentication is handled through HTTP headers (Api-Key, Api-Username).
However, for more efficient and integrated control, I recommend creating a custom Discourse plugin. A plugin runs inside the Discourse server environment and provides direct access to Discourse internals, such as:
User, group, and category membership updates
Lifecycle event hooks for registrations and group changes
Direct access to Discourse’s internal APIs and database
This approach gives you real-time capabilities and greater flexibility for implementing automated workflows like mail handling or user segmentation.
Discourse에서 원하는 기능을 구현하는 방법 중 하나는 카테고리를 생성하고, 커뮤니티 멤버들이 해당 카테고리에 "구독"하도록 하는 것입니다. 이를 위해 알림 수준을 "watching"으로 설정하면 됩니다. Default categories watching 또는 Default categories watching first post 설정은 사이트에 공지사항 카테고리를 만들어 모든 사용자에게 도달하게 하는 데 유용합니다.
그룹 멤버십이나 기타 기준에 따라 위 사항을 관리하는 방법도 있다고 생각하지만, 제가 직접 해본 지 꽤 오래 되어 정확하지 않습니다. 다른 누군가가 공유할 수 있는 방법이 있을 수도 있습니다.
또 다른 접근 방식은 그룹에 직접 개인 메시지(PM)를 보내는 것입니다. 여러 그룹에 속한 동일한 멤버에게 메시지를 보내더라도 중복 전송되지 않습니다.
하지만 원하시는 것이 사람들이 로그인하여 토론에 참여하는 포럼이나 커뮤니티가 아니라, 이메일을 발송하는 메일링 리스트 모음이이라면, 다른 도구를 찾고 계신 것 같습니다.
이 모든 것은 Discourse 외부의 코드에 배치할 수 있으므로 설치할 필요가 없습니다. WordPress를 사용 중이라면 https://github.com/discourse/wp-discourse를 사용하면 이 중 상당 부분을 무료로 사용할 수 있으며, 메일링 리스트 부분은 다른 WordPress 플러그인을 사용하여 처리할 수 있습니다.