EXACT FIELDS, PREDICTABLE TEXT

CSV Template Variables: Match Headers to Plain-Text Drafts

Build a reusable plain-text template by matching each placeholder to one exact CSV header, then review the result for every source record.

Use the CSV Template & Bulk Text Personalizer to apply your own wording to a local source. This guide explains field matching through the fictional Harborloop Bikes, without expressions, automated writing, or sending.

Separate reusable wording from the values that change

A template contains the wording shared by a batch and placeholders for values supplied by individual records. Start with one complete sentence that already reads naturally. Replace only the parts that genuinely vary, leaving punctuation and connecting words in the template. The tool performs substitution rather than deciding what a message should say. This distinction keeps responsibility clear: you choose the sentence, the CSV supplies its facts, and the generated draft combines them. A polished template can still produce an inaccurate sentence if the underlying product, date, or offer is wrong. Review the source before treating repeatability as approval.

Harborloop Bikes is a fictional workshop preparing collection notices for display bicycles. Its source has the headers draft_id, model, collection_day, and pickup_note. A first template reads Your {{model}} is available for collection on {{collection_day}}. {{pickup_note}}. One record supplies City Step, Thursday, and Please bring your collection slip.. The resulting draft is Your City Step is available for collection on Thursday. Please bring your collection slip. Nothing in that transformation confirms that the bicycle is actually ready; the workshop must supply and approve that information itself.

Choose fields according to the decision the reader needs to make, rather than turning every word into a variable. A model, collection day, and approved instruction can be enough for this notice. A separate record identifier can help the reviewer locate a source row without appearing in the message. If your immediate problem is the table itself, follow preparing a personalization CSV before adjusting the wording. Keep a small, understandable starting batch so a reviewer can compare the original values with the resulting sentence and recognise an incorrect mapping before expanding the work.

Treat every header as an exact, case-sensitive name

A placeholder must name a header that exists in the imported source. Matching is exact and case-sensitive: {{model}} refers to model, not Model or MODEL. Do not expect the personalizer to correct spelling, singularise names, or choose the closest column. If Harborloop Bikes changes its source header to bike_model, the template must change to {{bike_model}} as well. Plan the names before sharing a recurring source format. A small naming agreement prevents a colleague from making an apparently cosmetic header edit that leaves yesterday’s template unable to run today.

The source requires unique headers, each between 1 and 80 UTF-16 code units long. A header cannot contain braces, control characters, or a newline, and a whitespace-only name is refused. Uppercase and lowercase names remain different under exact matching, but using both model and Model is needlessly confusing for people maintaining the file. Prefer one unambiguous name per concept. Header spaces are not a licence to rely on invisible padding: a name containing an unintended leading or trailing space is not the clean name it resembles. Correct the source deliberately rather than assuming automatic trimming or renaming.

Use Read columns to check the parsed header names against each field in the template before investigating individual records. An unknown column is a whole-request error, even when other placeholders are valid and most source values are complete. There is no useful partial success to infer from one sentence looking plausible. For example, {{collection_date}} cannot draw from collection_day merely because both suggest timing. Fix the name or provide the intended source column, then generate a new review. Do not add a global fallback to conceal this mismatch: fallback handles blank values in recognised fields, not an absent field or a typographical error.

Use dotted and spaced headers as literal column names

A dot in a header is ordinary name text here, not a request to traverse an object. If Harborloop Bikes receives a table with bike.model, the matching placeholder is {{bike.model}}. It reads that exact column, not a nested model property inside a bike object. Likewise, the header Pickup note is referenced as {{Pickup note}}, with the same capital letter and internal space. There is no requirement to replace dots with underscores or remove spaces before using an otherwise valid header. Keep any deliberate rename coordinated between the source and its template.

Imagine that one source contains both bike.model and model. They are two independent fields, so {{bike.model}} and {{model}} may produce different text from the same record. The same applies to Pickup note and pickup_note. A visible similarity does not establish an alias. This is useful when a source already uses descriptive names, but it also makes a careful comparison essential after merging tables. Do not duplicate a column solely to accommodate an assumed template convention; first check whether its literal existing name already meets the allowed header rules.

The personalizer maps exact header names to internal safe aliases before rendering, so dotted and spaced names retain this literal meaning. You do not write or manage those aliases. Your task is to reference the public header accurately, including meaningful spaces inside its name. Avoid adding decorative spaces inside a placeholder unless they belong to the actual header. A template copied from a general templating tutorial may use conventions that do not apply to this restricted tool. Start with the available source fields and the documented {{Column}} form, rather than importing assumptions about nested objects, helpers, or alternate lookup syntax.

Stay within the restricted double-brace grammar

