---
schema_version: "1"
id: 084cf2f6a1d81b707cb4282504a479104385b39190c97ee59efaadbd73160aee
title: Finalize Flow Retrieving File ID from Email Address
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-ae/loan-agent/guides/aes-finalize-flow-retrieving-file-id.md
canonical_url: https://developer.salesforce.com/docs/ai/loan-agent/guide/aes-finalize-flow-retrieving-file-id.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bf6338a5bc78488da6c649ed3d1ba6a913b1a21d5091ab8ae19c4f7754aca178
products:
  - Loan Prequalification Agent
  - data-ae
---
# Finalize Flow Retrieving File ID from Email Address

Make sure your flow works as expected, and debug if necessary. Learn more about [testing or troubleshooting with the Flow Builder debugger](https://help.salesforce.com/s/articleView?id=platform.flow_test_debug.htm&type=5).

## 1. Create Test Contact in Salesforce

1. On **Salesforce**, go to the **Contacts** tab.
2. Click **New Contact**.
3. Enter minimal details (only an email address is required).
4. Attach a **bank statement**.
5. Click **Save**.

## 2. Debug the Flow

1. Return to **Flow Builder**.
2. Click the **Debug** button.
3. **Input Parameters**:

   - Only populate: `contact_email` parameter.
   - Enter the same email address used when you created the contact on step 1.

4. Click **Run**.

## 3. Confirm Flow Execution

Confirm the flow runs successfully by checking the debug interface.

1. Confirm that the flow execution completes without errors, and that it retrieves the Document ID correctly.
2. Confirm that given an email address, the flow:

   - finds the contact record
   - retrieves the contact ID
   - looks up the content document
   - returns the document ID

## Next Step

Continue to create additional actions for the agent to use with this document ID: [Create additional actions for the agent to use with this document ID](https://developer.salesforce.com/docs/ai/loan-agent/guide/aes-create-apex-class.md).
