I feel like the best way to do what you want is with a Condition
I am making a few assumptions..
1. "output contains x" means that your Standard Output of some task is "x"
2. notification, in this context would be an email
3. you are using v9.4.5 or above and 9.5 or 9.6 looks like 9.4.5 (that is what I am using)
The 1st assumption has to exist for what I am about to suggest but the second one is maybe irrelevant. The "notification" could really be anything since this is where the condition would exist
Here is my suggestion...
Task #1 is the thing that creates your output of "x"
Task #2 is an Email Task for when the output for Task #1 = "x"
Task #3 is an Email Task for when the output for Task #1 = "y"
Add additional tasks for additional conditions
After you create those tasks you will need to create your conditions. Open Task #2 and Click on "Conditions" at the top. Then select "Add"
Description Tab = whatever you want, I would use the name of Task #1 and the fact that we are looking for "X"
Conditions tab - Click Add - Again Add a Description - Then Click the VisualCron tab
Choose Specific - Select your job name and the Task #1 name -
Down below for 'Output' is x
- do not add any quotes or double quotes unless those characters are literally in the output.
Click Ok and Ok
Make sure you check mark the condition for that task
Create a another condition for the 3rd task for output = y
The condition is an inclusive one. Meaning, Task #2 will run IF Task #1 output = x
Task #3 will run if Task #1 output = y
This way will give you one notification for "x" and one for "y"
If the output could contain "x" and "y" and you only want one notification then your first, and only condition, should not be an "is" but a "contains"
Here is an example
I have a job that looks for open ports on a server. It runs through a list of 20 ports. All should be connected. If the reply for the "Check Port" task results in "Not Connected" an email is sent
Notice the "?" icon under conditions
My "Email Results" task includes references to the previous task, the Read File Log". You can do that too by simply using {TASK(PrevTask|StdOut)}
The previous Task would be whatever thing happened right before the email task
The condition looks like this
You will see my Condition is looking at a file. But I do not have to do that. I can look at the last output instead like this
If the output from the "Check port-looped from list" task results in "Not Connected" then the email WILL send
If the output is Anything else then the email will NOT send
If I also wanted to send an email when the output was "failed" then I could do this
Notice the option changed from "Is" to "Contains"
So, to recap. Use a condition. Use "Is" if you want a specific output to generate a specific email and use "contains" if you want a list of outputs to send a single email