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

# Generate files and analyze data

> Analyze data, generate files, and build from the results directly in the project chat.

Ask Lovable to analyze data, create documents, transform files, and generate downloadable outputs directly in the project chat. Lovable writes and runs scripts in an isolated environment, then returns the result as a generated file. Your project's source code is never affected.

<Note>
  To create Markdown, text, CSV, or JSON files without a project, use [Chats](/features/chats#create-files-in-a-chat).
</Note>

You can build on top of the result in the same conversation. After Lovable analyzes your data or generates a file, ask it to create app features based on what it found, for example by turning a spreadsheet into a dashboard or a product spec into a working app flow.

<Note>
  On projects using the built-in backend (Cloud), code execution has access to your database only if the **Read database** and **Change data** permissions are set to **Always allow**. See [Cloud](/features/cloud) for more information.
</Note>

## What you can do

Upload a CSV, spreadsheet, or any supported file and ask Lovable to analyze, transform, or combine it with other data sources, such as your database or connected tools.

| Use case | Example prompt |
| :- | :- |
| Data analysis | *Analyze the sales data in my uploaded CSV and tell me the top 5 products by revenue.* |
| PDF report | *Generate a PDF report summarizing this quarter's metrics from my database.* |
| CSV export | *Export all orders from the last 30 days as a CSV file.* |
| Data transformation | *Convert the uploaded JSON file to a formatted Excel spreadsheet.* |
| Chart generation | *Create a bar chart showing monthly signups from my users table.* |
| Slide deck | *Create a presentation summarizing the key findings from this dataset.* |
| Diagram | *Generate an architecture diagram for my app as a Mermaid flowchart.* |
| Image processing | *Resize these product images to 800x600 and convert them to WebP.* |
| Database query | *How many users signed up this week? Break it down by day.* |
| Data import | *Import the uploaded CSV into my products table.* |
| Connected tools | *Read my open Linear issues and generate a status report as a PDF.* |
| Build from a file | *Turn this Excel tracking sheet into a web app with dashboards and user login.* |
| Build from a spec | *Read this PDF product spec, summarize the requirements, and build the first version.* |
| Build from analysis | *Analyze my user drop-off data, then build an improved onboarding flow based on what you find.* |

## Presentations and slide decks

Lovable creates presentations in two ways:

* **As a web app**: Ask for a presentation and Lovable builds the deck as a web app in your project. Slides present fullscreen in the browser, you refine individual slides in the project chat, and you can [publish](/features/publish) the deck and share its link like any other project.
* **As a downloadable file**: Ask for a PDF or `.pptx` file and Lovable generates it like any other file on this page. Download it from the project chat or the [**Files** tab](#manage-generated-files).

```text wrap theme={null}
Create a 10-slide pitch deck for my meal-planning startup: problem, solution, market, product, business model, traction, team, and the ask.
```

## How it works

Describe what you need in the project chat. You do not need to configure commands, write scripts, or choose tools yourself. Lovable decides when to run code and when to build features based on your request.

Lovable typically follows this flow:

1. It reads the files, data, or context you provide.
2. It writes and runs the scripts needed to complete the task.
3. It checks the result and fixes issues before delivering, for example layout problems in PDFs or missing data in generated files.
4. It returns the result as inline analysis, a generated file, or both.
5. It keeps that context in the same conversation so you can refine the output or build on it.

The more specific you are about structure, formatting, tone, data sources, and the result you want, the better the output will be.

## What Lovable can run

Lovable writes and executes scripts in an isolated Linux environment. If something can run in a Linux shell, Lovable can likely run it.

Common tools are preinstalled, for example:

| Category | Examples |
| :- | :- |
| Languages | Python 3, Node.js, Bun, Deno, Bash |
| Data processing | pandas, NumPy, SciPy, DuckDB |
| Visualization | matplotlib, Pillow |
| Database | psql for database access |
| Utilities | curl, jq, and standard Unix tools |

If a task needs an additional package or command line interface (CLI) tool, Lovable can install it automatically.

## Supported file types

Lovable can read files you upload and generate new files in the following formats:

| Category | Formats |
| :- | :- |
| Documents | PDF, DOCX, PPTX, TXT, Markdown |
| Spreadsheets | CSV, XLSX, XLS |
| Images | PNG, JPEG, WebP, SVG, GIF, AVIF, HEIC |
| Video | MP4 |
| Audio | MP3, M4A |
| Code and data | HTML, JSON, JS, TS, Python |
| Diagrams | Mermaid |
| Archives | ZIP, GZIP, TAR |

Files you upload for analysis can be up to **20 MB** each on the Free plan, **256 MB** each on paid plans, and **1 GB** on Enterprise, with up to 10 files per message.

Generated files are stored in your project's **Files** area, not in your project's code, so they are not subject to these upload limits or to the [10 MB per-file code limit](/features/projects/chat).

## Manage generated files

When Lovable creates a file in a project, it appears in the project chat as a file card. You can open it directly from the project chat, or open the **Files** tab to search, preview, and download all files created in your project, or reference a file directly in the project chat.

You can refine generated files through follow-up prompts. When a file is revised, Lovable creates and stores a new version (for example, `report_v2.pdf`) so you can compare them.

Files are securely stored with the project until you delete them.

In the **Files** tab's grid view, images display at their real proportions. New files appear in the tab as Lovable creates them. To find a file, use the search box, filter by type with **All**, **Images**, **Videos**, and **Documents**, sort by **Updated**, **Name**, or **Size**, or switch between **Grid view** and **List view**.

From a file's actions menu, you can:

* **Add to chat**: reference the file in your next request.
* **Add to collections**: add the file to one or more [collections](#collections).
* **Download**: save the file to your device.
* **Copy link**: copy a link to the file.
* **Copy to clipboard**: copy an image so you can paste it elsewhere. Available for images only.
* **Delete**: remove the file from the project. You can also ask Lovable to delete a file. Deleting a file cannot be undone.

### Upload your own files

You can add your own files to a project alongside the ones Lovable generates, for example a brand guide, a dataset, or images for Lovable to use. Select **New → Upload new files**, or drag files onto the **Files** tab. You need edit access to the project to upload files.

Uploaded files are stored in the project's **Files** tab, not in its code. Folders are not supported, so choose individual files. Each file can be up to 20 MB on the Free plan, 256 MB on paid plans, and 1 GB on Enterprise, the same limits as for [files you attach in the project chat](/features/projects/chat#attach-files-as-context).

### Collections

A collection is a named group of files in a project, available on all plans. Use collections to keep related files together, for example the assets for one campaign or the exports for one report. A file you add to a collection stays in the **Files** tab and can belong to several collections at once.

* **Create a collection**: select **New → Create new collection**, or select **Create collection** under **Collections**.
* **Add files to a collection**: open the collection and select **Add files**, or open a file's actions menu and select **Add to collections**.
* **Rename or delete a collection**: use the collection's actions menu. Deleting a collection does not delete its files.
* **Remove a file from a collection**: open the collection, then open the file's actions menu and select **Remove from collection**. The file stays in the **Files** tab.

Each project can have up to 100 collections, and each collection up to 500 files. You need edit access to the project to change collections.

You can also ask Lovable to organize your files into collections. Collections appear in the project chat as cards you can open. Select **Add to chat** on a collection to reference it in your next request.

## Tips for best results

* **Be specific about formatting**\
  *"Create a PDF report with a cover page, section headers, and a summary table"* produces better results than *"Make a report"*.
* **Name your output**\
  If you want a specific filename, ask Lovable to add it, for example *"Save it as `q1-summary.pdf`."*
* **Iterate**\
  If the first result is not perfect, describe what to change. Lovable keeps context from prior outputs.
* **Chunk large datasets**\
  For very large files, ask Lovable to process a subset first, then scale up.
* **Use connected tools as data sources**\
  Ask Lovable to pull data from tools like Slack, Linear, or Notion, for example *"Summarize the last 50 messages from my Slack feedback channel and generate a report"*.
* **Combine steps**\
  You can ask for analysis and file generation in one prompt, for example *"Analyze this CSV and export the top 10 rows as an Excel file."*


## Related topics

- [Chat with Lovable across your workspace](/features/chats.md)
- [Lovable changelog](/changelog.md)
- [Chat connectors: Connect your tools to Lovable using MCP servers](/integrations/chat-connectors.md)
- [Connect your app to Google Workspace](/integrations/google-workspace.md)
- [Connect your app to AWS S3](/integrations/aws-s3.md)
