locked
Monitor Item : Multiple Filters RRS feed

  • Question

  • Good Afternoon, 

    Been working with the Monitor Item Runbook Activity (Belongs to the Exchange User Integration pack). Noticed that this contains a filter option which allows you refine when the activity triggers. I want to monitor the desired mailbox for a series of keywords in the Subject, and if any emails arrives containing those words further activities will process. 

    I noticed however that if I add multiple Subject Filters, they seem to be combined with Logical AND, and not OR. Is there anything I can do to get around this? or would it be best to simply monitor everything and have a powershell activity filter out any emails that I dont need? Any assistance is appreciated, 

    kind regards, 

    Wednesday, December 27, 2017 3:05 PM

Answers

All replies

  • Hi,

    you can filter in the link after the "Monitor Item" Activity. The conditions there are log OR filters:

    Regards,

    Stefan


    Visit go2azure.eu and my blog at www.sc-orchestrator.eu !

    • Marked as answer by Satbir Bussan Thursday, December 28, 2017 10:09 AM
    Wednesday, December 27, 2017 9:18 PM
    Answerer
  • Good Morning Stefan, 

    Many thanks for your assistance. Deviated a little from the above, where I used a Powershell Script to sort through various Keywords, and set variables to either true or false. Then used the Link properties described above to control the flow through various activities. 

    They both achieve the same thing at this stage, but thinking about maintenance when suddenly this Runbook is monitoring many different kinds of email, not sure which would be easier to manage and maintain. 

    kind regards, 

    Satbir 

    Thursday, December 28, 2017 10:14 AM
  • Hi Satbir,

    yes, I guess a PS Script like below will be easier to maintain:

    [string]$Subjects = "Subject1,Subject2,Subject3,Subject4,Subject5"
    [array]$ASubjects = $Subjects.Split(',')
    $Trigger =$ASubjects -contains "Subject5"


    You can use a Global Variable for the various subjects, so you do not need to edit the Runbook if you want to ass or remove something:

    [string]$Subjects = "{GlobalVariable for Subjects}"
    [array]$ASubjects = $Subjects.Split(',')
    $Trigger =$ASubjects -contains "{Subject from "Get Item"}"

    Regards,

    Stefan


    Visit go2azure.eu and my blog at www.sc-orchestrator.eu !

    Friday, December 29, 2017 7:39 PM
    Answerer