Only ordinary text and {{Column}} placeholders are supported. The rendering library does not expose its wider template language through this tool. Sections, loops, comments, partials, triple braces, delimiter changes, functions, and JavaScript are not accepted template features. Do not write a conditional to hide an incomplete collection instruction, or an expression to uppercase a model name. Instead, prepare the final desired value in the CSV, or revise the shared sentence. Unsupported syntax is not a shortcut for transforming records, and a familiar-looking Mustache example from another setting is not evidence that it will work here.

Harborloop Bikes might want the instruction to differ between two collection arrangements. A source column such as pickup_note can contain the complete approved sentence for each record. The template then inserts {{pickup_note}} at the right point, without trying to branch on another field. Decide consistently whether the source sentence includes its full stop; otherwise some drafts may receive duplicate punctuation. If an arrangement requires entirely different surrounding wording, prepare and review a separate batch with an appropriate template. The personalizer does not group records into conditional campaigns or invent the missing sentence on the workshop’s behalf.

Substituted values are treated as literal plain text, never reinterpreted as another template or as HTML. If a source cell contains {{collection_day}}, inserting that cell does not trigger a second field lookup. It remains those characters in the draft. Similarly, angle-bracket markup is not a way to create a formatted message in the preview. These rules make the transformation easier to inspect: the template chooses the insertion points once, and source values remain data. For a longer correspondence example using the same plain-text boundary, see the plain-text mail merge guide.

CHECK THE FIELD CONTRACT

Try an exact-header template

Use a small source, reference its literal header names, and compare every generated draft with the original values.

Resolve unknown columns before deciding how blanks behave

Distinguish a missing column from a missing value. If the template requests {{pickup_note}} but no header has that exact name, the request fails as an unknown-column error. If the header exists but a record’s corresponding cell is empty or whitespace-only, the record is marked Review by default. That record has no generated draft available for use; its review draft is blank and its counts are zero. Other structurally valid records can be Ready when their referenced cells are complete. Read the named missing fields so you repair the specific value instead of guessing from an incomplete sentence.

An explicit global fallback can replace known blank cells. It must contain 1 to 200 UTF-16 code units, cannot be whitespace-only, and is not a per-column mapping. Harborloop Bikes should consider whether one phrase is genuinely suitable for every referenced field that could be blank. A generic instruction might fit pickup_note but make nonsense in collection_day. If the template references both, filling the source accurately is usually clearer than applying a catch-all phrase. A fallback cannot repair {{collecton_day}}, because that misspelling names an unknown field rather than a blank cell under the known collection_day header.

Fallback use remains visible in the review metadata through the affected field names. A Ready draft produced with fallback still needs a wording check; the status does not certify factual completeness or customer suitability. Nonblank source values are not trimmed, so a value with surrounding spaces keeps those spaces even when fallback is enabled. Blank detection is not a general cleanup pass. Make an explicit choice between correcting the data, accepting the documented fallback, and leaving the record unresolved. For source text that varies by language or market, the localized product copy guide explains why approved wording belongs in the source rather than an assumed translation feature.

Keep templates and generated drafts within their real limits

The template editor accepts a nonblank template of 1 to 8,000 UTF-16 code units, with at most 200 placeholder occurrences and 50 distinct fields. Repeating one field in a heading and body uses two occurrences but only one distinct field. Count the shared wording as part of the template length, not just the braces. These limits are different from the displayed draft character count, which uses Unicode code points. Some characters use two UTF-16 code units, so a visible character total is not an exact measure of remaining template capacity. Avoid planning a batch around the assumption that every visible character has the same storage length.

Source text is limited to 1 MiB of UTF-8, 1 to 1,000 data records, and 1 to 50 columns; each cell can contain at most 8,192 UTF-16 code units. Imports support UTF-8 CSV, TXT, and TSV files or pasted delimited text, not XLSX or remote URLs. CSV quoting can preserve a value containing commas, quotes, or embedded newlines. Leading zeros and nonblank spaces remain text rather than being converted into numbers. Raw file newline text is preserved until an actual edit, while textarea editing can normalise line endings. If exact newline sequences matter to a template value, retain the original file and distinguish a fresh import from an edited source.

A generated draft cannot exceed 20,000 UTF-16 code units, and the combined generated draft text is bounded at 8 MiB of UTF-8. Final output is separately bounded at 16 MiB. Repeating a long source cell many times can hit a draft limit even when the CSV and template each fit their own limits. The tool also has bounded operations with a 10-second read, computation, or export budget as applicable. Reduce unnecessary repetition or work in smaller, deliberately selected source batches when needed. It does not silently shorten an oversized draft to make it fit, and these processing limits are not acceptance limits for any publishing destination.

Review complete drafts alongside source-record metadata

