Skip to main content

Hi everyone,

I'm encountering a data integrity issue when transferring a large set of records from Google Sheets into Airtable, and I’d really appreciate any advice.

 

**Scenario:**  
I maintain an a list in Google Sheets. The "Source URL" column contains rich-text hyperlinks — for example, display text like `Narrative Enneagram Resources` linking to `https://www.narrativeenneagram.org/resources/`.


**Issue:**  

When I click the link, it shows an error because the URL has become http://narrative%20enneagram%20resources/ instead of the correct URL

 

When I try to bring this data into Airtable, the URLs get misconverted. No matter the method I use:

- **Copy-pasting** a multi-row range directly into a URL field,  
- **Importing** via _Add base ▸ Import data ▸ Google Sheets_, or  
- **Exporting as CSV** and importing into Airtable,  

 

**Question:**  
Is there any way to preserve the original hyperlinks (i.e., the actual `href` URLs)?

 

Thank you so much for any help!
 

Hey ​@Pei-Jing Huang,

This is strange. Did you try:

Using different field types in Airtable: (e.g. single line text, or long text with enabled rich text, and ideally URL)?

My guess is that the format on google sheets should be converted to a plain vanilla string?

If after different attempts you do not seem to have a solution you might want to reach out to support@airtable.com

You might also want to schedule a brief call with me and we can go through it together on the go.

 Mike, Consultant @ Automatic Nation


Hey Pei-Jing!

After a bit of searching, it seems like the only way to do it is by extracting the hyperlink using a script.

Here’s what ChatGPT gave me:

✅ Step-by-step: Extract hyperlinks with a script

  1. Open your Google Sheet.

  2. Go to Extensions > Apps Script.

  3. Delete any code in the editor and paste the following:

function extractHyperlinks() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const range = sheet.getDataRange(); // adjust this if needed
const values = range.getRichTextValues();
const output = t];

for (let i = 0; i < values.length; i++) {
let row = w];
for (let j = 0; j < valuesli].length; j++) {
const richText = valuesli]sj];
if (richText.getLinkUrl()) {
row.push(richText.getLinkUrl());
} else {
row.push(""); // No hyperlink
}
}
output.push(row);
}

// Output to a new sheet
const newSheet = SpreadsheetApp.getActiveSpreadsheet().insertSheet("Extracted Links");
newSheet.getRange(1, 1, output.length, outputt0].length).setValues(output);
}

 

  1. Click the disk icon to save, then click the Run ▶️ button to execute.

    • You might need to authorize the script the first time.

 

I tested it out and it works! It creates a new sheet with all the extracted links (so it won’t modify your current spreadsheet). You will need to grant the script permission to run. Then, you should be able to copy and paste the extracted hyperlinks.

I hope this helps!


You can't import your hyperlinks directly into Airtable, it doesn't keep the URL. You'll need to follow a few extra steps to make it work:

  1. Split your hyperlink into two columns: one for the link name and one for the URL.

  2. Import the sheet into Airtable. Map the link name to a short text field and the URL to a URL field.

  3. Create a long text field with rich text formatting enabled to store the final hyperlink.

  4. Use an automation to combine the link name and URL into a clickable hyperlink.

I've written a detailed article on the whole process, you can check it out.

Taha, Airtable Advisor


Reply