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

# Create folders and articles

> Create folders, write or import articles, preview how the agent reads them, publish, and restore earlier versions.

Use this page when you are adding knowledge to Popcorn: a new returns policy, a delivery FAQ, a page from your website, or a PDF from your team. Everything here happens on **Knowledge** in the sidebar.

## Before you start

* Articles land in a folder. Onboarding created **Business Knowledge Base**; create more folders if different agents need different knowledge, because agents are given access folder by folder.
* Owners, Admins and Managers can create, edit, publish and delete articles. Agents and Viewers can only read them. **Publish** needs permission to publish; see [Team and roles](https://docs.trypopcorn.ai/settings/team-and-roles.md).

## Create a folder

**1. Click New folder**

In the header of **Knowledge**, click **New folder**.

**2. Name and describe it**

Enter a **Name** (for example, *Shipping and returns*) and a **Description**. The description is shown to the agent so it can decide when to search this folder, so write what kind of questions it answers: *Delivery times, shipping fees, and how to return or exchange an order.*

**3. Create it**

Click **Create folder**. You see **Folder created** and the page opens inside the new folder, so anything you add next lands there.

Each folder becomes a search the agent can run, so the name has to follow a few rules. When one is broken the field shows an error and the dialog stays open so you can fix the name and try again.

| Rule | What you see |
| - | - |
| Use English (Latin) letters, numbers and common symbols. Arabic and other scripts are refused; the description can be in any language. | **Use English letters and numbers, starting with a letter.** Popcorn may add a suggested name: *For example "…"*. |
| Keep it short. Popcorn converts the name before using it: spaces become underscores and symbols are spelled out (`&` becomes *and*, `-` becomes *dash*), and the result must fit in 49 characters. A name of up to 49 letters, numbers and spaces always fits. | The same message. |
| Do not use a name that is only a reserved word: system, admin, root, api, function, call, execute, eval, class, constructor or prototype. | The same message. |
| Include at least one letter or number. | The same message. |
| Each name can be used once. | **A folder with this name already exists.** |
| Enter a name. | **Enter a folder name.** |

To change a folder later, pick it in the folder picker, open the **⋯** menu next to the picker and choose **Rename folder**. You can change the name and the description, then click **Save folder**. Changes to a name or description reach an agent that already uses the folder the next time you save and publish that agent; see [Connect knowledge to an agent](https://docs.trypopcorn.ai/knowledge/connect-to-agents.md).

> [!WARNING]
>
> **Delete folder** deletes every article in the folder and your agent stops using them right away. The confirmation reads "This deletes the folder and every article in it. Your agent stops using them right away. This can't be undone."

## Write an article from scratch

**1. Pick the folder**

Choose the folder in the folder picker so the article is created there. On **All folders**, a written article goes to your oldest folder.

**2. Create the article**

Click **New article → Write from scratch**. A blank draft opens.

**3. Write**

Type the title in the **Article title** field (it reads **Untitled article** until you do) and the content below it. The toolbar offers **Bold**, **Italic**, **Strikethrough**, **Heading 1**, **Heading 2**, **Bulleted list**, **Numbered list**, **Quote**, **Code block**, **Link**, **Undo** and **Redo**. You can paste from another document; formatting that Popcorn cannot keep is dropped.

**4. Save the draft**

Nothing is saved while you type. Once you have edited, a bar across the top reads **Unsaved changes**: click **Save draft** (you see **Draft saved**) or **Discard** to drop your edits. A saved draft is still not used by the agent.

If you try to leave with unsaved edits, Popcorn asks **Leave without saving?** with **Leave page** and **Keep editing**.

A new article exists as soon as you click **Write from scratch**. If you leave without writing anything, an **Untitled article** draft stays in the list; delete it from the **⋯** menu on its row.

For a **Link**, type the address in the field and click **Apply**; a bare `shop.com/faq` gets `https://` added. Only web addresses and email links are accepted, otherwise you see **Use a web address, like [https://yourstore.com/faq](https://yourstore.com/faq)**. **Remove link** takes a link off the selected text.

## Import from a link

**1. Open the import dialog**

Click **New article → Import from a link**. The dialog explains: "We'll fetch the page and turn it into a draft article you can edit. Your agent won't use it until you publish."

**2. Enter the page address**

Paste the full address under **Page link**, such as `https://example.com/help/shipping`. With more than one folder, choose where it goes under **Add to folder**.

**3. Import**

Click **Import**. Popcorn fetches the page and opens it as an editable draft. The page title becomes the article title.

The imported page is not used by the agent until you publish it. The original text is kept in the **Attached source (*N*)** panel on the article page, read-only and with a link to the page; click the panel to open it.

An empty field shows **Enter a link to import.** and an address that does not start with `http://` or `https://` shows **Enter a full URL, starting with https\://**. If the page takes longer than 25 seconds to fetch, the import stops and you can try again. Pages that need a login, block automated access, or contain no readable text also fail; see [Troubleshooting](https://docs.trypopcorn.ai/knowledge/troubleshooting.md).

## Upload a document

**1. Choose where it goes**

Pick the folder first, then click **New article → Upload a document**. If you have more than one folder and are on **All folders**, a dialog asks you to pick a folder under **Add to folder** and click **Choose file**. Otherwise the file picker opens straight away.

**2. Pick the file**

Supported: PDF, Word (`.doc`, `.docx`), plain text (`.txt`), CSV, JSON and HTML, up to 20 MB.

**3. Review the draft**

Popcorn extracts the text and opens it as a draft. The file name is kept in **Attached source (*N*)**. Extraction stops after 25 seconds.

Extraction is text only: images, tables laid out as pictures, and scanned pages without a text layer come through empty. Clean up the draft before publishing.

## See what the agent reads

Click **See what your agent reads** in the article header to open **How your agent reads this article**. It shows the article split into numbered passages ("Passage 1", "Passage 2"), the pieces the agent matches against when it searches. If the passage that mentions a fact is dominated by other topics, move that fact to its own article or heading so it gets a passage of its own.

If you have unsaved edits, Popcorn saves them as a draft first so the preview matches the screen. The preview never changes what the agent uses.

## Publish

**1. Click Publish**

In the article header, click **Publish**. You do not need to click **Save draft** first; unsaved edits are saved as part of publishing.

**2. Confirm**

The dialog **Publish this article?** explains: "Your agent starts answering from this version. Later edits stay in a draft until you publish again." Click **Publish**.

What happens next:

* The draft becomes a numbered version (**Version 1**, **Version 2**, and so on).
* The badge reads **Publishing…** and a toast says **Publishing. Your agent will use these changes in a moment.** The agent keeps answering from the previous version until the new one is ready, then switches in one step, so there is no gap. When it is ready you see **Published. Your agent now uses this version.**
* If it takes longer than about three minutes, a banner reads **Still publishing** with **Check again**.
* If it fails, the badge reads **Publish failed** and a banner says "Couldn't publish this version. Your agent is still using the previous version." Click **Publish again**.
* The line under the title changes to **Last published by *you* on *date***. Your next edit starts a new draft and the agent keeps using the version you published until you publish again.

**Publish** is disabled when you do not have permission (**You don't have permission to publish**) or when the article is already published and has no new edits (**Nothing new to publish**). There is no separate unpublish action; to stop the agent using an article, delete it.

While an article has unpublished edits, **Review** on **Knowledge** can't add a fact to it, because publishing the fact would publish your draft too. Publish your edits first.

## Versions

Click **History** to open **Version history**: "Every published version is kept. Compare any version with the latest, or restore one as a new draft." Versions are listed newest first, 10 per page. Each row shows the version number with **Published** or **Draft**, who published or last edited it and when, and **Compare** and **Restore** buttons. The newest version has neither button.

* **Compare** shows what changed between that version and the latest, under **Comparing Version *N* with Version *M***; **Back to history** returns to the list. Versions with identical content show **These versions have the same content.** and very long articles show **This article is too long to compare here.**
* **Restore** opens **Restore version *N*?**. Confirm with **Restore version** and Popcorn creates a new draft from that version ("Restored as a draft. Review it and publish when ready."). Your live answers do not change until you publish the restored draft. If you already have unpublished edits, the dialog warns that restoring replaces them with a copy of the chosen version. Restoring needs permission to edit (**You don't have permission to restore versions** otherwise).

Restored drafts are labelled **Restored from version *N*** in the history.

A fact added from **Review** on **Knowledge** also publishes a new version, under the name of the person who answered; taking it back with **Undo** publishes the earlier text again. See [Review what your agent learned](https://docs.trypopcorn.ai/knowledge/knowledge-check.md).

## Delete an article

Open the **⋯** menu at the end of the article's row, click **Delete**, then confirm with **Delete article**. This permanently deletes the article and the agent stops using it right away. There is no undo.

## What onboarding created

During onboarding Popcorn picked up to 8 pages from your website, the ones it recommends, or used the description you wrote if you had no website. It put them in the **Business Knowledge Base** folder, connected that folder to the agent it created, and made them live right away. Until you open a page for the first time, its row has no **Used by agent** value and no date. Open any of them to edit the text; from then on it behaves like any other article: your edits stay in a draft until you click **Publish**, and deleting the article removes the page from the agent.

## Related

* [Connect knowledge to an agent](https://docs.trypopcorn.ai/knowledge/connect-to-agents.md)
* [Review what your agent learned](https://docs.trypopcorn.ai/knowledge/knowledge-check.md)
* [Troubleshooting](https://docs.trypopcorn.ai/knowledge/troubleshooting.md)
* [Team and roles](https://docs.trypopcorn.ai/settings/team-and-roles.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.