# Flowgento template CSV - guide for AI assistants

This file explains how to write a CSV of WhatsApp message templates that imports cleanly into Flowgento (**Templates → Import**) and passes Meta's review. Give this file to ChatGPT, Claude, Gemini or any other AI assistant together with what your business needs, and it will write the CSV for you.

It is generated from Flowgento's real importer and rule checker, so the column names, spellings and limits below are exactly what the import accepts. Latest copy: https://flowgento.com/docs/template-import-ai-guide

## Instruction to the AI

> Write the templates the user asks for as **one CSV file** that follows every rule in this guide.
> **Return only the CSV**, inside one ```csv code block, with the full header row below as its first line.
> After the code block, list **Risks**: any row Meta might reject or re-categorise, any sample you had to guess, and any link or phone number you did not get from the user (use `https://example.com/...` and `+910000000000` for those).
> Do not add columns, do not remove columns, and do not explain the CSV line by line.

## The header row

Copy this line exactly as the first line of the file:

```csv
name,language,category,header_format,header_text,header_sample_text,header_sample_file,header_sample_url,body,body_samples,footer,button_1_type,button_1_text,button_1_value,button_1_example,button_2_type,button_2_text,button_2_value,button_2_example,button_3_type,button_3_text,button_3_value,button_3_example,status,rejection_reason,number
```

The required columns are `name`, `language`, `category`, `body`. Every other cell may be empty. There are 3 button slots (`button_1_…` to `button_3_…`); fill them from 1 upward.

## Every column

| Column | Required? | What to put | Limits |
|---|---|---|---|
| `name` | Yes | Template name, unique on the number. Example: `order_shipped`. | Lowercase letters, digits and `_` only, no spaces. Up to 512 characters. |
| `language` | Yes | Language code: `en`, `en_US`, `hi`, `ta`, `ar`… | Two or three lowercase letters, optionally `_` plus two capitals. |
| `category` | Yes | `MARKETING` or `UTILITY`. Use `AUTHENTICATION` only for one-time codes, and create those in Meta Business Manager instead: the import cannot build them. | One of `MARKETING`, `UTILITY`, `AUTHENTICATION`. |
| `header_format` | No | `NONE`, `TEXT`, `IMAGE`, `VIDEO`, `DOCUMENT`. Empty = `NONE` (no header). | Exactly one of these words. |
| `header_text` | If `TEXT` | The header line. May contain one variable, `{{1}}`. | Up to 60 characters, one line, no emoji, no *bold* / _italic_ / ~strike~ / `code`. |
| `header_sample_text` | If header_text has `{{1}}` | A realistic value for the header's `{{1}}`. Example: `#1042`. | One value. |
| `header_sample_file` | Either this or header_sample_url, for `IMAGE` / `VIDEO` / `DOCUMENT` | The name of a file already in your Flowgento Files library. | The only option for `VIDEO`. |
| `header_sample_url` | Either this or header_sample_file, for `IMAGE` / `DOCUMENT` | A public **https** link straight to the sample file (no login, not a page that shows it). | IMAGE: a JPEG or PNG image up to 5 MB. DOCUMENT: a PDF up to 100 MB. At most 3 redirects. |
| `body` | Yes | The message text. Variables are `{{1}}`, `{{2}}`, `{{3}}`… Line breaks are allowed inside the quoted cell. | Up to 1024 characters. |
| `body_samples` | If body has variables | One realistic value per variable, in order, separated by ` \| `. Example: `Asha \| #1042 \| Friday`. | Exactly as many values as there are variables. Empty when the body has none. |
| `footer` | No | A short grey line under the body. Example: `Reply STOP to unsubscribe`. | Up to 60 characters, no variables. |
| `button_N_type` | Per button | `QUICK_REPLY`, `URL`, `PHONE_NUMBER`. Leave empty for no button. | Spelled exactly like that. Up to 10 buttons: 2 `URL`, 1 `PHONE_NUMBER`, 10 `QUICK_REPLY`. |
| `button_N_text` | Per button | The label on the button. Example: `Track order`. | Up to 25 characters. |
| `button_N_value` | For `URL` and `PHONE_NUMBER` | `URL`: the full https link, optionally ending in `{{1}}`. `PHONE_NUMBER`: the number with country code, like `+919876543210`. Empty for `QUICK_REPLY`. | Link up to 2000 characters. `{{1}}` only once and only at the very end. |
| `button_N_example` | If button_N_value ends in `{{1}}` | What fills `{{1}}`: just the changing part (`ab12cd`) or the whole link (`https://example.com/track/ab12cd`). | No spaces. |
| `status` | No | Leave empty. Export fills it in; import ignores it. | - |
| `rejection_reason` | No | Leave empty. Export fills it in; import ignores it. | - |
| `number` | No | Leave empty. The import uses the number you pick on screen. | - |

