I’ve done something similar for assignments in the college course that I adjunct in.
I teamed up with ChatGPT to create snippets to glean data from census records, starting with 1950 census. I uploaded an image of a census page copied from a genealogy site like ancestry.com. Purpose is to have a way to organize info about a person or family to paste into my Family Tree Maker software in the notes section but with as little typing as possible. So the elements of the form are presented, all i do is type in the details of a particular person or family.
Anyway, ChatGPT used scripting to build snippet, had to work a little to get thru handling multi response popups and various defaults.
Once completed, ChatGPT asked if i wanted same for the 1040 census, and then the 1930 census, etc all the way back. The ChatGPT volunteered to create snippets for other genealogical source documents like marriage, birth and death certs, and several others. There were a few hiccups to begin with, but looking at the code, i could suggest a solution ChatGPT was unable to sort out.