Notion Currency Converter

When using Notion for travel planning , I mentioned that in Notion, the exchange rate can be automatically calculated by automation. Notion does not have such a system internally, so it needs to manually add an automation for calculating exchange rates.

The idea of ​​automation is this: when a user creates a new entry on the “Bill” page, enters the consumption amount and currency, the information is automatically extracted, converted into the value of a fixed currency, and added to the corresponding entry. As shown in the picture below, I just need to input the cost into “Local”, and then select the corresponding “Currency”, and the tool will automatically convert the price into British pounds and fill it in the form.

Here, Zapier and make are used to establish this automated process. The operation of Zapier is simpler, but it requires a small monthly fee; the setting of make is more complicated, but it is free.

boxcnI1qbdXKYqXTF0CzQZVjWLd

Zapier

Open Zapier, create a new “Zap”, and you will come to the interface as shown below. A Zap is an automated workflow that connects your applications and services together.

boxcnseB2BGy8LmLan9GlAUfkCg

Each Zap needs at least one trigger (trigger) and one action (action) to proceed. Each Zap can have multiple actions, but only one trigger can be set.

For this scenario, the trigger is “create a new entry in Notion”, so the following selections need to be made:

boxcnPTZUue4U2bJnFfuIIzzMIc

The next step is to connect the automation to the account. If the account has been bound before, it will be directly displayed here. If not, click “Connect a new account”, log in to Notion on the pop-up page, and select the database to be automated. Before going to the next step, it is recommended to add an entry in the database to confirm whether this step can be carried out smoothly.

boxcnOobX0Gq3LXm6fyWeWwZkcd

The next step is to select the page where the ledger is located. After selecting, enter the test and click “Test trigger”. If all goes well, Zapier will collect this data:

boxcn2hw3Bk2PIo29Nk0koAOf8g

The two data circled in the figure are what we need. Click Continue to go to the next step. What needs to be set at this time is that after the information is extracted, the next step of the automated process is required.

boxcnB3fbN9nrRSklb5RSJ8VXRc

The exchange rate conversion plug-in used is mallabe Currencies, and the operation that needs to be selected is “Convert Currency”. Registration and use of mallabe are free. After successful registration, an API key will be automatically generated, which can be entered in the next step “Choose account”.

boxcnw6ZKkmPlsQhdGIEwQJARHg

The next step is to select the amount and currency to convert. The type of the original currency (From / Base currency) is marked in the original form of Notion because the input data source is not uniform, so you need to select “Currency” under Custom (used to mark in the original form) currency column name).

The target currency is relatively uniform, you only need to find the option of “GBP” in the drop-down menu and select it.

boxcn8GXS4I2Li9omMFSYcpjdxd

Amount refers to the amount to be converted. Similar to the idea of ​​selecting the original currency, just click “Local”. If you want the exchange rate on a specific date (such as the time of adding an entry), you need to select “Property Date Start” in “Date”, otherwise it will be calculated according to the latest exchange rate at runtime.

boxcnzpN3vskgwYCnR7SpIqsT2f

Run the test, and enter the next step after successful conversion: add the converted data to the original table.

boxcngamqqfvGpjnXZyUhWCGopc

The process of selecting the App and connecting the Notion account in the next step is similar to selecting the trigger in the first step, the difference is that the “Event” needs to be “Update Database Item”.

boxcnzH4N7I51ZNh0HkFD7foeqf

In “Set up action”, you need to modify three places, namely:

  • Database: the page where the bill is located.
  • Item: The ID of the item to be modified. The source is “Custom – ID”, which is used to assist in locating where the entry is located.
  • Converted: The place left in the original table for the “converted GBP value”. The data source is the output result converted by mallabe in the automation process.

boxcnrbpbJLEHIiT0HTrvyk92Xeboxcn6JzFUNGc6accNkp2GYAo6f

If it can be output successfully, it means that there is no problem with this workflow. If there is an error in any step, Zapier will display a yellow reminder, just follow the prompts to modify.

During the test, I found that the Zap can be directly published (Publish) at this time, and Zapier can also receive the reminder of “new entry”, but it cannot detect the data and output it after conversion. This is because I am used to adding the expense name first when adding an entry, and then entering the specific consumption amount and currency, and Zapier has received the signal when “create a new entry”, so it can only read the name of the new entry, and the consumption data is still available. After this, it cannot be converted in time.

The solution is also very simple: add a “delay operation” between the Trigger and the first Action, and select the time to be extended. The length of the delay can be decided freely, just input it directly in the input box, I chose two minutes.

boxcnaaHcSwXE0o1EIDDOPSDDceboxcnXf7QI5Pnvjrj7kaEdOhKug

This way, when Zapier detects a new entry in the Notion database, instead of going to the next step immediately, it waits two minutes before reading the information in the new entry, converting the exchange rate, and adding the result to the table.

The workflow of the final version is shown in the figure below, and there are no problems in subsequent tests.

boxcnxa7j6xe1Nh9jlRzvBB2S6e

It needs to be mentioned here that depending on the subscription service, Zapier will have a period of time between each detection, called “update time”. For Starter-level subscriptions, it means that every two checks are at least 15 minutes; if new data is added within 15 minutes, you need to wait for a while; but if new data is added at any time after 15 minutes entry, this change is detected immediately by Zapier. There is no limit to the number of new entries detected.

