Add Entries with Their ACF Fields with AI
Paste a list and get draft entries with their ACF fields filled in from your list, ten at a time, checked before and after saving.
Prerequisites
A site connected to WPVibe running Advanced Custom Fields 6.8.12 or newer (tested on 6.8.12, the free version) on WordPress 6.9 or newer, with ACF's abilities on (they are by default; this recipe checks). A post type registered in ACF, with Show In REST API and Enable Abilities for Posts on, and its field group with Enable Abilities for Field Data and Show in REST API on.
My WordPress site uses ACF. Add these [entries, for example villas] to my [post type] as drafts:
[paste a list or table, one entry per line, with its field values and terms]
1. Run GET /wp/v2/plugins?search=advanced-custom-fields with fields set to plugin,name,version,status. If ACF is not active, or its version is older than 6.8.12, stop and tell me to install or update it: older versions name these abilities differently. Then run discover_abilities with category acf-field-management. If acf/field-groups is not there, stop and tell me to switch on ACF, Settings, Features tab, AI & GEO, Abilities API; ACF's abilities also need WordPress 6.9 or newer. ACF names these abilities after the key, with underscores turned into hyphens: a post type with the key team_member gets acf/list-team-member-posts, acf/create-team-member-post, acf/view-team-member-post and acf/update-team-member-post; a taxonomy with the key amenity gets acf/list-amenity-terms and acf/create-amenity-term. Run discover_abilities with category wordpress-content-discovery for the exact names. Find the post type's REST_BASE with GET /wp/v2/types with fields set to all: the rest_base of the entry whose slug is the post type's key. Find the taxonomy's TAX_REST_BASE the same way with GET /wp/v2/taxonomies with fields set to all.
2. Run get_ability_info on the post type's create ability for its fields, their types and the choices of select, radio and checkbox fields, and run acf/field-groups to check its field group. If acf/field-groups comes back cut, run it again with max_length 100000. If the post type has no abilities, or its create and update abilities list no acf input, or acf/field-groups lists no group for it or shows show_in_rest off for its group, stop and tell me what to switch on: for the field group (ACF, Field Groups), Enable Abilities for Field Data in its ACF AI tab and Show in REST API in its Group Settings tab; for the post type, switch on Advanced Configuration in its Basic Settings (ACF, Post Types), then Show In REST API in its REST API tab and Enable Abilities for Posts in its ACF AI tab. If Show in REST API is missing from Group Settings, ACF REST API is off: switch it on first in ACF, Settings, Features tab, API & Scripts. Without these, ACF drops the field values without an error. Then read one entry, GET /wp/v2/REST_BASE?status=publish,draft&per_page=1&context=edit&_fields=id,acf: if it comes back with no acf, stop and tell me ACF REST API or the group's Show in REST API is off (skip this check when there are no entries yet). If the post type is not in ACF, Post Types at all, it has no ACF abilities and this recipe does not apply.
3. Match my columns to those fields and tell me every value that does not fit: text in a number field, or a value that is not one of a select, radio or checkbox field's choices (ACF saves an off-list select value without a warning, so check each one). Then read the existing entries in one call, GET /wp/v2/REST_BASE?status=publish,future,draft,pending,private&per_page=100&_fields=id,title,status (page on if there are more), and list any of my titles that already exist; skip those unless I say otherwise. If entries have [taxonomy] terms, read the existing terms in one call, GET /wp/v2/TAX_REST_BASE?per_page=100&_fields=id,name,slug (page on if there are more), match each of my terms by exact name, and note the terms that don't exist yet.
4. Show me a table of the first 10 entries exactly as you will save them, with their terms, and list the new terms you would create. Wait for my yes.
5. Create the new terms I agreed to with the taxonomy's create ability (or POST /wp/v2/TAX_REST_BASE). Create only the 10 entries in that table with the create ability, status draft. Never publish.
6. Set each entry's terms with POST /wp/v2/REST_BASE/ENTRY_ID and the body {"TAX_REST_BASE": TERM_IDS}, a list of the term IDs, because the create ability's input lists no terms.
7. Read the batch back in one call, GET /wp/v2/REST_BASE?include=ENTRY_IDS&status=draft&context=edit&per_page=10&_fields=id,title,status,acf,TAX_REST_BASE, and confirm each entry's fields and terms saved. Give me the list with an edit link for each (/wp-admin/post.php?post=ENTRY_ID&action=edit), and ask before the next 10.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Add Entries with Their ACF Fields with AI” recipe from the WPVibe cookbook on my connected site.
You have the post type and the fields, and now a spreadsheet of thirty properties, speakers or products to get into it. Each one means a new post, seven or eight fields filled in by hand, and the terms ticked, and the typo in row nineteen does not show up until a visitor finds it.
Paste the list and the AI matches your columns to the fields ACF reports for that post type, flags any value that does not fit, and shows you the first ten exactly as it will save them. It creates them as drafts with ACF’s own create ability, sets their terms, and reads every one back.
Nothing is published: you review the drafts and publish them yourself. ACF refuses text in a number field but saves a select value that is not one of its choices, so the AI checks your values against the choices before it saves. The input of ACF’s create ability lists no terms, so the recipe sets those through the WordPress REST API. Work in batches of ten so you can check what was saved before the next batch.
Outcome
Draft entries with their ACF fields and terms saved, each read back, ready for you to review and publish.