Can vRO monitor a Mailbox ?
Can it read the email that are received on the mailbox ??
And Based on Email Reading
Can it initiates a workflow ?
Yes to all using the SMTP plugin.
You can use a scheduled workflow to poll a mailbox via POP3 or IMAP
You can retrieve email messages and extract the content
You would need to write a parser of some kind to process the email content
Once you have a parser you can trigger workflows to be executed based on the content
I've done all of this before and it works fine
-Eoin
Yes to all using the SMTP plugin.
You can use a scheduled workflow to poll a mailbox via POP3 or IMAP
You can retrieve email messages and extract the content
You would need to write a parser of some kind to process the email content
Once you have a parser you can trigger workflows to be executed based on the content
I've done all of this before and it works fine
-Eoin
Hi Eoin,
Do you have any code examples for parsing the emails? Specifically I just want to filter on the subject and certain words in the content of the email reply.
Thanks.
It depends on the format tbh. If you are just looking for keyword presence then you can do a lot with Regex matches or String.indexOf calls.
E.g., if you wanted to check for the word Linux in the subject line you can do this
var subjectContainsLinux = (mail.subject.indexOf("Linux") > -1)
You can do similar things with the mail content depending on the format. If the mail content is a MultiPart and the MimeType is say "text/html" then you'd have to be able to parse the HTML to get the raw text or identify specific tags. If you google JS HTML parser you'd probably find examples around for free.
In my case I had agreed a specific data exchange format with the client so emails that didn't meet the format criteria could be discarded. The format was similar to Java properties files but with definitive block start and end tokens (originally intended to permit multiple blocks in the mail body, e.g.,
START-TOKEN
propertyKey1=propertyValue
propertyKey2=propertyValue
END-TOKEN
Anyway, HTH