Move e-mail from Outlook to Zammad

Everyone knows it: Someone send you an e-mail, but you want it in Zammad. Here’s a little solution for Outlook (with Exchange):

First, you must convert your Zammad mailbox to a shared mailbox and give all agents full access. Just move the mail from your customer to the inbox folder of that shared mailbox. But this macro will do the job for you. It moves all selected mails to the ticketsystem inbox.

Open Outlook, press Alt+F11 and paste the following Macro:

Public Sub MoveToTicketsystem()
    Dim olNs As Outlook.NameSpace

    Set olNs = Application.GetNamespace("MAPI")

    Dim Recip As Outlook.Recipient
    Set Recip = olNs.CreateRecipient("emailaddress.of.your@ticketsystem.com") 'update email

    Dim SharedInbox As Outlook.Folder
    Set SharedInbox = olNs.GetSharedDefaultFolder(Recip, olFolderInbox) 'Inbox

    Dim i As Long
    Dim Item As Outlook.MailItem

    For i = ActiveExplorer.Selection.Count To 1 Step -1
        Set Item = ActiveExplorer.Selection.Item(i)
        Debug.Print Item.Subject
        'Item.Move SharedInbox.Folders("Zammad") 'if it's not the main folder
        Item.Move SharedInbox 'default inbox folder
    Next
End Sub

Then add this macro the quickstart menu (I hope it’s the right translation, in my German Outlook it’s called Schnellstart).

Unfortunately Outlook don’t support keyboard shortcuts for macros, but quickstart does. If your quickstart icon is the third one, just press Alt+3 (or press Alt longer then you see the keys).

If you want to automate it even more, just assign the agent the mail was originally sent to as ticket owner with the following postmaster filter rule. But you have to do it for each agent:

image

3 Likes

We have added the shared mailbox to outlook and have added the mailbox folder to the favorites. While adding it to the favorites I have a shortcut on top of my folders in outlook which can be used as a drop zone. Single and multiple mails I like to add to zammad can be grabbed from any folder or mailbox and dropped to zammad easily.

1 Like