Notion Investment Tracker Template + Live Stock Automation Tutorial

Notion Consultant
7 min readAug 23, 2023

This blog post is a tutorial on how to automate live stock prices in Notion using Financial Modeling Prep API and Make. With this, you can keep track of your investments like a pro and take your finance game to the next level. The post includes step-by-step instructions on how to set up the automation, as well as tips on how to track your assets and investments in Notion. A free template is also provided to help you get started.

Stock price automation

Setup

To get live stock prices into Notion, you’ll need three things:

  1. A Notion account: if you don’t have one already, you can create one for free here*
  2. A Make account: if you don’t have one already, you can create one for free here*
  3. An API key from Financial Modeling Prep: register on their website and get your free API key. If you need more features, you can subscribe to one of their plans.

The automation runs on Make, and to make your life easier, I made a blueprint (this is how Make calls their templates) that you can download here.‍

Notion

To get the live stock prices, you’ll need a database (called Portfolio) with at least two properties:

  1. Ticker (Title)
  2. Current price (Number)

You can also download my free Notion template (see end of post) if you want to make sure to set up everything properly.

Make

Now, let’s set up the automation.

Initialization

1/ Go to the Scenarios section

2/ Click “Create a new scenario”

3/ Click the three dots at the bottom (it says “More” on hover), and click “Import Blueprint”

4/ Select the Blueprint you previously downloaded in the Setup section & click “Save”

Module 1

1/ Click on the first Notion module

2/ Click Add a new connection (Connection type = Public)

3/ Follow the steps and make sure that your “Portfolio” database is contained in the pages that you select. You can select all pages from your workspace to be sure.

4/ Then, you want to connect your “Portfolio” database to the first step of the Make scenario. You have two possibilities:

Option 1: Click on the “Search” button, on the right of the “Database ID” section. Then type the exact name of the database (in your case “Portfolio”).

Option 2: Go to the “Portfolio” database and copy the database ID. The database ID is the first part of your URL, when you’re on the database page, after the “/” and before the “?”.

5/ Increase the limit to 1000 if it’s not the case.

6/ Your module should look something like that:

7/ Click “OK”.

8/ Right-click on the module, and select “Run this module only.” It should not return any error (errors displays in red) & you should have a 1 in the small bubble.

Module 2

‍1/ Click on the 2nd module (HTTP)

2/ If it’s not already set up (it should be), in the URL field, replace the item in black with your own one. Keep the “https://financialmodelingprep.com/api/v3/quote-short/" part of the URL, click in the field, then select your ticker name from your Notion database. (“properties values” → “Ticker” → “plain_text”).

3/ At the end of this same url, you need to add: ?apikey=

4/ After the equal sign, you need to paste your Financial Modeling Prep API key. You can find your API key in the dashboard section (if you created an account).‍

The URL field should look like that:

5/ Don’t change anything else. Your module should look like that:

6/ Click “OK”.

7/ Right-click on the module → “Run this module only” → Input AAPL in the “plain text” section of the “properties_value” field. It should not return any error (in red) & you should have a 1 in the small bubble.

⚠ ️ If you get an error such as “Account doesn’t exist […]”, add your own Notion connection to the second Notion module.

Module 3

1/ If you haven’t already, connect your own Notion account (select the same you created from module 1)

2/ In the “Database ID” field, paste the same database ID as the one in the 1st module.

3/ In the “Database Item ID” field, select “Page ID” of the 1st Notion module.

4/ In the “Current price” field, select “price” from “Data” from the HTTP module‍

5/ If you used the template, you can also add “volume” in the “Volume” Notion property section. If you haven’t used the template but still want to access the volume, create a new number property in your Portfolio database called “Volume” (it will also allow you to calculate the market cap in Notion).

6/ Click “OK”

Filter between Module 2 & 3‍

  1. Click on the dots between the 2nd and the 3rd module. It should open the filter.
  2. Your condition should be: properties_value.Ticker[ ]:plain_text “Equal to” Data[ ]:symbol

3‍/ Click “OK”

Final Steps‍

  • Run the entire scenario using the “Run Once” button (bottom-left of your screen). You will see the current stock prices in your Portfolio database!
  • You can now select the frequency of updates by clicking on the clock attached to the first module.

⚠ ️ The Make free plan gives you access to 1000 operations per month. You can upgrade to get more operations, and make sure you never run out of operations.

Build your investment tracker

Now that you have the live stock prices in your Notion, you can play with databases to make all sorts of calculation for you.

Investments database

The investments database is where you keep track of all the investments you have made over time. Create a new table and add a relation property to Portfolio. Then, add a rollup to retrieve the current stock prices for each asset.

Add two number properties: “Invested” and “Shares”. These are the fields you will have to fill out when you make a new purchase (in addition to the stock you purchased).

All the rest can be automated. For example, you can add a Profit/Loss formula property using the following formula: prop(“Current price”) * prop(“Shares”) — prop(“Invested”)

You can also calculate your share price (from when you purchased the shares) and the growth.

Portfolio database

The Portfolio database is one you already have; it’s the database that contains the live stock prices.

Now that it’s linked to the Investments database, you can use rollups to retrieve the total profit/loss, number of shares for each stock, and the total portfolio value.

You can also make use of linked databases to have a separate view for live stock prices.

Accounts database

If you have multiple accounts or not, I recommend building an accounts database. In addition, to track investments for each account, it can help aggregate all the data into one unique place.

You’ll be able to see your total balance and total profit/loss for all of your stocks. Additionally, it will help you access your portfolio percentage in the portfolio database.

Free template

‍Download my free Investment Tracker Notion template to gain access to the entire dashboard. This template enables you to track your portfolio’s value, total profit and loss, portfolio percentages, and more.

If you think you won’t be able to set up the automation yourself, don’t worry! Choose the “Setup” plan (€249), and I’ll build the automation for you.

Investment Tracker Notion template

Conclusion

In conclusion, automating live stock prices in Notion can be a powerful tool for tracking your investments like a pro. With the help of Financial Modeling Prep API and Make, it’s easy to set up and can save you a lot of time. By using the free template provided and following the steps outlined in this tutorial, you can take your finance game to the next level.

* some of the links in this post are affiliated, which means I may earn a small commission if you decide to subscribe to their service.

Start now & create your Notion account🙃
(
#NotionPartner)

Originally published at https://www.ramesquinerie.com.

--

--