Import Hyperlinks from Sheets or Excel to Airtable
If you've ever tried importing a spreadsheet with hyperlinks into Airtable, you’ve probably noticed something frustrating — Airtable strips out the clickable links and only keeps the plain text. The actual URLs are lost.
And it doesn’t matter how you try to bring the data in:
-
Copy-pasting multiple rows
-
Using Add base → Import data → Google Sheets or Excel
-
Exporting as CSV and importing into Airtable
None of these methods preserve the hyperlinks. They all fail.
If you want your hyperlinks to show up correctly in Airtable, you’ll need to follow a few extra steps — but once you set it up, it works smoothly.
1. Extract the Link Name and URL
In your spreadsheet you will have to extract the Link Name and URL seprately. This will be different on whether you are using Google sheets or excel.
For Google Sheets:
First, open your Google Sheet and go to Extensions > Apps Script. Then paste in the following script:
function extractAllHyperlinks() {
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getActiveRange();
const values = range.getRichTextValues();
const output = values.map(row => {
return row.map(richText => {
if (richText && richText.getLinkUrl()) {
return [richText.getText(), richText.getLinkUrl()];
} else {
return ["", ""];
}
});
});
const flatOutput = output.map(row => row.flat());
const startCol = range.getColumn();
const startRow = range.getRow();
sheet.getRange(startRow, startCol + 1, flatOutput.length, flatOutput[0].length).setValues(flatOutput);
}
Once you've saved the script, reload your Google Sheet.
Now, select the column or cells that contain your hyperlinks. Then go to Extensions > Macros > extractAllHyperlinks.
The script will automatically create two new columns right next to your selection—one with the link’s display text, and the other with the actual clickable URL.
For Microsoft Excel:
If you're using Excel, you'll need VBA. Excel doesn’t give you a built-in way to extract this info cleanly.
First, press Alt + F11
to open the VBA Editor. Then insert a new module and paste this code inside:
Public Function GetURL(c As Range) As String
On Error Resume Next
' Try to get hyperlink from inserted link
If c.Hyperlinks.Count > 0 Then
GetURL = c.Hyperlinks(1).Address
Else
' If hyperlink is from a HYPERLINK formula, parse the formula
Dim f As String
f = c.Formula
If InStr(1, f, "=HYPERLINK", vbTextCompare) > 0 Then
' Extract the first quoted string (the URL)
Dim firstQuote As Long
Dim secondQuote As Long
firstQuote = InStr(1, f, """")
If firstQuote > 0 Then
secondQuote = InStr(firstQuote + 1, f, """")
If secondQuote > firstQuote Then
GetURL = Mid(f, firstQuote + 1, secondQuote - firstQuote - 1)
End If
End If
Else
GetURL = ""
End If
End If
End Function
Public Function GetText(rng As Range) As String
On Error Resume Next
GetText = rng.Text
End Function
Once that’s done, head back to your sheet. In an empty column, use =GetText(A2)
to pull out the link’s display text, and =GetURL(A2)
to get the actual clickable URL.
Drag those formulas down to apply them to the entire column.
You’ll now have two columns, one with the link name and one with the actual link.
2. Import into Airtable
Once you've extracted the link text and URL into two separate columns in your spreadsheet, the next step is to bring this cleaned-up data into Airtable.
When you import it, map the column with the link name to a single line text field, and the column with the URL to a URL field in Airtable.
Step 3: Create a Rich Text Field for the Clickable Link
Now create a new field in your Airtable table. Set the field type to long text, and make sure to turn on rich text formatting.
Name this field Hyperlink Link. This is where we'll display the final clickable link using markdown formatting in the next step.
Step 4: Use Airtable Automation to Combine Name + URL
Go to the Automations tab in Airtable and create a new automation.
Set the trigger to run when a record is created or updated.
For the action, choose Update record, and make sure you select the same table you're working with. Then pick the Hyperlink Link field (the long text one you created earlier) as the field to update.
In the content area, use this markdown format:
[{{Name}}]({{URL}})
This will turn the plain name and URL into a proper clickable hyperlink, with the name as the label and the URL as the destination.
Once you're done, make sure the automation is turned on. It’ll now run automatically whenever a record is added or updated, and fill in the final hyperlink for you.
While it would be great if Airtable handled hyperlinks out of the box, these few steps will get the job done.
And the best part? Once you’ve set up the script and automation, you can reuse them anytime you’re importing links from Google Sheets or Excel. It takes a bit of effort upfront, but it’ll save you a lot of time down the road.
Get Airtable tips & tutorials
Get a concise Airtable tip or tutorial every week. No spam—just practical advice to help you get more from Airtable.
Need help or have feedback? Email me at[email protected]