**Header formats:** `NONE`, `TEXT`, `IMAGE`, `VIDEO`, `DOCUMENT`.
**Button types:** `QUICK_REPLY`, `URL`, `PHONE_NUMBER` - spelled exactly like this (not `PHONE`, `CALL` or `WEBSITE`).
**Categories:** `MARKETING`, `UTILITY`, `AUTHENTICATION`.
**Media sample by link (`header_sample_url`):** IMAGE = a JPEG or PNG image up to 5 MB (5 MB max); DOCUMENT = a PDF up to 100 MB; https only. VIDEO needs a file from the Files library (`header_sample_file`).

## Meta's rules in plain words

Each ✅ and ❌ below shows only the cells that matter; the other cells are an ordinary row (`name` = `order_update`, `category` = `UTILITY`, `body` = `Hi {{1}}, your order {{2}} is ready for pickup.`, `body_samples` = `Asha | #1042`).

### 1. No variable at the start of the body

Meta rejects a body that opens with a placeholder.

- ✅ `body` = `Hi {{1}}, your order {{2}} is ready for pickup.`
- ❌ `body` = `{{1}}, your order {{2}} is ready for pickup.` *(the import refuses this row)*

### 2. No variable at the end of the body

Meta rejects a body that ends on a placeholder - finish with words.

- ✅ `body` = `Hi {{1}}, your order number is {{2}}. Thank you!`
- ❌ `body` = `Hi {{1}}, your order number is {{2}}` *(the import refuses this row)*

### 3. No two variables side by side

Put at least one word between variables.

- ✅ `body` = `Hi {{1}}, your order {{2}} is ready for pickup.`
- ❌ `body` = `Hi {{1}} {{2}}, your order is ready for pickup.` *(the import refuses this row)*

### 4. Enough words per variable (at least 2 words for each)

Meta rejects a body that is mostly placeholders.

- ✅ `body` = `Hi {{1}}, your table for {{2}} guests is booked on {{3}}. See you soon!`, `body_samples` = `Asha | 4 | Friday`
- ❌ `body` = `Hi {{1}}, {{2}} on {{3}} at {{4}} ok`, `body_samples` = `Asha | 4 | Friday | 8 pm` *(the import refuses this row)*

### 5. The whole message can never be one variable

A template must be real text Meta can review, not a blank to fill.

- ✅ `body` = `Hi {{1}}, your order {{2}} is ready for pickup.`
- ❌ `body` = `{{1}}`, `body_samples` = `Your order is ready` *(the import refuses this row)*

### 6. Number variables {{1}}, {{2}}, {{3}}… with no gaps, in reading order

A gap is refused. Out of order is accepted, but confuses the reviewer.

- ✅ `body` = `Hi {{1}}, your order {{2}} is ready for pickup.`
- ❌ `body` = `Hi {{1}}, your order {{3}} is ready for pickup.` *(the import refuses this row)*
- ❌ `body` = `Hi {{2}}, your order {{1}} is ready for pickup.` *(warning only, never blocks)*

### 7. One sample value per variable - no more, no fewer

Meta reviews the template with the samples filled in. Separate them with ` | `.

- ✅ `body` = `Hi {{1}}, your order {{2}} is ready for pickup.`, `body_samples` = `Asha | #1042`
- ❌ `body_samples` = `Asha` *(the import refuses this row)*
- ❌ `body_samples` = `Asha | #1042 | Friday` *(the import refuses this row)*

### 8. Realistic samples

A reviewer must understand the real message. "test", "xxx" or "abc" samples get templates rejected. The import cannot judge this - you must.

- ✅ `body_samples` = `Asha | #1042`
- ❌ `body_samples` = `test | xxx` *(the import cannot catch this - avoid it yourself)*

### 9. A link button may end in {{1}} - only once, only at the very end

Meta reviews the fixed part; the customer's part is added when sending. Give the example in button_N_example.

