I work with Google Docs daily and insert many URLs into my documents. The problem is that I have to manually click the “Replace URL with its title” option for every single link I add.
This manual process is really time consuming and annoying. I’m wondering if there’s a way to make this happen automatically through Google Apps Script or some other method.
Has anyone found a solution to automatically format URLs with their page titles instead of having to do it one by one? Any help would be great.
I built a Google Apps Script for this same thing six months ago. It watches for document changes and grabs page titles whenever you paste URLs. You’ll need a trigger that fires on edits, then use UrlFetchApp to pull the HTML and extract the title tags. The annoying part is dealing with rate limits and timeouts - some sites are slow or block automated requests. I had to add error handling for URLs that don’t have proper titles. Once you get it set up, it works great, though there’s a slight delay when you paste links. It runs in the background so you barely notice. I can share the code if you want to go the custom route.
I can relate to your experience with manually converting URLs. I’ve also struggled with this and found that many Google Docs add-ons from the marketplace offer effective solutions. They can automatically convert URLs seamlessly as you work, and most require minimal setup—typically just a couple of minutes. This approach is much more reliable than custom scripts, especially since the developers are responsible for updates and fixes related to API changes. I’d recommend exploring the add-ons available to save time and streamline your document formatting.
honestly, just use ctrl+k after pasting the url - way faster than any script. google docs already has this built in, you don’t need automation tools or complex code. just paste the url, select it, hit ctrl+k and it pulls the title automatically. takes like 2 seconds per link and no setup required.
Been there - manual URL conversion is the worst when you’re cranking out docs and reports.
Sure, Google Apps Script works, but you’ll be writing custom code for page titles, handling different URL formats, dealing with API limits. Gets messy quick.
Better move: automation platform that does the heavy lifting. I’ve got a workflow watching my Google Docs that swaps URLs for formatted titles automatically.
Best part? Works across all docs without installing anything or running scripts. Just paste URLs normally - they convert in the background.
Takes 5 minutes to set up, saves hours weekly. Beats building custom scripts that break when Google updates their API.
Latenode nails the Google Docs integration: https://latenode.com