Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

Trigger job based on contents of incoming/outgoing emails

Highlighted
One Star

Trigger job based on contents of incoming/outgoing emails

What do i need to do in TOSDI 6.2.1 to trigger a job to run based on the contents (i.e. "Sent from", "Sent to", "Mail subject", "Mail body", etc.) of incoming or outgoing emails?
Highlighted
Community Manager

Re: Trigger job based on contents of incoming/outgoing emails

Hi 
Create a main job, use tPOP to fetch emails from server and then read the mails with tFileInputMail, parse the contents and trigger another job using runIf connector based on the condition. eg:
tPOP
 |
onsubjobok
 |
tFileInputMail--main-tJavaRow--runIf--tRunJob
tJavaRow:
if(input_row.sent_from.equals("user@talend.com")){
globalMap.put("iscontinue",true);
}else{
globalMap.put("iscontinue",false);
}
set the condition of runIf link as:
(Boolean)globalMap.get("isContinue")
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog