I have a document that I'm generating with headers and would like to generate a table of contents but I can't find an example in the documentation of how to insert an AutogeneratedRegion: https://developers.google.com/apps-script/class_tableofcontents
Could someone give me an example of how to add this?