One-Click Copy/Paste Gemini Chatname & URL to Docs & Sheets
If you use Google's Gemini for research, coding, or brainstorming, you know how quickly your chat history can become a disorganized mess. Manually copying a chat's title, then switching tabs to copy its URL, and pasting both into a log is tedious and slow.
What if you could capture both the title and the link in a single click, perfectly formatted for whatever you're pasting into?
This guide will show you how to create a simple but powerful browser bookmarklet that does exactly that. With one click, it copies the Gemini chat's name and URL to your clipboard as a "rich text" hyperlink, ready to be pasted cleanly into Google Docs, Google Sheets, or almost anywhere else.
What You'll Need
All you need is a modern desktop web browser like Google Chrome, Microsoft Edge, or Firefox.
How to Create the Bookmarklet
We're going to create a special bookmark that runs a small snippet of JavaScript instead of taking you to a website. It's safe, private, and entirely contained within your browser.
-
Show your Bookmarks Bar. If it's not visible, press Ctrl+Shift+B (or Cmd+Shift+B on Mac).
-
Open the "Add Bookmark" dialog. Right-click anywhere on your bookmarks bar and select "Add page..." (or "Add Bookmark..." in Firefox).
-
Fill in the Details. A dialog box will appear. You need to fill in two fields:
- Name: Give it a short, actionable name like
Copy Gemini Chatname & URL
. - URL: This is the most important step. Delete any text that's already in this field. Then, copy the entire block of code below and paste it into the URL field.
javascript:(function(){ const activeElement = document.querySelector('.conversation.selected .conversation-title'); if (!activeElement) { alert('Selector failed. The website code may have changed again.'); return; } const title = activeElement.textContent.trim(); const url = window.location.href; const html = `${title}`; const blob = new Blob([html], {type: 'text/html'}); const plainText = `[${title}](${url})`; const plainBlob = new Blob([plainText], {type: 'text/plain'}); const data = new ClipboardItem({ 'text/html': blob, 'text/plain': plainBlob }); navigator.clipboard.write([data]).then(function() { console.log('Rich text link copied!'); }, function(err) { alert('Could not copy rich text link.'); console.error('Async: Could not copy text: ', err); }); })();
Note: It's normal for the browser to remove the
javascript:
prefix when you save the bookmark. This is a security measure. - Name: Give it a short, actionable name like
-
Save the Bookmark. Click the "Save" button. You should now see your new bookmarklet in your toolbar.
How to Use Your New Bookmarklet
Your workflow is now incredibly simple.
- Navigate to the Gemini conversation you want to save a link to.
- Click the "Copy Gemini Chatname & URL" bookmarklet in your toolbar.
- Go to your destination (a Google Doc or a Google Sheet).
- Click where you want the link and Paste (
Ctrl+V
orCmd+V
).
What Happens Next (The Magic)
Because this bookmarklet copies the link in multiple formats, different applications know exactly what to do with it:
- In Google Docs and Sheets: It pastes a clean, clickable hyperlink with the chat's name as the display text. Perfect for notes and reports.
- In Notepad: It pastes the Chat name followed by the URL.
A Note on Website Updates
Occasionally, you might get an alert that says, "Selector failed. The website code may have changed again."
This happens because Google has updated the Gemini website's underlying HTML code. The part of our script that finds the chat title (.conversation.selected .conversation-title
) may need to be updated to match. While this can be frustrating, it's an infrequent occurrence. For now, the code provided here is working perfectly.
Enjoy your new, streamlined workflow and happy organizing!