> For the complete documentation index, see [llms.txt](https://docs.coupler.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coupler.io/destinations/categories/spreadsheets/csv.md).

# CSV

Generate a stable HTTPS URL that serves your data as CSV. Perfect for spreadsheets, BI tools, databases, and any app supporting CSV imports via Coupler.io.

The CSV destination in Coupler.io generates a stable, publicly accessible URL that serves your data as a CSV file. Every time your data flow runs, the URL updates with fresh data — making it easy to import into spreadsheets, BI tools, databases, or any application that supports CSV.

CSV is one of the most universal data formats. If your target tool can read a CSV file or fetch data from a URL, this destination will work.

## Why use CSV as a destination?

* **Universal format** — virtually every spreadsheet, database, BI tool, and programming language can read CSV files
* **Stable URL** — the link stays the same between runs, so you configure your target tool once and data refreshes automatically
* **No authentication on the destination side** — no database credentials, no OAuth, just a URL with an access token
* **Excel-friendly mode** — built-in BOM (byte order mark) support ensures special characters display correctly when opening the file in Excel
* **Works with any Coupler.io source** — pull data from HubSpot, Shopify, Google Ads, Airtable, or any other supported source and export it as CSV

## Prerequisites

* Your target tool or script must be able to import CSV files or make GET requests to an HTTPS URL

## Quick start

{% hint style="success" %}
The CSV destination requires almost no configuration. Focus on getting your source data right — once you generate the URL, any tool that reads CSV can consume it immediately.
{% endhint %}

## How to connect

{% stepper %}
{% step %}
**Add a source to your data flow.** Log in to Coupler.io and create a new data flow. Select your data source (for example, HubSpot, Shopify, or Google Analytics) and configure it to pull the data you need.
{% endstep %}

{% step %}
**Select CSV as the destination.** In the destination step of your data flow setup, choose **CSV** from the list of available destinations.
{% endstep %}

{% step %}
**Generate the integration URL.** Click **Generate link**. Coupler.io will create a unique URL for your data flow. This URL is stable — it stays the same across every run, while the data it serves updates each time the flow runs.
{% endstep %}

{% step %}
**Run the data flow.** Click **Save and Run** to execute the data flow for the first time. This initial run is required to populate the URL with data. The CSV endpoint will return a 404 error until at least one successful run has completed.
{% endstep %}

{% step %}
**Copy and use your URL.** Once the run completes, copy the generated URL. Paste it into Excel, Google Sheets (via IMPORTDATA), a Python script, or any other tool that consumes CSV. The data will be available immediately.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
If you ever need to invalidate the current URL (for example, if the access token was exposed), click **Update** to generate a new link. Any integrations using the old URL will need to be updated.
{% endhint %}

## Supported features

| Feature              | Supported |
| -------------------- | --------- |
| Replace mode         | Yes       |
| Append mode          | No        |
| Automatic scheduling | Yes       |
| Type enforcement     | No        |
| Templates            | No        |

## CSV common issues

### Connection issues

<details>

<summary>404 Not Found when accessing the CSV URL</summary>

This is the most common issue with the CSV destination. The URL exists but returns a 404 error because the data flow has never completed a successful run.

**Fix:** Go back to your data flow in Coupler.io and click **Save and Run**. Wait for the run to complete successfully. Once at least one run has finished, the URL will return data.

{% hint style="danger" %}
Do not share or use the CSV URL in any downstream tool until the first successful run is complete. The 404 will persist until data has been written to the endpoint.
{% endhint %}

</details>

<details>

<summary>URL stops working or returns 404 after previously working</summary>

If the URL was working and then stopped, the access token may have been regenerated. This happens when someone clicks the **Update** button in the destination settings, which creates a new URL and invalidates the old one.

**Fix:** Open the data flow in Coupler.io, go to the destination settings, and copy the current URL. Update any tools or scripts that were using the old link.

</details>

### Data issues

<details>

<summary>Special characters appear garbled when opening in Excel</summary>

If accented characters, currency symbols, or non-Latin text appear as garbled characters when you open the CSV file in Microsoft Excel, the Excel-friendly mode (BOM) may be turned off.

**Fix:** Open your data flow's destination settings and make sure **Excel-friendly mode** is enabled. This adds a byte order mark (BOM) to the file, which tells Excel to interpret the file as UTF-8. Re-run the data flow after enabling it.

{% hint style="info" %}
This setting is enabled by default. If you previously disabled it and are opening the file in Excel, turn it back on.
{% endhint %}

</details>

<details>

<summary>Column headers are missing from the CSV file</summary>

If your CSV file starts directly with data rows and has no header row, the **Include headers** setting may be turned off.

**Fix:** Open your data flow's destination settings and make sure **Include headers** is enabled. Re-run the data flow. The first row of the CSV file will contain column names.

</details>

<details>

<summary>Fields containing commas or line breaks break the CSV structure</summary>

If field values contain commas, double quotes, or line breaks, they should be properly escaped in the CSV output. If a downstream tool is not parsing the file correctly, the issue is likely in how that tool handles CSV quoting.

**Fix:** Verify that your consuming tool supports RFC 4180-compliant CSV parsing. Most modern tools (Excel, Google Sheets, Python's csv module, pandas) handle quoted fields correctly. If you are using a custom parser, make sure it respects double-quote escaping.

</details>

### Permission errors

<details>

<summary>Access token is invalid or expired</summary>

The CSV URL includes an access token as a query parameter. If this token has been invalidated (by clicking **Update** in destination settings), anyone using the old URL will receive an authentication error.

**Fix:** Retrieve the new URL from your data flow's destination settings and distribute it to any users or tools that need access. Treat the access token like a password — avoid sharing it publicly.

{% hint style="warning" %}
The access token in the CSV URL grants read access to your exported data. Do not post the full URL in public forums or issue trackers.
{% endhint %}

</details>

## CSV FAQ

<details>

<summary>What is the CSV destination used for?</summary>

The CSV destination generates a stable HTTPS URL that serves your Coupler.io data as a CSV file. You can use this URL to feed data into spreadsheets, BI tools, databases, AI tools, custom scripts, or any application that supports CSV import or HTTP data fetching.

</details>

<details>

<summary>Does the URL change every time the data flow runs?</summary>

No. The URL stays the same across every run. Only the data it serves is updated. This means you can configure your downstream tool once and it will always fetch the latest data. If you click **Update** in the destination settings, a new URL is generated and the old one is invalidated.

</details>

<details>

<summary>Why do I get a 404 error when I open the CSV URL?</summary>

The URL returns a 404 until the data flow has completed at least one successful run. Go to your data flow, click **Save and Run**, and wait for the run to finish. After that, the URL will return data.

</details>

<details>

<summary>What does the Excel-friendly mode (BOM) setting do?</summary>

When enabled, this setting adds a byte order mark (BOM) at the beginning of the CSV file. The BOM tells Microsoft Excel to interpret the file as UTF-8, which ensures that special characters — accented letters, currency symbols, non-Latin scripts — display correctly. This setting is on by default. If you are not opening the file in Excel, you can safely disable it.

{% hint style="info" %}
Some tools may display the BOM as an invisible character at the start of the file. If this causes issues in your downstream tool, disable Excel-friendly mode in the destination settings.
{% endhint %}

</details>

<details>

<summary>What does the Include headers setting do?</summary>

When enabled (the default), the first row of the CSV file contains column names. If you disable this setting, the file starts directly with data rows. Most tools expect headers in the first row, so keep this on unless your consuming tool specifically requires raw data without headers.

</details>

<details>

<summary>Is there an Append mode for the CSV destination?</summary>

No. The CSV destination only supports Replace mode — each run overwrites the data at the URL with the latest export. If you need to accumulate historical data over time, consider using a database destination like BigQuery or PostgreSQL instead.

</details>

<details>

<summary>Can I use the CSV URL with Google Sheets?</summary>

Yes. In Google Sheets, use the `=IMPORTDATA("your-csv-url")` formula to pull data directly from the CSV URL. The data will refresh each time Google Sheets recalculates or when you manually trigger a refresh.

</details>

<details>

<summary>Can any Coupler.io source send data to the CSV destination?</summary>

Yes. The CSV destination works with any source available in Coupler.io, including HubSpot, Google Ads, Facebook Ads, Pipedrive, Airtable, and more. You can also combine multiple sources in a single data flow using Join, Append, or Aggregate transformations.

</details>

<details>

<summary>Is the CSV URL secure?</summary>

The URL includes an access token that controls who can read the data. Anyone with the full URL can access the exported data, so treat it like a password. Avoid posting it in public places. If the token is compromised, click **Update** in the destination settings to generate a new URL.

</details>

<details>

<summary>How do I test that my CSV URL is working correctly?</summary>

Paste the URL into a browser — it will download the CSV file. You can also use an HTTP client like Postman or curl to fetch the data. If you see a 404, the flow hasn't run yet, or the URL has been regenerated.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coupler.io/destinations/categories/spreadsheets/csv.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
