# Prefill tool

The Prefill Tool allows you to automatically add Content Egg products to existing posts.

{% embed url="<https://www.youtube.com/watch?v=_diFdiqlKSU>" %}

{% hint style="warning" %}
Prefill will modify your posts, and changes **cannot be undone**. Be sure to **back up your database** before proceeding. [Learn how to back up your database](https://chatgpt.com/c/6828cc2e-f94c-8007-a8fb-49dee75dbb3e).
{% endhint %}

### AI Integration

To enable AI-powered features in Prefill, enter your [OpenAI API key](https://ce-docs.keywordrush.com/ai/openai-api) under:\
**Content Egg > Settings > AI > OpenAI API Key**\
Make sure your OpenAI account has sufficient balance.

<figure><img src="https://4254262503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3fnB7iKYwDc1Xhr3H3%2Fuploads%2FnYP5LckX1KQkVlrzo6xH%2Fimage.png?alt=media&#x26;token=62d8f44f-03cc-4db5-8b04-eb947a3caa94" alt=""><figcaption></figcaption></figure>

### How It Works

1. **Navigate to:** Content Egg > Prefill
2. **Select Posts to Prefill:**\
   Use filters such as **post type**, **status**, **category**, etc., to narrow down your selection.

<figure><img src="https://4254262503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3fnB7iKYwDc1Xhr3H3%2Fuploads%2FgMVvTzep4doQHgyX281y%2Fimage.png?alt=media&#x26;token=f4c854df-27fb-4d17-8896-2ed35cddc04f" alt=""><figcaption></figcaption></figure>

3. **Alternatively**, you can run Prefill on a single post directly from the post edit screen. Just click the “**Prefill**” button in the editor.

   <figure><img src="https://4254262503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3fnB7iKYwDc1Xhr3H3%2Fuploads%2FRDezMNSfRYTFDsMRQwJT%2Fimage.png?alt=media&#x26;token=9706e74a-abd6-40bb-a801-c4c8bc29c122" alt=""><figcaption></figcaption></figure>
4. **Choose Modules:**\
   Select one or more Content Egg modules to use for product insertion.

* Modules are processed based on priority (set in each module’s settings).
* If the first module fails to find relevant products, the next module in the priority list will be used.

<figure><img src="https://4254262503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3fnB7iKYwDc1Xhr3H3%2Fuploads%2FnoL0tVxnG81FSxNWSsfr%2Fimage.png?alt=media&#x26;token=b822f1fc-1cc0-44e1-be98-46f3c330841b" alt=""><figcaption></figcaption></figure>

5. **Set Prefill Mode & Options:**\
   Choose your desired **Prefill Mode** and adjust any additional settings.
6. **Start the Process:**\
   Click **Start Prefill** to begin. The process runs in the background using **WP-Cron**, so you can safely leave the page and return later to monitor progress.

### Fully Automatic AI Mode

This mode works with both Gutenberg and Classic Editor posts. It does everything for you:

* Splits the article into clear sections
* Finds keywords based on each section’s content
* Filters out products that don’t match
* Writes unique content for each product
* Adds product blocks directly to your post
