---
title: "How to find and replace text in a Google Doc with a link or a list of links with Google Apps Script &#8211; Yagisanatode"
author: "Martin Hawksey"
date: 2021-06-17T21:29:27+00:00
modified: 2021-06-17T21:29:32+00:00
canonical_url: https://pulse.appsscript.info/p/2021/06/how-to-find-and-replace-text-in-a-google-doc-with-a-link-or-a-list-of-links-with-google-apps-script-yagisanatode/
markdown_url: https://pulse.appsscript.info/p/2021/06/how-to-find-and-replace-text-in-a-google-doc-with-a-link-or-a-list-of-links-with-google-apps-script-yagisanatode.md
categories:
  - "Beginner"
  - "Docs"
  - "Solutions"
  - "V8"
tags:
  - "@LifeOfSpy"
  - "yagisanatode.com"
featured_image: https://pulse.appsscript.info/files/2021/06/origThumbUrlhttps3A2F2Fi.ytimg_.com2Fvi2FkU03BkdntU42F0.jpg
description: "Another one of Scott Donald's very thorough tutorials, this one exploring link creation in Google Docs. "
---

# How to find and replace text in a Google Doc with a link or a list of links with Google Apps Script &#8211; Yagisanatode

![How to find and replace text in a Google Doc with a link or a list of links with Google Apps Script &#8211; Yagisanatode](https://pulse.appsscript.info/files/2021/06/origThumbUrlhttps3A2F2Fi.ytimg_.com2Fvi2FkU03BkdntU42F0.jpg)

> [https://yagisanatode.com/2021/05/16/how-to-find-and-replace-text-in-a-google-doc-with-a-link-or-a-list-of-links-with-google-apps-script/](https://yagisanatode.com/2021/05/16/how-to-find-and-replace-text-in-a-google-doc-with-a-link-or-a-list-of-links-with-google-apps-script/)
> Learn how to find and replace text with a link in Google Docs with Google Apps Script Document App with 3 different scenarios.
> So you are a citizen Google Apps Script developer and you’ve decided to make yourself a mail-merge-type project where you want to create new documents from a template. … Now you want to take it to the next level and replace the text with a hyperlink containing the text and the URL. You might be scratching your head wondering where the `replaceTextWithLink()` method is or why you can’t simply chain the `setLinkUrl()` method without making a hyperlink out of the entire body of the document.

Another one of Scott Donald’s very thorough tutorials, this one exploring link creation in Google Docs.

Source: *[How to find and replace text in a Google Doc with a link or a list of links with Google Apps Script – Yagisanatode*](https://yagisanatode.com/2021/05/16/how-to-find-and-replace-text-in-a-google-doc-with-a-link-or-a-list-of-links-with-google-apps-script/)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2021/06/how-to-find-and-replace-text-in-a-google-doc-with-a-link-or-a-list-of-links-with-google-apps-script-yagisanatode/](https://pulse.appsscript.info/p/2021/06/how-to-find-and-replace-text-in-a-google-doc-with-a-link-or-a-list-of-links-with-google-apps-script-yagisanatode/)*