- ✅ `button_1_type` = `URL`, `button_1_text` = `Track order`, `button_1_value` = `https://example.com/track/{{1}}`, `button_1_example` = `ab12cd`
- ❌ `button_1_type` = `URL`, `button_1_text` = `Track order`, `button_1_value` = `https://example.com/{{1}}/track`, `button_1_example` = `ab12cd` *(the import refuses this row)*
- ❌ `button_1_type` = `URL`, `button_1_text` = `Track order`, `button_1_value` = `https://example.com/track/{{1}}` *(the import refuses this row)*

### 10. Button limits: up to 10 in all, 2 links, 1 call button, quick replies kept together

Spell the type exactly `QUICK_REPLY`, `URL`, `PHONE_NUMBER`. Labels up to 25 characters.

- ✅ `button_1_type` = `URL`, `button_1_text` = `Visit website`, `button_1_value` = `https://example.com`, `button_2_type` = `PHONE_NUMBER`, `button_2_text` = `Call us`, `button_2_value` = `+919876543210`
- ❌ `button_1_type` = `URL`, `button_1_text` = `Shop`, `button_1_value` = `https://example.com/shop`, `button_2_type` = `URL`, `button_2_text` = `Blog`, `button_2_value` = `https://example.com/blog`, `button_3_type` = `URL`, `button_3_text` = `Help`, `button_3_value` = `https://example.com/help` *(the import refuses this row)*
- ❌ `button_1_type` = `PHONE`, `button_1_text` = `Call us`, `button_1_value` = `+919876543210` *(the import refuses this row)*
- ❌ `button_1_type` = `QUICK_REPLY`, `button_1_text` = `Yes`, `button_2_type` = `URL`, `button_2_text` = `Visit website`, `button_2_value` = `https://example.com`, `button_3_type` = `QUICK_REPLY`, `button_3_text` = `No` *(the import refuses this row)*

### 11. Honest category

UTILITY = about something the customer already did (order, booking, account). Offers and sales are MARKETING. If you get it wrong, Meta approves the template as MARKETING anyway, and marketing messages cost more.

- ✅ `category` = `UTILITY`, `body` = `Hi {{1}}, your order {{2}} is ready for pickup.`
- ❌ `category` = `UTILITY`, `body` = `Hi {{1}}, get 20% off your next order {{2}} today only.` *(warning only, never blocks)*

### 12. Marketing templates carry an opt-out

Give people a way to stop: a footer like "Reply STOP to unsubscribe" or a "Stop promotions" quick reply.

- ✅ `category` = `MARKETING`, `body` = `Hi {{1}}, our festive sale is on until {{2}}. Tap below to see the plans.`, `body_samples` = `Asha | 31 December`, `footer` = `Reply STOP to unsubscribe`
- ❌ `category` = `MARKETING`, `body` = `Hi {{1}}, our festive sale is on until {{2}}. Tap below to see the plans.`, `body_samples` = `Asha | 31 December` *(warning only, never blocks)*

### 13. Links go in a URL button, not in the body

Meta reviews links in buttons more kindly than links typed in the text.

- ✅ `body` = `Hi {{1}}, your order {{2}} is ready. Tap below to track it.`, `button_1_type` = `URL`, `button_1_text` = `Track order`, `button_1_value` = `https://example.com/track`
- ❌ `body` = `Hi {{1}}, your order {{2}} is ready. Track it at https://example.com/track today.` *(warning only, never blocks)*

### 14. No link shorteners

Meta must see the real address. bit.ly, tinyurl and the like are refused - use your own full link.

- ✅ `button_1_type` = `URL`, `button_1_text` = `Track order`, `button_1_value` = `https://example.com/track/{{1}}`, `button_1_example` = `ab12cd`
- ❌ `button_1_type` = `URL`, `button_1_text` = `Track order`, `button_1_value` = `https://bit.ly/{{1}}`, `button_1_example` = `ab12cd` *(the import refuses this row)*

### 15. A text header is one plain line

Up to 60 characters, at most one variable ({{1}}), no line breaks, no emoji, no formatting.

- ✅ `header_format` = `TEXT`, `header_text` = `Order {{1}}`, `header_sample_text` = `#1042`
- ❌ `header_format` = `TEXT`, `header_text` = `Order {{1}} 🎉`, `header_sample_text` = `#1042` *(the import refuses this row)*
- ❌ `header_format` = `PDF` *(the import refuses this row)*

### 16. A deleted name cannot be reused for about 30 days

