With version 600.1801 the Workflow Designer gets a powerful function like Mailscanner/Mailconverter from VtigerCRM core.
But because the module itself is much more flexible, then the core Mailscanner, you could do much more things.
Step 1 – Server Connection
The server configuration is done within the Provider Manager. Add a “IMAP Server” Connection and fill in all information. It is recommended to use encryption, but this depends on your IMAP Server.
Step 2 – Create Mailscanner Workflow
Create a new Workflow and select as trigger “Used in Mailscanner”. This workflow will be executed for every mail one time.
The module you choose have no influence on the Workflow itself, because he is executed without a record. (Variables won’t work, but the module is forced to base on modules.)
You could use “execute Workflow with external record”, “global search”, … tasks and also tasks special for Mailscanner workflows. (“Mark mail as read”, “move email to folder”)
Step 3 – Mailscanner configuration
In Workflow Designer sidebar, click “Mailscanner” and add a new configuration.
A) Fill in a title of Mailscanner and select your previously created IMAP provider. Save this group to load folders
B) Select the folders you want to scan and configure a condition, which filters to process by this configuration. Save this group
C) Workflow Configuration:
- Select a Workflow you want to execute per email
- If you want to get the eml file of current email, insert a Filestore ID , you could use in Worklfow to handle the file
- If you want to store attachments on this email, insert an Filestore ID, the Mailscanner is use as prefix of Filestore IDs from attachment files
- Add Environmental variables, you want to use in Workflow. You are free to use every part of the email within environment variable (Subject, Sender Domain, Sender name, …)
- Save this group
Now you are able to test the configuration / folder / conditions in last group. You will get a list of 5 mails, which would be processes next.
If you are satisfied with the result, activate the configuration. There is a second cronjob configured in vtigercrm, which exclusively handle the Mailscanner feature.
You are also able to trigger the execution manually on top right. You would be asked, how much mails you want to process and if the mails should be marked as done. (Wouldn’t processed again)