> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gmail IMAP Import Configuration Using OAuth 2.0

> Walk through Gmail IMAP import configuration in ABBYY FlexiCapture using OAuth 2.0: sign in to Google, pick a mailbox folder, and test batch creation.

This section provides details on configuring Gmail import using OAuth 2.0 credentials for IMAP image import profiles.

To configure Gmail import using OAuth 2.0, do the following.

1. Create a project and upload it to the PreProd server.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0012.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=de2cc3f5f2a2f976147b232b2b7df063" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="840" height="114" data-path="images/flexi-capture/clip0012.png" />

2. Configure IMAP Image Import Profile using Gmail.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0013.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=7f7a430a67a113720d58f4187bd02d6c" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="516" height="293" data-path="images/flexi-capture/clip0013.png" />

3. Select the source for image import.
4. Open the image import profile configuration.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0009.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=eaf9f16ab892d3fd788d2add4eb10ff4" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="600" height="479" data-path="images/flexi-capture/clip0009.png" />

5. Enter your Gmail ID.
6. Click Sign-in to initiate OAuth authentication. A Google OAuth window will appear.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0014.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=1c0547fb7cf6a4df996e6ca82df553b2" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="763" height="386" data-path="images/flexi-capture/clip0014.png" />

7. Enter your Gmail account and click Next.
8. Enter your password.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0007.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=fe2e55d715b2ec7652cd90ff0aad0b4c" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="870" height="393" data-path="images/flexi-capture/clip0007.png" />

9. Review the trust message and click **Continue**. If authentication is successful, a message saying ‘*Thank you for allowing*’ will appear. The OAuth popup will close, returning you to the project setup station.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0016.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=351d40ee288156d20deced56e4b86041" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="593" height="366" data-path="images/flexi-capture/clip0016.png" />

10. Finalize IMAP Profile settings.
11. Set *Type of encrypted connection* to *Auto* and click **OK**.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0017.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=b2141a759cfd57ed75f175f1c71a0f59" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="563" height="412" data-path="images/flexi-capture/clip0017.png" />

12. Click **Browse** to access the Gmail folder hierarchy.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0004.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=9dd77c915bc1e208b34fbfcec91469f3" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="566" height="388" data-path="images/flexi-capture/clip0004.png" />

13. Select the folder where documents will be dropped for processing.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0003.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=d25de5bacf37add1c90a4c330e79a88c" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="774" height="377" data-path="images/flexi-capture/clip0003.png" />

14. Complete the remaining IMAP profile steps.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0001.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=74e3b53d9bd68e33bb9e29f24bfa4024" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="631" height="231" data-path="images/flexi-capture/clip0001.png" />

15. Enable **Hotfolder** toggle for the project from the *Admin & Monitoring Console*.
16. To test Import, send an email with an attachment to the selected Gmail folder.
17. Confirm that the document is processed and a batch is created successfully.

<img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/clip0002.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=7f8f4ebaca3ec7fc4de51e36f5790de9" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="863" height="144" data-path="images/flexi-capture/clip0002.png" />
