Extract Google Docs body text, links and Chips (Person, Date, Rich Links) with Google Apps Script and the DocumentApp Service.
This tutorial is 2 of 4 approaches to programmatically extracting text from a Google Doc. There is no one complete approach, unfortunately, but each approach comes with its pros and cons. Check out the written tutorial for more details @WorkspaceDevs
https://youtu.be/ElwWk5oD4eM