photoshop_recipe_csv_to_cards
Convert a CSV of variable values into Photoshop data sets, applying each row to an active template PSD to export one image per row for name cards, badges, or certificates.
Instructions
Data-driven graphics batch: convert a CSV file into Photoshop data sets, apply each row to the active template document and export one image per row. "Mail merge for images" — name cards, badges, certificates, personalized banners.
Users often say: csv to images, batch name cards, personalized banners, generate badges from spreadsheet, sertifika bastır.
CSV rules: first row = variable names matching the variables defined in the template PSD (Image > Variables > Define). A cell holding an absolute path to an image file (.png/.jpg/.webp/.tif/.psd) is treated as a pixel-replacement variable.
Use when: the user has a template PSD with variable-bound layers and a CSV of rows. Do NOT use when: the document has no variables defined — define them in Photoshop first (Image > Variables > Define).
Returns: { ok, summary, details: { rows, exported, output_paths, xml_path } }.
Preconditions: active document with variable-bound layers; readable CSV file. Side effects: writes a temp variables XML and one output file per row into output_dir.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output format (default JPEG) | JPEG |
| csv_path | Yes | Absolute path to the CSV file (first row = variable names) | |
| output_dir | Yes | Directory for generated files (created if missing) | |
| document_id | Yes | Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call. |