> ## Documentation Index
> Fetch the complete documentation index at: https://relevanceai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Replace Text

> The Replace Text tool step allows you to replace text in a Google Doc

## Add the ‘Replace Text’ Tool step to your Tool

<div style={{ width:"100%",position:"relative","padding-top":"56.75%"}}>
  <iframe src="https://app.supademo.com/embed/cmeqmrnqx3a36v9kq80tl2pgi?embed_v=2&utm_source=embed" frameBorder="0" title="Add the Replace Text Tool step to your Tool" allow="clipboard-write; fullscreen" webkitAllowFullscreen="true" mozAllowFullscreen="true" allowFullscreen style={{ position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"3px solid #5E43CE",borderRadius:"10px",objectFit:"cover" }} />
</div>

You can add the ‘Replace Text’ Tool step to your Tool by:

1. Creating a new Tool, then searching for the ‘Replace Text’ Tool step
2. Click ‘Expand’ to see the full Tool step
3. Select the account you would like to use
4. Select the document you would like to replace text in.
5. Enter the text you would like to replace in the document.
6. Enter your new text.
7. Check whether you want the text matching (in step 5) to be case-sensitive.
8. Click 'Run step' to test out the Tool

## Parameters

<ParamField path="Document" type="string" required>
  The document you would like to append text to. You can get the document ID from the URL of the document between `/d/` and `/edit`.
</ParamField>

<ParamField path="Text to be replaced" type="string" required>
  Specify the exact text in the document that you want to replace. The replacement will only occur if the text matches exactly.

  <Warning>
    Be precise when entering the text to replace - all the instances of the text will be replaced.
  </Warning>
</ParamField>

<ParamField path="New Text" type="string" required>
  This is the text that will replace the existing text.
</ParamField>

<ParamField path="Match Case" type="boolean">
  This option specifies whether the text matching should be case-sensitive.
</ParamField>

## Frequently asked questions (FAQs)

<AccordionGroup>
  <Accordion title="What happens if the 'Text to be replaced' is not found?">
    The tool step will still run successfully, but no changes will be made to the document.
  </Accordion>

  <Accordion title="What happens if there is more than one instance of the 'Text to be replaced'?">
    Any instances of the 'Text to be replaced' will be replaced.
  </Accordion>
</AccordionGroup>
