Export event data is a bit painful, and email addresses would be useful

This data explorer query will go a long way towards giving you what you need:

-- [params]
-- int :topic_id

WITH user_emails AS (
  SELECT 
    ue.user_id,
    ue.email
  FROM 
    user_emails ue
  WHERE 
    ue.primary = true
),
forum_timezone AS (
  SELECT 
    value AS timezone
  FROM 
    site_settings
  WHERE 
    name = 'discourse_local_dates_email_timezone'
)

SELECT 
  u.name AS display_name,
  u.username,
  ue.email,
  CASE dpei.status
    WHEN 0 THEN 'Going'
    WHEN 1 THEN 'Interested'
    WHEN 2 THEN 'Not Going'
  END AS status,
  to_char(dpei.created_at AT TIME ZONE 'UTC' AT TIME ZONE ft.timezone, 'YYYY-MM-DD HH24:MI:SS') AS rsvp_timestamp
FROM 
  discourse_post_event_invitees dpei
JOIN 
  posts p ON p.id = dpei.post_id
JOIN 
  users u ON u.id = dpei.user_id
JOIN 
  user_emails ue ON ue.user_id = dpei.user_id
JOIN 
  forum_timezone ft ON true
WHERE 
  p.topic_id = :topic_id
ORDER BY 
  dpei.status, ue.email

If you make a group for your admins staff, and make this query accessible to them it will likely do the job nicely. You’ll probably want to set the Discourse Local Dates Email Timezone setting (or hack the query to ignore it).

You’ll need to teach them to use the Topic ID, and what that means in terms of URL. But that is probably doable.

1 Like