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

# How to connect

> How to connect the File from Email data source to Adriel: send a one-time handshake email, then configure a dedicated inbox to ingest CSV or XLSX files delivered as attachments or download links.

File from Email ingests CSV or XLSX files that arrive at a dedicated mailbox managed by Adriel. It supports two delivery modes, locked at creation: attachment mode processes files attached directly to incoming email, and download-link mode follows URLs embedded in the email body. Typical uses include partner-delivered reports, vendor data feeds, and scheduled exports from systems that already email out tabular data — no API credentials are required, because the inbox and authentication are managed centrally.

## Before you connect

The following are required:

* A sending email address that will deliver files to the workspace inbox. Send one handshake email from this address to `automation-#####@adriel.ai`, where `#####` is the workspace ID found in the URL after `accountId=` or `userAccountId=` (for example, `https://app.adriel.com/#/connection?accountId=#####&userAccountId=#####...`).
* A consistent sender allow-list, subject filter, or file-name fragment to identify the intended emails.
* Confirmation of the delivery mode (attachment or download link), which is locked at creation.
* For the upsert update method: the name of the column used as the unique key.
* For download-link mode: the sending platform must whitelist Adriel's static proxy IP `3.37.49.210`. Without whitelisting, the file cannot be downloaded.
* Total attached file size per email must not exceed Gmail's 25 MB limit.

## Connect File from Email

<Steps>
  <Step title="Add the data source and set the sender">
    On the **Data Sources** page, search for **File from Email** and select it. Enter the **Sender's Email Address** and click **Submit**. To allow multiple senders, separate each address with a comma.
  </Step>

  <Step title="Choose the file delivery type">
    Set the **File Delivery Type**:

    * **Attachment**: choose this if the file is included directly in the email.
    * **Download Link**: choose this if the file is provided as a link inside the email body. The sending platform must whitelist Adriel's static proxy IP `3.37.49.210`, or the file cannot be downloaded.
  </Step>

  <Step title="Name the data source and set the file type">
    Enter a **Name** for the data source — any distinguishable label that appears on the dashboard — and choose the **File Type** (CSV or XLSX) that will be sent through email.
  </Step>

  <Step title="Set the optional fields">
    Configure the optional fields as needed:

    * **Alternative Channel Name**: customize the channel display name. See the [Alternative Channel Name guide](https://academy.adriel.com/en/how-to-set-alternative-channel-name-for-file-db-data-source) for the format that triggers icons.
    * **Alternative Channel Icon**: attach a file to customize the icon displayed.
    * **File Name to Filter**: a word found within the file name, used to select the correct file. Matching is case-sensitive.
    * **Header Row**: if the data does not start at row 1, enter the row number where the column headers are.
    * **Data Update Method**: choose how new data is stored — **Append** (default) adds the new file's data to the end of the existing table; **Replace** completely replaces the saved table with the new file's table; **Upsert** merges data using the required **Unique Identifier Columns** field, updating a row when a matching value exists and adding a new row when it does not.
  </Step>

  <Step title="Submit">
    Click **Submit** to complete the connection. The refresh schedule runs twice daily, so emails sent to the inbox typically become available after the next 1:00 AM or 1:00 PM (KST) refresh.
  </Step>
</Steps>

## What gets imported

Each new matching email's payload is parsed into rows and merged into a per-data-source cache table. The first row of every file is treated as the header; numeric columns become metrics and text columns become breakdowns. When a date column is mapped, dashboard date filters apply; without one, all rows are treated as a single snapshot. For XLSX workbooks, only the first non-empty sheet is read.

For the complete field list and field-level behavior, see the [File from Email data reference](/data-sources/a-f/file-from-email/data-reference).

## Troubleshooting

<AccordionGroup>
  <Accordion title="NO_FILE_MATCHING_SETTING at creation">
    Attachment mode requires at least one matching email to already exist in the mailbox before the data source can be saved. Send or trigger a sample email that matches the sender and subject filters, then retry.
  </Accordion>

  <Accordion title="NEED_WHITELIST_IP_FOR_DOWNLOAD_LINK">
    The host serving the linked file returned a 403 to Adriel's request because it blocks requests by IP. Add Adriel's static proxy IP `3.37.49.210` to the host's allow-list, then retry.
  </Accordion>

  <Accordion title="INVALID_CSV_MISMATCHED_COLUMN_COUNT or CSV_COLUMN_TYPE_MISMATCHED">
    A newly arrived file has a different column count or type than the cached schema, so the data source disconnects until the schema is reconciled. Either correct the upstream export to match the original schema, or recreate the data source against the new schema.
  </Accordion>

  <Accordion title="Only one sheet of an XLSX file appears">
    Only the first non-empty sheet of a multi-sheet workbook is ingested. Consolidate the relevant data into the first sheet, or split the workbook into separate files.
  </Accordion>

  <Accordion title="INVALID_OPTION_COMBINATION when saving">
    Upsert mode was selected without specifying a unique-key column. Provide the unique key in **Unique Identifier Columns**, or switch the update method to append or replace.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="File from Email data reference" href="/data-sources/a-f/file-from-email/data-reference">
    Fields, update methods, and limits for File from Email.
  </Card>

  <Card title="File from Email FAQs" href="/data-sources/a-f/file-from-email/faqs">
    Common questions and expected behaviors for the File from Email data source.
  </Card>

  <Card title="How to connect File from OneDrive" href="/data-sources/a-f/file-from-onedrive/how-to-connect">
    Ingest CSV or XLSX files stored in OneDrive.
  </Card>

  <Card title="How to connect File from SFTP" href="/data-sources/a-f/file-from-sftp/how-to-connect">
    Ingest tabular files delivered to an SFTP server.
  </Card>
</CardGroup>
