Program Functions

11 Ways to Generate Clickable Links with Notion Formulas

🔗 Clickable Formulas

Notion formulas can now be used to create clickable links that make constructing and navigating URL links a breeze. Creating clickable links in Notion formulas only requires inputting the correct code that results in a url syntax (https://www.website.com/…). Below are instructions on how to generate clickable links in Notion formulas for maps, social media searches, Twitter profiles, Wikipedia, Goodreads, and Amazon.

*Note: Links are only clickable in table view

Generate Map Links

Generate a link to a map (Google and Apple) from a text property for an address. This formula is compatible with any table that has a text property named "Address."

This Notion formula first checks if the text property "Address" is not empty. If it is not empty, it generates a link to Google Maps, replacing any commas (,) with empty spaces and replacing any spaces ( ) with a + sign. If the "Address" property is empty, the formula generates an empty string.

1. Google Maps

if(not empty(prop("Address")), "https://www.google.com/maps/place/" + replaceAll(replaceAll(prop("Address"), "[,]", ""), " ", "+"), "") 

2. Google Directions

if(not empty(prop("Address")), "https://www.google.com/maps/dir//" + replaceAll(replaceAll(prop("Address"), "[,]", ""), " ", "+"), "")

3. Apple Maps

if(not empty(prop("Address")), "https://maps.apple.com/?address=" + replaceAll(replaceAll(prop("Address"), "[,]", ""), " ", "+"), "")
 


Google and Social Media Searches

Every title “Name” property in this example is a keyword. The table is designed for copywriters to track trending keywords online.

Like above, the following Notion formulas check if the title property "Name" is not empty. If it is not empty, it generates a link to a Google, Google Trends, and Twitter search, replacing any commas (,) with empty spaces and replacing any spaces ( ) with a + sign. If the "Name" property is empty, the formula generates an empty string.

4. Search Google

if(not empty(prop("Name")), "https://www.google.com/search?q=" + replaceAll(replaceAll(prop("Name"), "[,]", ""), " ", "+"), "")

5. Google Trends

if(not empty(prop("Name")), "https://trends.google.com/trends/explore?q=" + replaceAll(replaceAll(prop("Name"), "[,]", ""), " ", "+"), "")

6. Search Twitter

if(not empty(prop("Name")), "https://twitter.com/search?q=" + replaceAll(replaceAll(prop("Name"), "[,]", ""), " ", "+"), "")
 

Twitter Profile Links from Tweets

Here are two useful Notion formulas for a saved Tweets database. These formulas are compatible with databases that have a url property named "URL."

7. Twitter Profile Name (@-Handle)

The first Notion formula is designed to generate a @-mention text result from a Twitter URL.

if(contains(prop("URL"), "twitter.com/"), "@" + replace(replace(prop("URL"), ".*https://twitter.com/", ""), "/.*", ""), "")

8. Twitter Profile Link

The second Notion formula generates a link to the profile’s page. For example, if you save a tweet from @NotionHQ, a link will generate to their profile page.

if(contains(prop("URL"), "twitter.com/"), replace(prop("URL"), "/status.*", ""), "")
 

Generate Wikipedia Links

You can generate helpful links to a Notebook database in Notion too. For example, you may want to research notes further by generating Wikipedia and Google search links based on a note’s title.

Like the above Google and Social media query formulas, this Notion formula checks if the text property "Name" is not empty. If it is not empty, it generates a link to a Wikipedia search portal, replacing any commas (,) with empty spaces and replacing any spaces ( ) with a + sign. If the "Name" property is empty, the formula generates an empty string.

9. Search Wikipedia

if(not empty(prop("Name")), "https://en.wikipedia.org/w/index.php?fulltext=1&search=" + replaceAll(replaceAll(prop("Name"), "[,]", ""), " ", "+"), "")
 

Generate Bookshelf Links

Generate links for your bookshelf library in Notion including a search for each book in Goodreads. The example below also illustrates a Notion bookshelf with a database view named "To Buy." This view collects all books in the user’s wishlist with a link to buy on Amazon.

Both Notion formula checks if the text property "Name" is not empty. If it is not empty, it generates a link to a Goodreads or Amazon search, replacing any commas (,) with empty spaces and replacing any spaces ( ) with a + sign. If the "Name" property is empty, the formula generates an empty string.

10. Search Goodreads

if(not empty(prop("Name")), "https://www.goodreads.com/search?q=" + replaceAll(replaceAll(prop("Name"), "[,]", ""), " ", "+"), "")

11. Buy on Amazon

if(not empty(prop("Name")), "https://www.amazon.com/s?k=" + replaceAll(replaceAll(prop("Name"), "[,]", ""), " ", "+"), "")
 

Further Reading