https://prefect.io logo
Title
a

afausse

03/22/2020, 5:54 PM
Hi All, I need to trigger a workflow when a message arrives (on an imap server). Is it possible to trigger a workflow based on message arrival ?
j

Jeremiah

03/22/2020, 6:19 PM
Hi @afausse, welcome! We have written a PIN describing a first-class solution to event-driven workflows that we hope to implement in the near future: https://docs.prefect.io/core/PINs/PIN-14-Listener-Flows-2.html
Until then, our recommendation is to have a potentially long-running task that periodically polls for the message and returns successfully when it arrives, allowing the rest of the workflow to complete.
Alternatively, if you use Prefect Cloud you could hit the Cloud API from any service to kick off a run at any time.
:upvote: 1
a

afausse

03/22/2020, 9:20 PM
Thank you very much.