# Best Practices

## Recommended setup

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Verify your CSV URL before creating a flow</strong></td><td>Test the URL in an incognito browser window to confirm it's publicly accessible and returns the expected CSV data. This saves time debugging connection issues later.</td></tr><tr><td><strong>Use shareable links for Google Drive files</strong></td><td>Right-click the file → Share → "Anyone with the link" → copy the shareable link. Avoid using the regular Google Drive URL—it won't work with Coupler.io.</td></tr><tr><td><strong>Include authentication headers for API-based CSV exports</strong></td><td>If your CSV source requires authentication (e.g., API key, bearer token), add it to the "HTTP request headers" field. Format: `Authorization: Bearer YOUR_TOKEN` or `X-API-Key: YOUR_KEY`.</td></tr><tr><td><strong>Start with a manual run before scheduling</strong></td><td>Always test your data flow with a manual run to confirm it imports correctly. Only then set up a schedule. A failed manual run prevents scheduling.</td></tr></tbody></table>

## Data refresh and scheduling

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Match your schedule to your CSV update frequency</strong></td><td>If your CSV source updates daily, schedule refreshes daily. If it updates weekly, refresh weekly. Refreshing more often than your source updates wastes quota.</td></tr><tr><td><strong>Use append mode for time-series data</strong></td><td>If you're importing daily or weekly snapshots, use Append mode to keep historical records. This is ideal for tracking metrics over time (revenue, user counts, etc.).</td></tr><tr><td><strong>Use replace mode for current-state data</strong></td><td>If your CSV always contains the latest snapshot and you only care about the current state, use Replace mode to overwrite old data.</td></tr></tbody></table>

## Performance optimization

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Import only the columns you need</strong></td><td>Specify a comma-separated list of columns in the "Columns" field. This reduces processing time and keeps your destination cleaner, especially for large CSVs.</td></tr><tr><td><strong>Split very large CSVs across multiple flows</strong></td><td>If your CSV has millions of rows, consider importing it to BigQuery instead of Google Sheets (which has a 10 million cell limit). Or split the source CSV by time period or category and create separate flows.</td></tr><tr><td><strong>Use query parameters or POST bodies to filter at the source</strong></td><td>If your CSV source supports filtering (e.g., by date range, category, API parameters), use the "URL query parameters" or "Request body" fields to pull only the data you need.</td></tr></tbody></table>

## Common pitfalls

{% columns %}
{% column %}
**Do**

* Test your CSV URL in an incognito window to verify it's public
* Use direct CSV file links, not webpage URLs
* Include API keys or bearer tokens in the HTTP headers field if required
* Start with a manual run before setting up schedules
* Use the Columns field to import only what you need
  {% endcolumn %}

{% column %}
**Don't**

* Share regular Google Drive URLs—always use the shareable link
* Assume a CSV is public without testing it in incognito mode
* Leave sensitive API keys in plain text if sharing your flow setup
* Schedule imports more frequently than your source updates
* Attempt to import multi-million-row CSVs to Google Sheets without splitting them
  {% endcolumn %}
  {% endcolumns %}

{% hint style="danger" %}
**CSV parsing errors are often caused by unescaped quotes in the source file.** If you see "Invalid Opening Quote" errors, download the CSV locally and inspect it in a text editor. Properly formatted CSVs escape internal quotes as `\"` or use consistent delimiters. If the source file is malformed, ask your CSV provider to export with proper escaping.
{% endhint %}
