-
Notifications
You must be signed in to change notification settings - Fork 2
/
stock-portfolio-tracker-alpha-vantage-GQBdbOK70xJ7VRGP.json
1 lines (1 loc) · 5.67 KB
/
stock-portfolio-tracker-alpha-vantage-GQBdbOK70xJ7VRGP.json
1
{"createdAt":"2023-09-17T14:46:49.153Z","updatedAt":"2023-09-17T14:54:40.850Z","id":"GQBdbOK70xJ7VRGP","name":"stock-portfolio-tracker-alpha-vantage","active":false,"nodes":[{"parameters":{"resource":"databasePage","operation":"getAll","databaseId":{"__rl":true,"value":"2c92f5c3-59c2-42cf-991e-a8479e1662e6","mode":"list","cachedResultName":"Stock Portfolio Tracker","cachedResultUrl":"https://www.notion.so/2c92f5c359c242cf991ea8479e1662e6"},"returnAll":true,"options":{}},"id":"455bfa8b-7ea2-4af0-aa99-d2c827133b30","name":"Get tickers [NOTION]","type":"n8n-nodes-base.notion","typeVersion":2,"position":[1400,1553.1243857156576],"credentials":{"notionApi":{"id":"TYuQTj9R26RPCP1d","name":"Notion API"}}},{"parameters":{"resource":"databasePage","operation":"update","pageId":{"__rl":true,"value":"={{ $('Get tickers [NOTION]').item.json.id }}","mode":"id","__regex":"^([0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12})"},"propertiesUi":{"propertyValues":[{"key":"Price|number","numberValue":"={{ Number($json['Global Quote']['05. price']) }}"},{"key":"Price date|date","includeTime":false,"date":"={{ $json['Global Quote']['07. latest trading day'] }}","timezone":"Africa/Lagos"}]},"options":{}},"id":"240624b5-e8e3-41cc-846b-7da7d472f4e9","name":"Update rows [NOTION]","type":"n8n-nodes-base.notion","typeVersion":2,"position":[2260,1333.1243857156576],"credentials":{"notionApi":{"id":"TYuQTj9R26RPCP1d","name":"Notion API"}}},{"parameters":{},"id":"c4cfca29-1772-4365-a6b3-28ad090916c1","name":"No operation","type":"n8n-nodes-base.noOp","typeVersion":1,"position":[1820,1753.1243857156576]},{"parameters":{"batchSize":1,"options":{}},"id":"fad4c672-35a6-498b-905f-3e7926b38299","name":"Split in batches","type":"n8n-nodes-base.splitInBatches","typeVersion":2,"position":[1620,1553]},{"parameters":{"url":"=https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol={{ $json[\"property_ticker\"] }}&apikey=H42OB4LPV3GIWMBB","options":{}},"id":"451e1938-c3c5-4eec-845f-b6c97f196b61","name":"Quote endpoint [VANTAGE ALPHA]","type":"n8n-nodes-base.httpRequest","typeVersion":4.1,"position":[2040,1333.1243857156576]},{"parameters":{"content":"## ⚠️ Note\n\n1. Complete video guide for this workflow is available [on my YouTube](https://youtu.be/up2Wi3Y9a-4).\n2. Remember to add your credentials (covered in the video guide).\n3. Notion template (Stock Portfolio Tracker) for this workflow available [here](https://shy-angelfish-d73.notion.site/76ac1d158bec4533807f80f296e89b10?v=98e123608ad54d8198174907691c8ace&pvs=4) (click \"duplicate\" to add template to your workspace).\n4. If you like this workflow, please subscribe to [my YouTube channel](https://www.youtube.com/@workfloows) and/or [my newsletter](https://workfloows.com/).\n\n**Thank you for your support!**","height":311.3138775936101,"width":398.52076028843226},"id":"10aa09f1-857b-49c8-b812-48e740d46101","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[700,1393.1243857156576]},{"parameters":{"rule":{"interval":[{"daysInterval":0}]}},"id":"c4f1a873-96a0-4a72-a105-506fca0b59d1","name":"Schedule trigger","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.1,"position":[1180,1553.1243857156576]},{"parameters":{"content":"## Trigger\n\nWorkflow is activated everyday at specific time. ","height":323.538552133761,"width":178.9116807727541},"id":"88b3afc5-f6f7-4ab2-aec9-b0b8e5d52990","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1140,1393.1243857156576]},{"parameters":{"content":"## Get tickers\n\nReturn stock tickers from Notion database. ","height":323.538552133761,"width":178.9116807727541},"id":"ea65ce5a-6153-4435-9fbc-707662ed696c","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1360,1393.1243857156576]},{"parameters":{"content":"## Get prices and update database\n\nThis sequence gets current stock prices using [Alpha Vantage API](https://www.alphavantage.co/) and updates rows in Notion database. Free API key provides **5 API requests per minute**, so workflow sends request every 12 seconds.\n\n**Important:** remember to replace ```[YOUR_API_KEY]``` in field URL with your actual Alpha Vantage API key.","height":396.66293784941865,"width":628.9480210610396},"id":"92069d80-4b44-4751-9fdc-d0b1c6952f0d","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1780,1120]},{"parameters":{"amount":12,"unit":"seconds"},"id":"b60a577f-6e54-4522-b3e7-d6161828ead0","name":"Wait 12 second","type":"n8n-nodes-base.wait","typeVersion":1,"position":[1820,1333],"webhookId":"2f1d1415-8666-4564-be5f-da72eadd3dc8"},{"parameters":{"content":"## 🌐 API\n\nThis workflow is using Alpha Vantage API - you can find documentation [here](https://www.alphavantage.co/documentation/). ","height":127.88000524738811,"width":398.52076028843226},"id":"b6ca8c81-3599-4769-b2e2-e7172d179dc3","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[700,1733.1243857156576]}],"connections":{"Get tickers [NOTION]":{"main":[[{"node":"Split in batches","type":"main","index":0}]]},"Split in batches":{"main":[[{"node":"Wait 12 second","type":"main","index":0}],[{"node":"No operation","type":"main","index":0}]]},"Quote endpoint [VANTAGE ALPHA]":{"main":[[{"node":"Update rows [NOTION]","type":"main","index":0}]]},"Update rows [NOTION]":{"main":[[{"node":"Split in batches","type":"main","index":0}]]},"Schedule trigger":{"main":[[{"node":"Get tickers [NOTION]","type":"main","index":0}]]},"Wait 12 second":{"main":[[{"node":"Quote endpoint [VANTAGE ALPHA]","type":"main","index":0}]]}},"settings":{"executionOrder":"v1"},"staticData":null,"meta":null,"pinData":{},"versionId":"bff7a0dd-88b2-4f4d-8687-ce72c2515488","triggerCount":0,"tags":[]}