Meta keeps a deleted template's name blocked for about 30 days. Pick a new name (like `order_update_v2`) instead of reusing one. The import never replaces a template that is already on the number - that row is shown as Skipped.

- ✅ `name` = `order_update_v2`

## CSV quoting rules

1. Save as **UTF-8** CSV, comma-separated, one template per line after the header row.
2. If a cell contains a **comma**, a **double quote** or a **line break**, wrap the whole cell in double quotes: `"Hi {{1}}, thanks"`.
3. Inside a quoted cell, write a double quote as two: `"Say ""hello"""`.
4. A body with line breaks is fine - keep the real line breaks inside one quoted cell.
5. Keep every column of the header row, even when its cells are empty (`,,`). Extra columns are ignored.
6. Do not put spaces around commas, and do not put the CSV in a table or a spreadsheet image - plain text only.

## A complete example that imports cleanly

Every row here passes the import's checks. The image and PDF samples are real files you can keep for testing (https://web.flowgento.com/samples/template-header-sample.jpg and https://web.flowgento.com/samples/template-header-sample.pdf); use your own for live templates, and your own website instead of `example.com`.

```csv
name,language,category,header_format,header_text,header_sample_text,header_sample_file,header_sample_url,body,body_samples,footer,button_1_type,button_1_text,button_1_value,button_1_example,button_2_type,button_2_text,button_2_value,button_2_example,button_3_type,button_3_text,button_3_value,button_3_example,status,rejection_reason,number
esim_ready,en,UTILITY,NONE,,,,,"Hi {{1}}, your eSIM for order {{2}} is ready. Tap below to open it.",Asha | WA7852,Reply HELP for support,URL,Open my eSIM,https://example.com/order/{{1}},WA7852,QUICK_REPLY,I need help,,,,,,,,,
order_shipped,en_US,UTILITY,TEXT,Order {{1}},#1042,,,"Hi {{1}}, your order {{2}} has shipped and will arrive on {{3}}.",Asha | #1042 | Friday,Reply STOP to opt out,URL,Visit website,https://example.com,,PHONE_NUMBER,Call us,+919876543210,,,,,,,,
esim_qr_code,en,UTILITY,IMAGE,,,,https://web.flowgento.com/samples/template-header-sample.jpg,"Hi {{1}}, scan the QR code above to install your eSIM for order {{2}}.",Asha | WA7852,,URL,Install guide,https://example.com/install/{{1}},https://example.com/install/WA7852,,,,,,,,,,,
invoice_ready,en,UTILITY,DOCUMENT,,,,https://web.flowgento.com/samples/template-header-sample.pdf,"Hi {{1}},

Your invoice for order {{2}} is attached.
Thank you for choosing us.",Asha | WA7852,,QUICK_REPLY,Got it,,,QUICK_REPLY,Question,,,,,,,,,
festive_esim_offer,en,MARKETING,NONE,,,,,"Hi {{1}}, our festive sale is on: 20% off every travel eSIM until {{2}}. Tap below to see the plans for your next trip.",Asha | 31 December,Reply STOP to unsubscribe,URL,See offers,https://example.com/offers/{{1}},FESTIVE20,QUICK_REPLY,Stop promotions,,,,,,,,,
```

## Ready prompt to paste

Attach this guide to the chat, fill in the brackets, and paste:

```text
You are helping me write WhatsApp message templates for my business.
Follow the attached "Flowgento template CSV - guide for AI assistants" exactly.

My business: [what you sell, your website, your support phone number]
Templates I need: [for example: order confirmed, order shipped with tracking link, invoice PDF, payment reminder, festive offer]
Language: [en / hi / ...]

Return only the CSV in one ```csv code block, then a short "Risks" list.
```

## Uploading the CSV and fixing rows

1. Open Flowgento → **Templates → Import** and pick the WhatsApp number.
2. Choose your `.csv` file. Nothing is sent to Meta yet.
3. The review screen shows every row as **Ready**, **Needs fix** (with the reason in plain words) or **Skipped** (already on this number - never replaced). Amber notes are warnings and never stop a row.
4. Fix rows right there: type a missing button example and press **Apply**, or paste a link / **Pick a file** for an image, video or PDF sample. The whole file is checked again; you don't need to upload it again.
5. Press **Submit**. All ready rows go to Meta in one go, and each row ends as **Submitted**, **Skipped** or **Needs fix**. Meta's review usually takes minutes, sometimes up to a day.