In addition, because this workflow involves multiple Actions, it can only be used after subscribing to Zapier. The minimum monthly fee is $19.99, and there is a limit of 750 conversions per month.

boxcnDvEH2nf6vyh2lbtUm7qIZb

make

Open make and choose to create a new scenario. Similar to Zapier, a scenario in make is equivalent to a Zap/automation scenario, where a change triggers a specific action.

Click on the center of the page ➕ , create a new trigger. What is used here is “Watch Database Items”, which will trigger automation after the database entry is created or updated.

boxcnrDIpnOSJLYExOuNHsdfOTh

The first thing that needs to be set up is the connection to Notion. This step requires creating a new token in My integrations and pasting it. You can also click “···” in the upper right corner in the database, find Connections in the drop-down menu, select make and add.

This step will automatically generate an internal integration (internal integration). External tools can only access one workspace in Notion through internal integration, while public integration can connect to multiple workspaces, but manual settings are required.

boxcnJFvHitR5aWLEGfWtGNUDFVboxcnVJ4XvQQnbEYOWpVlNtLCrf

Watch Database Items is used to determine trigger conditions, “By created time” will detect newly added items, and “By updated time” will check changed items.

The database ID that needs to be added next can be resolved from the address of the Notion data table. The address of the Database page usually consists of two parts, roughly in the following format: https://www.notion.so/<long_hash_1>?v=<long_hash_2> where the <long_hash_1> part represents the ID of the database.

The limit of 20 in the figure below is the maximum number of entries obtained at each update. The minimum interval for querying updates in make is 15 minutes, which can be set according to your needs.

boxcnzHncdjQevrCN0inlrDPqWc

The next step is to choose “Choose where to start”, that is, from which data to start calculation. The default value is “From now on (from now)”, if there is old data that has not been converted in time, you can choose another time. However, after running it once, the settings will automatically return to the default options.

boxcnukZZKwXvIvXAfjAgJOayPb

After all the settings are complete, you can right-click and select “Run this module only” to check for bugs. After running once, make will extract the data in the table, and it will be clearer and more intuitive when selecting the data source in the next step.

boxcnySbB5upyJuaHIvU90MfHgh

The second step is to click to the right of the circular icon ➕ Set the currency converter. The built-in Currency in make is good enough.

Three values ​​need to be filled in, namely: data source; original currency; output currency.

The data source is the consumption amount recorded in the table. In make, you can go to Properties Value – Local (column name) to find, or you can search directly.

The default value of the original currency is a certain known fixed currency, and multiple currencies will be input when traveling, so you need to click “Map” on the upper left to enable it to read the data in the table, and then according to the input Type to add a different currency name. It should be noted that because this column in the original data table uses a single-selection list (Select), the “Currency” in the options on the left cannot extract the currency information, but you need to click the black triangle on the left and select Currency name can be entered correctly.

boxcn6oeKdwlDhkzktMuUhMMLchboxcnQaQo8BPOq0eWKSH8meUQPh

After this step is completed, it is also recommended to right-click and select “Run this module only” to check for bugs.

The app used in the third step is still Notion, but this time you need to “Update a database item” to add the converted value to the original data table.

This time you need to enter three basic options: Database ID, Page ID, and any entries that need to be updated.

The Database ID is the same ID used in the first step. Page ID is the ID of the item that needs to be changed. You should select “Database Item ID” in the pop-up option on the right, which corresponds to this item in the data table, or in other words, record the “row” spent.

boxcny6B79ETKCU5sMmLlDrxBHg

At this point, it can only be said that the row where the data is located is located, and it is also necessary to know which column of the row the converted cost should be placed in.

Create a new Item in Fields, Key refers to the column name of this column; Value Type is the data type (such as text, data, mailbox, etc.), here you need to select a number; the last Value is the converted cost value, you need to select the right The “Amount in output currency” in the side pop-up option can be read correctly.

When entering Key, the default method seems to be to select from the pop-up window on the right, but when I select 1. properties_value: Converted (that is, the data read in the first step), an error will be reported when outputting, and the column name is directly entered Instead, there will be no such problem.

boxcnKwbBxOOUlvvgS64ispmShe

After the test is correct, it can be saved. The final automation process is as follows:

boxcnPrQoJ802l3yALULBDIhXjh

Automatic detection is not enabled by default in make, and Scheduling needs to be enabled. Its default mode of operation is not the same as that of Zapier. Users can manually select “Run once” to run the program, or wait for it to run every 15 minutes-that is, exactly 15 minutes, like 12:15, 12: 30, 12:45 such intervals. In addition to daily and weekly monitoring frequencies, in the advanced settings, you can also set the frequency of “since XX”, “day of the week” and “every October”.

boxcnN8zmGVMRoixNqJS5EPDKihboxcnBvEH4rZLDrhWSzV2r5h6gd

The free version of make can run 1000 automations per month, and supports up to two automations running at the same time. If it is only used to convert exchange rates, although the interface is a bit difficult to understand, it is definitely more cost-effective than Zapier.

References

Notion’s road to automation transformation: Notion x Zapier’s first attempt – the minority

How I built a Budget Tracker with Notion (Template Included)

Where to find Database Id for my database in Notion?

This article is transferred from: https://sspai.com/post/77126
This site is only for collection, and the copyright belongs to the original author.