There is an old post for doing this (Get All Links in a Document) but they have deprecated some functions so the code does not work. All solutions do not work because getLinkUrl has been depricated by google
Is there a way to iterate through each element in a google document and determine if it is a url?