Thread
#prefect-community
    a

    afausse

    2 years ago
    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 ?
    Jeremiah

    Jeremiah

    2 years ago
    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.
    a

    afausse

    2 years ago
    Thank you very much.