Project 4 — Intermediate

Email Triage & Attachment Bot

Shared inbox me roz 300+ mails — invoices, queries, complaints. Sab manually padh ke folder me daalna. Is project me bot banayenge jo mails automatically classify kare, attachments save kare, aur acknowledgment reply bheje.

⏱ 25 min• Intermediate• UiPath Studio (Community)

Project kya karega?

WHAT

Bot Outlook se unread mails laayega, keyword rules se classify karega (invoice → Finance folder, complaint → Support, query → Sales), har category ke attachments alag folder me save karega, aur sender ko template acknowledgment reply karega. Processed mails read-mark + folder move.

WHEN

Shared mailboxes (info@, support@, sales@) — jab inbox me 100+ mails roz aayein aur manual sorting 1 ghanta le. Email triage RPA ki sabse visible use case hai — result turant dikhta hai.

WHERE

Customer support teams, helpdesks, HR departments (leave queries), sales teams (lead qualification). Har company ka inbox hai — har company ko chahiye.

Business reality: Support team ka 40% time sirf mails sort karne me jaata hai. Bot sorting kare to team sirf actual replies pe focus kare. Ye "efficiency story" interview me kaam aayegi.

Step-by-step build

Main.xaml (Sequence)
 |
 +-- Try Catch
 |    +-- Get Outlook Mail Messages
 |    |     Filter: "[Unread]=true"
 |    |     OnlyMessagesWithAttachments: False
 |    |     Top: 50        (batch limit - har run me 50)
 |    |     -> dtMails
 |    +-- For Each  mail in dtMails
 |    |    +-- Sequence: Classify & Route
 |    |         +-- Assign  strSubject = mail.Subject.ToLower
 |    |         +-- Assign  strFrom    = mail.From.ToString.ToLower
 |    |         +-- If  strSubject.Contains("invoice") OR strSubject.Contains("bill")
 |    |         |    +-- Save Attachments  mail  to  "C:\Mail\Finance\"
 |    |         |    +-- Move mail to folder "Finance"
 |    |         +-- Else If  strSubject.Contains("complaint") OR strSubject.Contains("issue")
 |    |         |    +-- Save Attachments  mail  to  "C:\Mail\Support\"
 |    |         |    +-- Move mail to folder "Support"
 |    |         +-- Else If  strFrom.Contains("gmail.com") OR strFrom.Contains("yahoo")
 |    |         |    +-- Move mail to folder "Sales-Query"
 |    |         +-- Else
 |    |              +-- Move mail to folder "Other"
 |    |         +-- Send Outlook Mail Message
 |    |              To: mail.From
 |    |              Subject: "Re: " + mail.Subject
 |    |              Body: "Aapka mail mil gaya hai - team 24 ghante me reply karegi."
 |    |              IsDraft: False
 |    +-- Catch
 |         +-- Log Message  LogLevel.Error

Rules ko Config me daalo

Upar ke If-Else rules production me Config.xlsx ki sheet me jaate hain — Support team khud keywords badal sake:

# Config.xlsx - TriageRules sheet
Keyword        Folder
invoice        Finance
bill           Finance
po             Finance
complaint      Support
issue          Support
refund         Support
quote          Sales
demo           Sales

# Bot: For Each Row in TriageRules -> strSubject.Contains(keyword)
# Rules update = Excel edit, bot redeploy nahi

Error handling

Enterprise tips

Interview question: "Duplicate email processing se kaise bachoge?" — Unread filter + mail processing ke turant baad "Mark as read" activity. Plus run-level idempotency: har mail ka EntryId tracker sheet me check karo. Do layer defense enterprise standard hai.

Exercise

Question: Get Outlook Mail Messages me sirf anpadh mails laane ka filter string kya hogi? (2 words max)

Question: Process hone ke baad mail ko read mark karne ki activity ka naam? (2-3 words)

Common mistakes

Lesson complete?

Project ban gaya? Ab next project pe chalte hain — SAP Data Entry Bot.

Popular courses: Data Science Course in Lucknow · AI Course in Lucknow · Python Course in Lucknow · Power BI Course · Data Analytics Course