Guru's Verification engine ensures consistency, confidence, and trust in the knowledge your organization shares. Learn more.

Google Sheet for Find & Replace

This spreadsheet is set up to help users find and replace terms in Guru cards. It uses a Card Manager export as its input. You enter a single term you're looking for and the text to replace it with. It'll show you how many cards are affected by that change and you can trigger individual card updates.

image.png

How to use the sheet

  1. Open our sheet and do File > Make a Copy.

    1. Our sheet is not editable. Making a copy gives you a personal, editable copy that's not shared with anyone so there's no way your data can be seen by anyone else.

  2. Follow the instructions in the green bar at the top of the sheet. This will guide you through the following steps:

  3. Do a Card Manager export.

    1. Note: when exporting, be sure to select the option to include Card content, details, and analytics

    2. We'll copy and paste this data into the "Input Data" tab -- this is how the sheet gets the original content for each card you want to update.

    3. If you want to update cards in a single collection, just export that one collection.

    4. The current sheet has enough rows to hold 3000 cards at a time, so if you need to work with more cards you may want to split it into multiple exports and work with one at a time.

  4. Enter the term you want to find and its replacement.

  5. Enter your email address and API token.

    1. These are needed for the sheet to do the updates.

    2. Make sure it's a User API Token.

    3. You need to be a Collection Owner for the cards being updated.

    4. To prevent the script from automatically running the next time the spreadsheet is opened, delete your API token (or delete the entire spreadsheet) when your work is complete.

  6. Review the cards that are showing changes. For the ones you want to update (most likely all of them) select "Save Changes" in the Action column.

How to revert changes

No matter how careful you are, it's possible you'll make a change and then want to undo it. Because the sheet has each card's original content and title, it's very easy to undo changes! Just select "Revert Changes" in the Action column and it'll restore the card's original content and title.

Other configuration options

At the top you'll notice a few options:

  • Case Sensitive is what determines if capitalization matters. If you enter "markdown" as your term to find and you want that to match the capitalized "Markdown", you'd select "no" here.

    • Yes means "Admin" will NOT match "admin".

    • No means "Admin" will match "admin", "ADMIN", etc.

    • Match Case is like "No", but if the term we find is completely lowercase then we'll convert the replacement term to all lowercase too.

  • Include Title is what determines if we also replace the term in each card's title.

  • Include HTML Attributes basically means "do you want to replace link URLs?" Skipping HTML attributes means it'll replace only visible text. Including HTML attributes means it will modify attributes, like a link or iframe's URL.

    • You can also do partial replacements here, like if your company intranet's domain name changes but the rest of the URL is the same.

Doing bulk replacements

Suppose you've moving documents from Dropbox to Google Drive and you need to update the URLs for 100 documents, you can do that! Enter each value and its replacement on the Bulk Replacements tab and the changes shown on the Find & Replace tab will reflect all the pairs of replacements.

Things to keep in mind

Watch out for conflicting replacements. For example, if you change "admin" to "team admin" and then change "team" to "group", did you mean for "team admin" to end up as "group admin"?

Once you've applied changes, you may want to erase "Save Changes" from the Action column. Once that cell says "Save Changes", changes will automatically be applied. If you were to change the terms you're finding and replacing, any rows that already have "Save Changes" selected will make the update, possibly before you were ready for it to go!

Cards may be edited by other people while you're using the spreadsheet. The sheet uses the Card Manager export as its input. This is a snapshot of each card's content at that moment. If other users edit the cards in Guru while you're using the sheet, when the sheet applies its changes you will overwrite changes that happened since you ran the export.

You can always do one export, use the sheet to plan and understand the scope of your change (will it affect 5 cards or 50?), and then do a second export once you're ready to apply changes so you have the latest content.

Google Sheets has a limit of 50,000 characters per cell which is lower than Guru's card length limit. This affects less than 1% of Guru cards but you may find some large cards are not find-and-replaceable.

You must have Author or Collection Owner permission to create Guru Cards. Contact your team's Guru admins to use this template.