Export Community manager emails to Excel
Four steps, one command, and a completeness check at the end — for escalations and feedback from inbox.
Step 1 — connect read-only
Use an app password, never the main password. The script opens the folder in read-only mode, so nothing is marked as read or deleted.
python mail_to_excel.py --host imap.example.com --user you@example.com --days 31 --fields member,topic,sentiment,action,date --out community-manager.xlsx
Step 2 — filter to one period
A month or a quarter, not «everything». Community problems arrive as direct messages and emails. A weekly table shows patterns before they become a crisis.
Step 3 — keep only the columns that matter
| Column | Why it matters |
|---|---|
member | Community username, not the real name. |
topic | The subject of the commitment or conversation. |
sentiment | Fixed three-value scale: negative / neutral / positive. |
action | What has to happen, in one sentence. |
date | Message date in ISO 8601; sortable and unambiguous across time zones. |
Step 4 — verify completeness
- Run the same search in your mail client and note the message count.
- Compare it with the row count in the spreadsheet.
- If the numbers differ, the filter or the folder is wrong — fix it before using the file.
Example output
| member | topic | sentiment | action | date |
|---|---|---|---|---|
| user_8821 | billing bug | negative | escalate | 2026-10-16 |
Pitfalls
- Member identities are stored where they should not be — Keep usernames, not real names, and avoid copying message bodies.
- Sentiment is guessed inconsistently — Use a fixed 3-value scale (negative/neutral/positive) and define it once.
Provider notes
Discord and Telegram are not IMAP; import their exports separately and merge on username.
FAQ
Can this track NPS?
It can collect the raw signals; NPS calculation belongs in the survey tool.
How do I avoid duplicates?
One row per conversation, keyed by the first message id.
How many messages can it handle?
Thousands per run with a date filter; very large mailboxes are better exported month by month.
Will it change anything in the mailbox?
No. Read-only access is the default and should stay enabled.
Related guides
- Community manager: columns and pitfallsThe compact overview for this role.
- Universal IMAP guideApp passwords, decoding and Excel output.