How to make a page template, that affects index ?

My report needs an index page:

item, description, position
1 , something wrong, here

1, would be fault one.
every page is a big photo, then some lines of text is a table , like:


[description of problem]
[suggested fix]

So - when adding a new page (like above, photo, table) - then the index should be populated with another line, with whatever is in the report page. How to do that ?

Is there any examples for similar document?
The ultimate goal, is to have a script parse a folder of photos, and create a page per photo, and populate the fields with the photo’s EXIF. (done using exiftool)

An index or table of contents is always a field, and fields aren’t updated automatically, so you would have to right click the index and select Update after adding pages.
But your description leaves much unexplained. What exactly do you want to show in the index?