ImapAttachmentSensor

IMAP

Waits for a specific attachment on a mail server.

View Source

Last Updated: May. 7, 2021

Access Instructions

Install the IMAP provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

attachment_namestrThe name of the attachment that will be checked.
check_regexboolIf set to True the attachment's name will be parsed as regular expression. Through this you can get a broader set of attachments that it will look for than just only the equality of the attachment name.
mail_folderstrThe mail folder in where to search for the attachment.
mail_filterstrIf set other than 'All' only specific mails will be checked. See :py:meth:`imaplib.IMAP4.search` for details.No role entry for "py:meth" in module "docutils.parsers.rst.languages.en". Trying "py:meth" as canonical role name.Unknown interpreted text role "py:meth".
conn_idstrThe connection to run the sensor against.

Documentation

Waits for a specific attachment on a mail server.

Example DAGs

Improve this module by creating an example DAG.

View Source
  1. Add an `example_dags` directory to the top-level source of the provider package with an empty `__init__.py` file.
  2. Add your DAG to this directory. Be sure to include a well-written and descriptive docstring
  3. Create a pull request against the source code. Once the package gets released, your DAG will show up on the Registry.

Was this page helpful?