Select records in the result preview and compare the complete draft with its source values. The review table is paginated at 25 records per page and uses excerpts, so an excerpt is not the final text. Harborloop Bikes should inspect the complete collection notice before copying it, including punctuation around inserted instructions and the position of any embedded newline. A row-ID column is optional review metadata; it is not inserted automatically into the message. To include an identifier in the draft, reference its exact header in the template deliberately. Keep private operational references out of customer-facing text unless they are actually needed.

Source order and record indexes are preserved, with no automatic deduplication. Two matching collection notices may represent two legitimate records, and choosing the same source ID twice does not merge them. The review reports Ready or Review, missing and fallback fields, character counts, and whitespace-separated word counts. These measures describe the generated text, not whether a destination will accept it or whether its claims are correct. When a notice becomes a public caption, use the personalized social media captions guide for that editorial handoff rather than assuming this batch review publishes anything.

Any real edit to input invalidates earlier results and exports, so generate a new review after changing a header, source cell, template, or relevant option. An invalid or cancelled candidate import preserves the committed working source instead of replacing it with partially parsed text. Use Cancel to stop current work and Clear when finished with private input. Normal window blur does not erase a working batch, but leaving or freezing the page clears private working data. There is no saved-project or history feature to reopen later. Preserve the original source and approved template through your own appropriate process, without treating a downloaded review report as an editable project backup.

Prove literal field matching with a small comparison

Before Harborloop shares a recurring template, test fields that look similar but must stay separate. Use this complete small CSV: draft_id,bike.model,model,Pickup note
HB-021,City Step,Display model,Bring your collection slip.. With {{bike.model}} / {{model}}. {{Pickup note}}, the expected draft is City Step / Display model. Bring your collection slip. The first two phrases prove that the dotted header did not become an alias for the shorter header. The final instruction checks the capital letter and internal space in its own field name. Compare all three replacements, rather than accepting the record merely because its status is Ready.

Next, change only the first placeholder to {{bike_model}}. The expected outcome is an unknown-column error for the request, not text borrowed from either existing model column. Restore the correct token, then test HB-021,City Step,Display model, under the same header. The record is rectangular but needs Review because Pickup note is blank. An explicit fallback of Ask at the workshop desk. can supply that instruction when every other referenced field is complete. Inspect the fallback field name as well as the sentence. These controlled changes distinguish exact lookup, missing data, and an intentional replacement without adding unsupported template logic.

Keep the expected sentence beside your source and template in a separate working note. After a deliberate header rename, repeat the comparison and update the corresponding placeholder together; after a value edit, check that only the intended wording changed. Review CSV accounts for all records, while combined TXT and ZIP require zero Review records. Use the personalized draft export guide for file-format and spreadsheet-safety choices. Return to the bulk text personalizer for the next check. Processing stays local to the private tool; the parent website can still load ordinary assets and analytics. No test here sends the notice or approves its facts.

Questions about CSV Template Variables

Do dotted or spaced headers need a different placeholder syntax?

No. Use the exact literal name inside double braces: {{bike.model}} references the bike.model column, and {{Pickup note}} references Pickup note. Dots do not access nested objects, spaces are part of the name, and matching is case-sensitive.

Why does fallback not fix an unknown template field?

Fallback applies only to empty or whitespace-only cells in columns that exist. An unknown field is a source-to-template mismatch and stops the entire request. Correct the placeholder or supply the exact intended header, then run a fresh review.

Can a cell contain another placeholder or HTML to render?

It can contain those characters as literal text, but they are not evaluated. Substitution is not recursive, the result is plain text, and the restricted template grammar does not support HTML rendering, loops, functions, or JavaScript.

Continue with another personalization guide

Return to the Bulk Text Personalizer or browse all free tools.

Personalized Social Media Captions

Turn approved product, location, and offer details into caption drafts, then review wording, blanks, and channel suitability before use.

Read the guide

Plain Text Mail Merge

Prepare individual text messages from approved event details, with clear handling for greetings, missing cells, record IDs, and draft downloads.

Read the guide

Prepare a Personalization CSV

Prepare UTF-8 delimited text with exact headers, rectangular records, quoted multiline values, and leading zeros kept as text.

Read the guide

Localized Product Copy

Assemble approved product wording, market prices, and destination text without automatic translation or locale conversion.

Read the guide

Export Personalized Drafts

Choose review CSV, a labeled text bundle, individual ZIP drafts, or current-draft copy with clear completeness and fidelity rules.

Read the guide

REVIEW BEFORE THE HANDOFF

Build drafts from agreed fields

Return to the free personalizer to resolve unknown fields, inspect blank-cell decisions, and export the appropriate reviewed text.