iCloud accounts will connect via IMAP. However, Apple has initiated a security protocol for iCloud accounts where any third party clients that connect to their servers must have two-factor authentication enabled in order to access the data. As a result, any end users connecting to Nylas with an iCloud account will by default be required to enable two-factor authentication and retrieve / use an app password for authentication.
This policy was enacted by Apple on June 15th 2017, and it applies to all third party clients including Microsoft Outlook, etc. Here is an article regarding this announcement: https://www.macrumors.com/2017/05/16/third-party-apps-passwords-icloud-access/
Here is a resource on connection settings for iCloud accounts: https://support.apple.com/en-us/HT202304
To create an App Password, please follow this Apple resource: https://support.apple.com/en-us/HT204397