title: Google script to create table of contents of files
body: <p>Unsure if this can be done or even where to start but the problem I've got currently is that we create files in one folder called policies and then we create a view able shareable link. We then copy this link into a separate table of contents doc for a quick way to open these files. The links are categorised in the table of contents under 5 set headings.</p>
  <p>I was thinking if in the policy header doc I put what category it came under could a script grab this, use the file name and automatically paste this in the table of contents doc which starts on page 3 of the doc. That way the list would automatically be kept up to do and broken file links would be a thing of the past!</p>