type.inbound
and not (subject.is_reply or subject.is_forward)
and any([subject.base, body.current_thread.text],
strings.icontains(.,
'research',
'intern',
'fellowship',
'recruit',
'placement',
'opening',
'opportunit',
'stipend',
'hiring',
'per week',
'weekly'
)
)
and any(filter(attachments, .file_type == "pdf"),
any(file.explode(.),
regex.icontains(.scan.ocr.raw,
'research (?:intern|assistant|associate|support|role|position|study|fellow|participant)',
'\binternship\b'
)
and regex.icontains(.scan.ocr.raw,
'\$\s?\d{2,4}\s*(?:/|per)\s*week',
'\$\s?\d{2,4}\s+weekly'
)
and regex.icontains(.scan.ocr.raw,
'@(?:g[a-z]{0,2}mail|hotmail|outlook|yahoo|aol|icloud|proton(?:mail)?|gmx|zoho|live|msn)\.',
'email (?:the )?(?:supervising |fellowship )?(?:professor|mentor)',
'(?:by|via|through) text',
'send (?:a |an )?text',
'text (?:you|me|us|back|the professor|the mentor)',
'reach out[^\n]{0,20}text',
'alternate email'
)
)
)
Playground
Test against your own EMLs or sample data.