# CSV Ingestion

*(Premium only)*

CSV support lets you send campaigns to email lists that don’t live in
Gravity Forms entries. You can **add CSV recipients to an existing
batch** (alongside form entries) or **create a batch from CSV only**.

------------------------------------------------------------------------

## How It Works

1.  In the feed settings, check **Add CSV Emails to List**.
2.  Upload a CSV file with **exactly one** column titled `email`
    (lowercase).
3.  Optionally include other columns (e.g., `first_name`, `amount`,
    `expiration_date`).
4.  Map each column to merge tags used in your Subject/Message.
5.  When the control form is submitted, CSV recipients are pulled into
    the batch (by themselves for CSV-only campaigns, or combined with
    form entries).

------------------------------------------------------------------------

## Requirements

- The form that the feed is attached to (the "Control Form") must have a **File Upload** field.
- The **Add CSV Emails to List** setting will only appear in the feed settings if a File Upload field is present on the form.
- The CSV must include a valid **single** `email` column.
- File should be properly formatted with headers in the first row.

------------------------------------------------------------------------

## Allowing CSV Uploads (Snippet)

Some WordPress setups block CSV uploads by default. You can allow them
with a small snippet (use with care and only if you trust who can upload
files):

``` wp-block-code
function allow_csv_uploads( $mime_types ){
    $mime_types['csv'] = 'text/csv';
    return $mime_types;
}
add_filter( 'upload_mimes', 'allow_csv_uploads' );
```

Security Note

- Use this snippet with care — CSV files can contain unexpected data.
- Install it only through a trusted method (like a snippets plugin or
  your theme’s `functions.php`).
- **Deactivate it once you’ve uploaded your CSV and created the batch**
  to minimize security implications.

This ensures you can work with CSV uploads when needed, but without
leaving the door open unnecessarily.

------------------------------------------------------------------------

## Tips

- Use **Merge Tag Fallbacks & CSV Column Mapping** to handle missing
  data gracefully.
- Double-check column headers for typos — mismatches will leave values
  blank.
- Combine CSV recipients with form entries when you want a mixed
  campaign, or leave the target form blank for CSV-only campaigns.

------------------------------------------------------------------------

CSV ingestion makes it simple to reach lists you already maintain
elsewhere without re-entering data into Gravity Forms.
