HTTP Request node
+4

Track investments using Baserow and n8n

Published 2 years ago

Created by

mutedjam
Tom

Template description

This workflow uses a number of technologies to track the value of ETFs, stocks and other exchange-traded products:

  • Baserow: To keep track of our investments
  • n8n’s Cron node: To trigger the workflow compiling our daily morning briefing
  • Webscraping: The HTTP Request & HTML Extract nodes to fetch up-to-date prices from the relevant stock exchange and structure this infromation
  • Javascript: We’ll use the Function node to build a custom HTML body with all the relevant information
  • Sendgrid: The Email Service Provider in this workflow to send out our email

Thanks to n8n, the steps in this workflow can easily be changed. Not a Sendgrid user? Simply remove the Sendgrid node and add a Gmail node instead. The stock exchange has a REST API? Just throw away the HTML Extract node.

Here’s how it works:

Data Source

In this scenario, our data source is Baserow. In our table, we’ll track all information needed to identify each investment product:

image.png

We have two text type columns (Name and ISIN) as well as two number type columns (Count and Purchase Price).

Workflow

image.png

Nodes

1. Cron

The Cron node will trigger our workflow to run each work day in the morning hours.

2. Baserow

The Baserow node will fetch our investments from the database table shown above.

3. HTTP Request

Using the HTTP Request node we can fetch live data from the stock exchange of our choice based on the ISIN. This example uses Tradegate, which is used by many German fintechs. The basic approach should also work for other exchanges, as long as they provide the required data to the public.

4. HTML Extract

Since our HTTP Request node fetches full websites, we’re using the HTML Extract node to extract the information we’re looking for from each website. If an exchange other than Tradegate is used, the selectors used in this node will most likely need to be updated.

5. + 6. Set

The Set nodes helps with setting the exact columns we’ll use in our table. In this case we’re first formatting the results from our exchange, then calculate the changes based on the purchase price.

7. Function

Here were using a bit of Javascript magic to build an HTML email. This is where any changes to the email content would have to be made.

8. Sendgrid

Finally we send out the email built in the previous step. This is where you can configure sender and recipients.

Result

The basic email generated by this workflow will look like so:

image.png

Share Template

More Finance workflow templates

HTTP Request node
Google Drive node
Google Calendar node
+9

Actioning Your Meeting Next Steps using Transcripts and AI

This n8n workflow demonstrates how you can summarise and automate post-meeting actions from video transcripts fed into an AI Agent. Save time between meetings by allowing AI handle the chores of organising follow-up meetings and invites. How it works This workflow scans for the calendar for client or team meetings which were held online. * Attempts will be made to fetch any recorded transcripts which are then sent to the AI agent. The AI agent summarises and identifies if any follow-on meetings are required. If found, the Agent will use its Calendar Tool to to create the event for the time, date and place for the next meeting as well as add known attendees. Requirements Google Calendar and the ability to fetch Meeting Transcripts (There is a special OAuth permission for this action!) OpenAI account for access to the LLM. Customising the workflow This example only books follow-on meetings but could be extended to generate reports or send emails.
jimleuk
Jimleuk
Google Sheets node
HTTP Request node
Merge node
+10

Invoice data extraction with LlamaParse and OpenAI

This n8n workflow automates the process of parsing and extracting data from PDF invoices. With this workflow, accounts and finance people can realise huge time and cost savings in their busy schedules. Read the Blog: https://blog.n8n.io/how-to-extract-data-from-pdf-to-excel-spreadsheet-advance-parsing-with-n8n-io-and-llamaparse/ How it works This workflow will watch an email inbox for incoming invoices from suppliers It will download the attached PDFs and processing them through a third party service called LlamaParse. LlamaParse is specifically designed to handle and convert complex PDF data structures such as tables to markdown. Markdown is easily to process for LLM models and so the data extraction by our AI agent is more accurate and reliable. The workflow exports the extracted data from the AI agent to Google Sheets once the job complete. Requirements The criteria of the email trigger must be configured to capture emails with attachments. The gmail label "invoice synced" must be created before using this workflow. A LlamaIndex.ai account to use the LlamaParse service. An OpenAI account to use GPT for AI work. Google Sheets to save the output of the data extraction process although this can be replaced for whatever your needs. Customizing this workflow This workflow uses Gmail and Google Sheets but these can easily be swapped out for equivalent services such as Outlook and Excel. Not using Excel? Simple redirect the output of the AI agent to your accounting software of choice.
jimleuk
Jimleuk
Google Sheets node
Mindee node

Extract expenses from emails and add to Google Sheets

This workflow will check a mailbox for new emails and if the Subject contains Expenses or Reciept it will send the attachment to Mindee for processing then it will update a Google sheet with the values. To use this node you will need to set the Email Read node to use your mailboxes credentials and configure the Mindee and Google Sheets nodes to use your credentials.
jon-n8n
Jonathan

More Building Blocks workflow templates

Webhook node
Respond to Webhook node

Creating an API endpoint

Task: Create a simple API endpoint using the Webhook and Respond to Webhook nodes Why: You can prototype or replace a backend process with a single workflow Main use cases: Replace backend logic with a workflow
jon-n8n
Jonathan
Customer Datastore (n8n training) node

Very quick quickstart

Want to learn the basics of n8n? Our comprehensive quick quickstart tutorial is here to guide you through the basics of n8n, step by step. Designed with beginners in mind, this tutorial provides a hands-on approach to learning n8n's basic functionalities.
deborah
Deborah
HTTP Request node
Item Lists node

Pulling data from services that n8n doesn’t have a pre-built integration for

You still can use the app in a workflow even if we don’t have a node for that or the existing operation for that. With the HTTP Request node, it is possible to call any API point and use the incoming data in your workflow Main use cases: Connect with apps and services that n8n doesn’t have integration with Web scraping How it works This workflow can be divided into three branches, each serving a distinct purpose: 1.Splitting into Items (HTTP Request - Get Mock Albums): The workflow initiates with a manual trigger (On clicking 'execute'). It performs an HTTP request to retrieve mock albums data from "https://jsonplaceholder.typicode.com/albums." The obtained data is split into items using the Item Lists node, facilitating easier management. 2.Data Scraping (HTTP Request - Get Wikipedia Page and HTML Extract): Another branch of the workflow involves fetching a random Wikipedia page using an HTTP request to "https://en.wikipedia.org/wiki/Special:Random." The HTML Extract node extracts the article title from the fetched Wikipedia page. 3.Handling Pagination (The final branch deals with handling pagination for a GitHub API request): It sends an HTTP request to "https://api.github.com/users/that-one-tom/starred," with parameters like the page number and items per page dynamically set by the Set node. The workflow uses conditions (If - Are we finished?) to check if there are more pages to retrieve and increments the page number accordingly (Set - Increment Page). This process repeats until all pages are fetched, allowing for comprehensive data retrieval.
jon-n8n
Jonathan

Implement complex processes faster with n8n

red icon yellow icon red icon yellow icon