Advanced AI Data Analytics Agent Build: Masterclass in Flowise and n8n

Limitless AI ยท Beginner ยท๐Ÿ“Š Data Analytics & Business Intelligence ยท1y ago

About this lesson

Let's Build AI Automation Systems for your Business and see how we can help you scale with AI. ๐Ÿ‘‰Click here to apply to speak with us @Limitless AI : https://cal.com/jeffrey-limitlessai/30min Build a Data Analyst AI Agent with n8n & Flowise | Step-by-Step Masterclass Download the FREE Resources HERE to follow along ๐Ÿ‘‰: https://limitlessai.gumroad.com/l/data_analyst_agent In this in-depth tutorial, I'll walk you through the complete process of building a powerful Data Analyst AI Agent from scratch using n8n and Flowise! Whether you're a beginner or a seasoned pro, this tutorial will guide you step-by-step to create an intelligent AI agent capable of scraping data, updating knowledge bases, and performing advanced data analysis and visualizations using Python. Here's what you'll learn: 1. How to design agentic workflows in Flowise 2. Seamlessly integrating automation tools in n8n 3. Powering the AI Agent with the Anthropic Claude Sonnet AI model for complex coding and tool use 4. Automating data scraping and knowledge base updates 5. Utilizing the E2B sandbox code interpreter for creating Python-based data visualizations By the end of this tutorial, you'll have a fully functional AI-powered data analyst that can tackle real-world data challenges with ease. ๐Ÿ””Don't forget to LIKE, SUBSCRIBE, and hit the notification so you donโ€™t miss out on more practical AI automation builds! ๐Ÿ›  TOOLS USED [some are Affiliate Links to Access tools]: Eleven Labs AI Voice [Affiliate link] ๐Ÿ‘‰https://try.elevenlabs.io/4l0b8yi9gl3b 1. n8n AI Automation ๐Ÿ‘‰ https://n8n.partnerlinks.io/limitless_ai 2. Flowise AI ๐Ÿ‘‰ https://flowiseai.com/ 3. Google Finance SERP API ๐Ÿ‘‰ https://serpapi.com/google-finance-markets 4. Airtable ๐Ÿ‘‰ https://airtable.com/invite/r/BNflfRWj ๐Ÿ“… Timestamps: 00:00 โ€“ Intro 01:34 โ€“ About Flowise 04:51 โ€“ Building the Data Analytics Agent in Flowise 14:48 โ€“ Building the Google Finance Scraper Tool in n8n 15:38 โ€“ Create Custom Scraper tool for the Agent 22:55 โ€“ Create

Full Transcript

[Music] hello how's it going everyone welcome back to the channel in this video I'm going to show you how to build an AI powered financial data analyst using flow eyes and then 8N by the end you'll have an AI agent that can analyze market trends stock performance and more automatically if you're ready to transform the way you handle data analysis stick around for the full breakdown and some expert tips along the way all right let's Dive Right to the proper build step by step today we're combining two absolute powerhouses in the AI and automation World flow eyes and n8n flow eyes is your all-in-one tool for building interactive AI agents with ease and n8n is like the secret sauce that automates everything in the background these tools together absolute game changers imagine having an AI that can pull financial data from Google Finance analyze stock trends and give you insights without lifting a finger that's exactly what I'm going to help you build today let's get started first things first let me show you how this full system works here we have the full Logic on how we built this AI analytics agent we are combining the capabilities of flowise AI agent Builder and The Powerful autom ating efficiency of n8n for our AI agent flise will be our building platform of choice flse AI is an open-source low code platform that enables developers to create custom applications using large language models LMS with ease its intuitive drag and drop interface allows users to design complex AI workflows without extensive coding knowledge flowy supports various AI tasks including natural language process ing sentiment analysis image recognition fraud detection and recommendation systems by simplifying the development process flow makes Advanced AI Technologies more accessible to a broader audience n8n doio is a workflow automation platform that enables users to connect and automate tasks across various applications and services it offers a userfriendly node-based interface allowing both Technical and non-technical users to designed complex workflows without extensive coding with over 400 Integrations nn. facilitates seamless data transfer and process automation between tools like Google Sheets slack and GitHub users can self-host n8n doio for enhanced privacy and control or opt for the cloud hosted version for convenience additionally n8n doio supports Advanced AI function functionalities enabling the creation of custom AI applications such as chatbots and data analysis tools this data analyst AI agent will be powered by one of the most powerful llm recently released you probably heard about the recent release by the anthropic AI team the newest Claude sonnet model in terms of coding proficiency Claude 3.5 sonnet has made remarkable strides it excels in understanding complex programming tasks generating efficient code and debugging errors this advancement positions it as a valuable tool for developers streamlining the coding process and enhancing productivity the reason why in this AI agent we are going to build we will leverage the coding prowess of the latest Claude Sonet 3.5 AI model to power the data analytics and data visualization cap capability of our data analytics agent all right enough of the intro already let's start with setting up our AI agent within flow eyes you can sign up for a cloud account from the Floy website Linked In the description below however when you sign up for the cloud account you will be put on a waiting list before you can access and start building so in my case I will be using my self-hosted version of my flow eyes instance I did this using the cloud hosting provider called render unfortun fortunately I will not be going through the setup in this video as this would be an entire tutorial I will link an awesome full step-by-step tutorial by another YouTuber whom inspired most of this AI data analytics AI agent build we are going through today his name is Mr Leon vanil to start building let's go over to our flow wise account from the dashboard menu let's choose chat flows to create a new AI agent workflow by clicking add new we will then be redirected to the flow wise Builder canvas we will click on Save and rename our AI agent let's call this data analyst agent and hit save from the canvas we can click on the plus button at the top left here we can see all of the different node options that we can choose in building AI agent workflows and more you see here we have agent nodes for building AI agentic workflows various chain nodes and chat models which is very important to power your AI agent builds as you can see there's so many options available from open AI anthropic hugging face llms Mistral Ai and Gro chat we also have document loaders for building retrieval augmented generation AI agents embeddings for handling data sources llms from almost all of the available providers agent memory output parsers prompt templates retriever nodes for retrieving Vector databases and text Splitters to handle Vector data we also have various different tools that will be available for our AI agents to access using tool calling functionalities and Logics and Vector stores which is a very powerful feature for handling data sources and knowledge bases for any types of AI builds flowise uses Lang chain as its underlying architecture to create AI workflows flowise is essentially a low code interface built on top of Lang chain the reason why you can see that all these nodes are under the Lang chain architecture which allows us to build AI workflows to build our data analyst agent let's click on the nodes menu button head over to agents and let's choose the tool agent node our tool agent nodes requires three sub nodes the tool node where we will hook up the different tools we will give our agent access to execute various tasks as a data analytic AI a memory node to make sure our agent has context for previous conversation with the user and a tool calling chat model it's important to note that the tool agent will only accept an AI model capable of tool calling in this case we will hook up the anthropics Claude Sonet 3.5 latest model in the additional parameters field here we can configure the system prompt we will give to our tool agent this will be the system message message that instructs our tool agent to carry out different tasks while conversating with the users now let's give our tool agent its brain let's connect the tool calling chat model by going to the nodes menu into the chat models options let's choose the anthropic chat model node let's then configure our API credentials we can create our API credentials by clicking on create new let's get our API Key by going over to the anthropic website click on the cloud menu and go to the API page and you'll be redirected to the console. anthropic docomo menu let's create a new API key let's name this API key YouTube tutorial let's copy the key and paste this into the flowise credential creation interface let's call our API credential YouTube demo now that we have our anthropic API credentials let's select our credentials in choose our AI model for this build we will choose the Claud Sonet 3.5 latest model and let's set the temperature to 0.1 which will ensure we're getting the most precise behavior from our AI model minimizing too much creativity in its responses now we can connect our chat model to our tool agent node like so up next we will need a memory for our tool agent node let's choose buffer memory as our memory node now let's add the first tool for our AI agent from the tools menu let's choose code interpreter by e2b e2b is an open source infrastructure that allows us to run AI generated code in Secure isolated sandboxes in the cloud our AI agent is powered by Claude AI that is capable of generating python codes in the background and uses the e2b code interpreter to run the codes and return data analytics and visuals using pyth Pyon data science libraries we can think of it as a small computer for the AI model for our example since we're building an AI data analysis chatbot we would start the sandbox for every user session in our conversation with our AI data analyst agent to create our e2b API credentials let's head over to the e2b website and sign up for a free account I've already created my account so now we can go over the dashboard here we can get our API Keys which we will copy and paste to create our e2b credentials now we can connect our e2b code interpreter node to our tool agent node so now we got our tool agent its primary tool to execute data analytics and data visualization actions next let's add a system prompt for our tool agent node here we gave it a prompt that says you are an expert data analyst assistant use the code interpreter tool to execute python code that you wrote yourself to conduct data analysis and data visualizations and return your response to the user let us also add a capability for users to upload any files or document within the chat interface in the top right corner let's click on the settings button and in the file upload option let's activate the enable file uploads dial and there you go we're done building the basic functionality of our data analyst AI agent we can now test our agent by saving our workflow and start chatting with our AI data analyst in the chat window let's now test our data analyst agent let's upload a CSV file containing financial data of stock market trends and let's ask our agent to summarize the data for us here you can see how our agent responded with the summary of the data contained within the CSV file we uploaded within the chat interface it also gave us a nice data visualization from the data we provided [Music] if we look at the execution that our AI agent did we can see that it called the code interpreter tool correctly and used it to execute python codes it generated in the background here we can see how our AI agent generated the visuals and Analysis using python codes expertly generated using libraries that are used in data analytics and data science s like pandas numpy matte plot lib and so on look how awesome the graphic gave us using the analysis from our data this is just phase one of our build in the next part we will build additional capabilities and integrate automations to our data analyst AI agent to make it more powerful and capable of doing data analyst jobs for us let's push the test to another level to see what more our AI data analysts can do let's ask it to recommend other visualizations to further get insights of our stock market data and there you go in an instant it gave us more visualization from our data it also provided us with meaningful analysis and insights about the reasoning and details about the visuals it created for us to wrap up what we have built so far let's go ahead and look at our process map here we have already built the basic functionality of our data analyst agent we hooked up the code interpreter tool to our agent giving it the capability to execute python codes in the background powered by anthropics Claude sunet 3.5 latest model and making it do amazing data analysis and visualizations through conversating from the chat interface we still have two more tools to build for our AI agent and in our next phase we are going to build the custom tool for our data analyst this Custom Tool will give our agent the cap capability to scrape data from the Google Finance website to gather stock market data based on a search query or parameter we give it the Custom Tool in flow wise will be used to trigger an n8n automation using JavaScript code to send a web hook response to our n8n workflow the n8n automation workflow will then be triggered based on a query parameter set by the user through the chat conversation the query parameter received by naden through web hook will then be used to execute an HTTP request to access the API endpoint from Google Finance website using the Ser API credential we will be setting up then once we executed the HTTP scraping action we will store the data into an air table database which we will set up later this is the Google Finance website that we are going to scrape data from here you can see we have the stock market data which can consist of market index funds top stocks performers and Los users cryptocurrencies and so on we will access this data by creating our own Google Ser API account to get access credentials and start scraping the Google Finance website using the n8n automation tool that we are going to build now let's start building our scraper automation tool let's head over to nn. and sign up for a free trial cloud account once we have our account we will be directed to our n8n dashboard here we can start building a new workflow for our scraper automation tool let's start by giving our workflow a name let's call it Google Finance scraper now in the center of our canvas we can see her a plus icon this is where we choose our trigger node for our workflow let's choose a web hook trigger for our scraper Automation in this trigger node we can see here the web hook URL which we can set to various HTTP request method like post get and so on we can also change the url path let's call our path YouTube [Music] demo now in order to connect our flow wise agent to our n8n scraper automation using this web hook trigger we created let's head back to flow wise in flow wise let's go to tools menu here we can create a new tool let's click create and let's give our tool a name like n8n respond web hook then let's add a description for the tool note that this description is very important for the AI chat model to recognize what this tool is all about and enable it to call the tool properly let's also add an input schema to our tool this input schema is what we will send to our web hook respond that will be sent to our n8n automation workflow let's name the property of our input schema as query of typ string let's also add a description to describe what this input item is all about for our AI agent to learn when to send this data from our chat conversations make sure to click the required column here to check the tick box next we need to write a JavaScript code that will handle the response to our web hook tool from n8n if you don't know anything about JavaScript do not worry since flowy prepared a template for us by clicking the C example button here you can then edit the sample JavaScript code by changing the URL variable using the URL we get from the n8n web hook node let's also change the method to post and let's add a body parameter using the query variable we set from our input schema this process is explained from the flowise documentation for your reference now that we created our Custom Tool in flow wise and we connected the web hook action to our N8 and workflow we can then go ahead and hook up the Custom Tool into our tool a agent let's go back to the flow wise workflow canvas and let's look for the custom tool node within the tools option drag this tool into the canvas and let's set up the required fields from the select tool Dro down we can now see the tool we just created earlier let's select the tool and let's attach the tool to our tool agent next let's improve the system prompt we gave to our tool agent node we need to add more instructions to our AI to enable it to use the additional tool like the Custom Tool we connected to it this way we can test if the custom web hook tool will properly respond and connect to our n8n workflow here let's give it a more refined system prompt since this tool agent will be able to execute the scraping action using the n8n automation to the Google Finance website we need to send the query parameter required by the Ser API endpoint to our n8n workflow using the web Hook connection we set up earlier here the query we need to send to n8n must be of the following items index for searching market index funds most active stocks gainers losers crypto and so on now let's test the web Hook from our n8n automation workflow to see if we can send the query parameter properly from our chat conversations let's head over to n8n and in our web hook trigger node let's click on listen for test event and then back to to the flo I agent build let's start a chat conversation with the agent let's chat with our agent and tell it to gather new financial data related to index funds there you go as you can see here it called the tool properly in the background to execute the scraping task for new financial data related to index funds back to our N8 and workflow you can see here that the response we get from flowise agent conversation returned the exact query via the the web hook trigger which is the query parameter here indicating index since it is now working let's pin this data in our trigger node so that we can use this response over and over again while we finish building our n8n scraper workflow here in our n8n workflow let's start to create the succeeding nodes to our scraper tool let's add an HTTP request node to connect with the Google Finance API endpoint using our Ser API credentials to complete the required fields in our HTTP node let's head over to Google Sur API dashboard from the menu select the Google Finance markets API here we can use the provided curl code which we can then import to our HTTP node in n8n let's copy the code and in the n8n HTTP node click on import curl now you can just paste the code to import and fill out the required fields from our HTTP node in the API key copy and paste your own Ser API key which you can get from your Ser API dashboard when you signed up for an account now in the trend field under query parameters instead of hardcoding the query which is index in this case we can drag and drop the query value we get from the web hook trigger which came from our Flo ice agent conversation this way we can dynamically set the query parameter to whatever search term we are going to execute based on our conversation with the agent from flowise Let's test this step to see if our HTTP request node is going to get a response back from the Google Finance API endpoint to receive the data we want from our query parameters there you go it all came back with the data coming from the Google Finance API up next let's add an edit Fields node this node will ensure that we're only going to grab the data we need from the entire data we received from our HTTP call here we're only interested with the market trends data let's drag and drop this array of data to our edit Fields node let's also grab the search parameters data so that we can grab the trend item which will return the search query for this specific run up next we will add another node this one is called split node which will make the array of data from our previous node split into items let's drag and drop the market trends array to split the data out let's also include the search parameter data so we can grab the query parameter into our database now to test the output here we can see all of the data we want to grab and record into our database now let's also format the output from our split node to make sure we're getting the correct values from each of the items in our data let's add another edit Fields node here now we can drag and drop each item into the field and edit the name or headers we will test later if the number values we are getting will not throw any errors once we upsert them into our database if we encounter error like getting a string output format instead of a number value we will adjust our database column to format into string so we would avoid any error while upserting records [Music] now that we are getting the scrape data from Google Finance website we need to create our own database for this build we will use the air table platform to create a database let's go ahead and create our new database using air Table after signing up for a free account here we have our base table creation to create the database we will use for our Automation and AI agent build we will use the import option to upload a CSV file that we created beforehand this CSV file of stock Market data contains the same columns and values based on the data we scraped from our n8n automation workflow using an HTTP request to access the Google Finance API endpoint let's go ahead and click on ADD or import button here at the top and choose the CSV file from the options we will then use the CSV file saved from our desktop folder called stock market Trend CSV once uploaded we will need to finish finished the setup to build our air table database using the CSV data by clicking import now our database table is set and all we need to do is edit the column formatting for each column values to make sure we're getting the correct data coming in from our n8n automation once we upsert the scraped data into our base let's also change the base name to stock market data and the table name to stock data now our database is ready to use with the structure of each column setup the next step is to connect this air table database we built into our n8n automation workflow for this we need our air table credentials by creating our personal access token to access this API endpoint to create our personal access token let's head over to the Builder Hub by clicking our account profile icon from the top left and access Builder hub from the menu we will then be redirected to the Builder hub page where we can create our personal access token to do this let's click on the personal access token option under developers and click on the blue create new token button let's give it a name like Stock Market database in the scope settings we need to Define permissions we give to our API access credentials let's choose everything except for the developer permission and the user metadata then we can identify what base we give all these access permissions to in our case the stock market data we just created click on create token and now we can copy our personal access token to be used in our automation credentials let's continue building our n8n scraper automation let's go back to n8n and add another node to our workflow let's look for air table and choose to create a record node here we need to set up our air table credentials by clicking create new credentials then choose the default access token instead of the other one which which is oo 2 let's now paste in the personal access token we copied from our air table Builder Hub earlier hit save and now we can connect our air table database to our workflow let's then set up the required fields for this node leave the resource and operation field as default in the base field let's choose by ID settings and now we need to copy the base ID of our air table database we can get this ID by going over to our air table database page in the URL this part right here that starts with ap is our base ID let's copy this and paste into n8n let's also copy the table ID to our node field where table ID is required from the air table database URL this here where it starts with TBL is our table ID that we need to copy and paste into the node field now all the column headers from our air table database will be seen listed here inside our nodes since we selected the map each column manually option in the mapping column mode field with this we can drag and drop the values we are getting from the previous node where we get our pre-processed data from scraping using the HTTP request it's very important to note that we need to test whether the formatting of the data we are upserting to our air table database are the same like for cases where the scraper outputs a string value instead of a number this will throw an error when we try to create the record to our air table base in cases where we can't change the output format from previous edit field nodes like when we converted strings to number formats and it still outputs string instead of number we need to adjust the field formatting in our air table database into a string to avoid getting error when running our Automation in the production settings one should take note of these types of error when maintaining this entire automation system let's now test this out and see if we can upsert the data we scraped into our air table database using our automation workflow and there you have it we've successfully recorded the finance data scraped from the Google Finance website using the Google Ser API access and HTTP requests we executed in our workflow now we are finished building our scraper tool that will run in the background automatically when our AI data analyst agent will be asked by the user to gather new financial data from the Google Finance website to be used for data analytics and visualization sessions at any given point of conversating with our agent with this tool we gave to our data analyst agent this data scraper tool we built in n8n will be automatically called whenever needed now we still have one more tool to build for our data analyst and that is the retriever tool which we will start creating next this retriever tool will give our AI data analyst agent the capability of a retriever augmented generation or rag agent the retriever tool will allow our agent to access a document store or a vector store that we will build to access all of the data that has been scraped using the scraper automation workflow we built earlier that records those data into an air table database the goal is to make sure all the scraped data will be recorded automatically into a vector database converting the data into vectorized information which makes it more efficient for AI agent to access instead of a normal database like the air table we created this will ensure a more robust data store system for any project we need to build using the same logic for any types of applications and enable our AI agent system to scale now onto the build process first thing we need to do is create a document store within flowise flow wise's document stores offer a versatile approach to data management this enables us to upload split and prepare our data set and upsert it in a single location in our case in a pine cone Vector database this centralized approach simplifies data handling and allows for efficient management of various data formats making it easier to organize and give our AI agent access to our data within flow wise to make this system more powerful we will build an n8n automation on top of this data management system to simp simplify and run the data upsert or update automatically without having to handle this manually as it is currently designed within flow eyes in our flowise dashboard we can see on the right menu right below the options is the document stores let's click on it and here we can start building our document store click on add new button and let's give our document store a name you can see here we don't have data yet within our do doent store let's click on our document store created and we will be redirected into the setup here we can add a new document loader document loaders allow you to load documents from different sources like PDF txt CSV notion Confluence Etc in our case we will use the air table document loader available here from the various options to choose from let's go ahead and choose air table and now we will need to connect our air table credentials just like we did in our n8n automations let's create a new air table credential let's give it a name now let's paste the access token we got earlier also as we did before let's paste the base ID also paste the table ID and for the view ID let's copy that from the last part of the URL of our air table database this one here that start with viw let's paste that here I will leave the rest as default but I will change a limit to 500 this will mean that the limit it will return when we query our document store is within 500 chunks of data now let's try and click the process chunks button here at the top let's refresh this and there you have it we now upsert it our data into our document store from the air table database here we can see how our data were UPS certed in into chunks within our document store these are the same data we had from our air table database let's further enhance our document store now that we already have our document loader set up in the Above menu buttons we can now see the option to configure our upsert process for this specific document store we created let's click on this upsert config button and we will be redirected to the configuration settings here we have three different items to configure we have the the embeddings which will handle the vectorization of our data we also have the vector store where we will store the vectorized data and the record manager which manages data entry and deletion of duplicate data that will be recorded within our Vector database this ensure we only get unique records every time we upsert into our document store let's click on the embedding setup and let's choose the open AI embeddings here we need to configure our open AI credentials let's create a new credentials by going to platform. open.com API Keys website we can create a new API key and copy and paste the key into our flowise credential setup in the model name let's choose text embeddings three small I'll leave everything here to default now let's go ahead and choose our vecta store from the choices we will select pine cone let's go ahead and create our pine cone API credentials as well let's go over to pinec cone. and create our new account I've already created mine so once you're done with your account you will see a dashboard like this where you can create your new Index this index will be our Vector database within pine cone let's create a new index and name this as flow eyes data analytics in the configuration let's click on set up my model button here and we can choose the same embeddings model we selected earlier such as open AI text embeddings three small let's leave the rest of this Fields as default but you're free to select whatever you want if you are on a paid version of pine cone let's hit create index and there you go we now have our pine cone index without a record in it yet now to get our API key from Pine Cone we can go to API keys from the menu and let's create a new API key I already have mine here so I can copy this key and paste this into the flowise credential now let's choose our credential and in the pine cone index field let's choose the index that we just created let's also create a name space within our Index this will make sure we are categorizing the data coming into our index from the pine cone database I'll call mine Finance data for the rest I will leave it on default values then the last item we need our record manager setup here let's choose postgress record manager now we need an API credential for postgress account to get this we need to use superbase to create a postgress database let's sign up for a superbase account once signed up we can create a new project and let's name this project flowise data analytics Ai and set up the database password remember remember this password as this will be needed later in the setup this will take a few minutes to set up our project and start using the credentials now that our superbase project is ready let's head over to project settings under configurations let's click database and we will be directed towards the database connection parameters as you can see here these are all the credentials we need to set up the record manager from flow wise's upsert configuration so back flow wise let's name our postgres API with something meaningful like postgres superbase API let's copy and paste the username and the password we created earlier now for the host name let's also copy the one from super base the database name as well for the port we'll also copy and paste it here and the last part is to set the cleanup method we will choose full to make sure no duplicates will be upsert into our database let's save this config now we can click on upsert button here and this will now upsert our document store data into our Vector database fully managed by our postgres superbase setup there you go we now upsert six records into our Vector database and you can see how it has been chunked into six items back in Pine Cone we can now see that within our index there is actually six new records created our document store is now complete complete now that we have our document store set up what we're going to do next is to automate this step here within our document store this part here under options where we can click on preview and process option this is what we're going to automate in the background using inate n the idea here is that in flow eyes you need to manually go over here into your document store and click this preview and process button to ensure your data will be updated into the vector database every time new set of data is coming in from the air table database this manual process can actually be automated using n8n automation solution employing an API endpoint access in a nutshell once the user scraped for new data from the Google Finance website it will then be recorded in the air table database to make sure we can capture this new stream of data into our document store without having to manually update the database we will use n8n to do this for us in the background so let's head over to our n8n account let's create a new workflow and name this with flowise Doc store upsert automation let's now add a trigger node we will choose air table and under triggers we will select on new air table events trigger this will make sure that whenever new action has been made like upserting of new data into our air table base this n8n workflow will run automatically to process the upsert of this new data into our Vector database let's set the trigger node and use our air table credential under poll time we will choose every minute to make our workflow check for new changes that happened within our air table database let's also copy and paste the base ID and the table ID to connect our workflows under trigger field this requires a timestamp which in our case case the extracted date column will be used let's then test this trigger and click on fetch events here you can see we're getting the data coming in from our air table database let's then add another node we will choose the edit Fields node and name this as document store variables this node will store the document store ID and the base URL of our flowi account we need this data to call an API action so that we can automate the upserting of new data within our flowise document store using this n8n automation we will be creating this workflow is inspired by the YouTuber Mr Leon vanzile and you can watch a detailed tutorial on how to set up automations for document stores and other flow wise contents in his channel as well let's add each of the variables we need the document store ID which we can get by going to our flow wise document store we created and in the URL L here in the last part is our document store ID let's also set the flowise Bas URL let's copy and paste the base URL here from the flows page this might be different for you if you are using a cloud account or if you're deploying your flows instance on your local machine in my case this instance is deployed using render next let's add the HTTP request node this node will execute an HTTP action to trigger the upserting of our document store whenever new stream of data comes in from Air table we can see how this API can be implemented by going through the API documentation from flise here you can see we have the get specific document store action with all of the steps and parameters to use in order to execute the get request action we need this get specific document store action to identify which document store are we going to select and Trigger processing for upsert Action within flow eyes now in our HTTP node let's drag and drop the URL values from our previously setup edit Fields node we now need to use the API endpoint stated within the flow documentation by adding SL API slv1 do- store store then we can drag and drop the document store ID we get from the previous edit Fields node as well this is how we retrieve a specific document store within flow wise using an HTTP API access request now if we test this out we will get an authorization error this is because we still need to get an authorization credential from the flowise API endpoint by getting an API key from our account or instance let's set up our flow wise API credentials under authentication let's choose generic credential type and under generic O type field we will select header o here we can set up our header authentication using our flow wise API key let's rename this credential to header auth flow wise API under name field make sure to indicate authorization in this very same type case since this is the required name for this to work now to get our API key let's head over to our flowise dashboard and under API Keys let's create our new key and name it data analytics chat flow key let's copy the key and paste into the credential from n8n now if we test this HTTP request node again you can see that it's working and we now retrieve the data from our document store after getting the data of our document store from Flo I using the HTTP request node let's add another edit Fields node let's name this extract document loaders this node will extract all the available document loader present in our document store which we retrieved from our previous HTTP node let's drag and drop the loaders array into our set field node now if we test this out we can see that an array of data containing details of all the document loaders available from our document store will output in this node in our case we only have one document loader which is the air table loader we just set up let's also add a filter node we need to set up a filter so that whenever you have multiple document loaders from your flow wise document store we can only filter the specific document loader we are interested in upserting in our case we only need the air table loader and so we want to filter all loader ID that is not equal to PDF loader this way we can keep the output from our air table loader and proceed to the next node just as we have in the output when we test this out next let's add a loop node and let's also add another HTTP request node after the loop let's rename this HTTP node as process chunks for the URL value just like what we did in the previous HTTP node we refer back to the API documentation from flow eyes the API call we are interested in is the process loading and chunking operation for our document loader action here in the node let's change the method to post in the URL let's convert this to expression and then let's copy the base URL value the same way we did in the previous HTTP node we need to add the following command after the base URL SL API slv1 doent - store SL loader slpress and that's it we then also set up the credentials for authentication then let's turn on the send body dial here in the body parameters let's add the store ID and drag and drop the value we got from previous nodes let's also add loader ID and use the value from previous nodes as well in the done path of our Loop node when we're done looping through each of the document loaders we have from our Flo's document store we will then go to the done path let's add another node here this node is another HTTP request node this node will call the API action to upsert the chunks from our document store into our Vector database from the flowise documentation we can see here how it's implemented in the HTTP node let's change the method to post for the URL let's set up the URL value by again dropping the value of our Flo eyes base URL then we add the new command API SLV 1/ do- store SL Vector store SL insert then for the authentications let's set up the credentials again let's also activate the send body ticker and in the body parameters let's add the store ID and drop the store ID value from the previous node now we are done with the workflow time to test if everything is working let's also add a weit node to make sure we're not going to overload the request when looping through each of the document loader in flis we can put a 2-minute wait time for each Loop [Music] here now that we've built all of the n8n automations needed to ensure automatic executions of the tools we've given our AI agent and the document store which will give it the capability to update knowledge database efficiently we also need to create the retriever tool that we will connect to our agent let's head over to our tool agent chat flow now let's get the retriever tool within the tools node options let's drag and drop this tool to our canvas here we can see this node requires a base retriever we also need to give it a name and a description this description is important that we clearly Define it so that our AI agent will be able to identify when should this retriever tool be used or triggered next let's add the retriever node to attach with our retriever tool let's go ahead and go to the vector store nodes we will select the document store Vector node here let's drag and drop it into our canvas let's use the retriever option from this drop down here and connect this node onto the retriever tool let's also select the document store we created earlier in this case we named it flowise tutorial in the retriever tool let's name this retriever as Finance data Retriever and in the description let us give it a clear description like this let's hit save and now we connect this retriever tool to our main tool agent node save this workflow and here's the complete build for our data analyst AI agent now for the final tests let's now chat with our data analyst agent let's say hello first to see how we can proceed with the interactions here our AI agent gave us details about what it can do for us and various different option to request for our AI data analyst agent to execute let's try and test the capability of our agent to scrape for new data using the tool we gave it which we built from n8n nice it accurately asked us a query parameter that will be used for executing the scraper tool to get data from Google Finance and there you have it a nice visualization it gave us after getting the data we asked for for context in actual this process took a few minutes before our AI agent can give us the correct feedback about the actual data we needed based from the latest scraping activity we just requested from our agent this is because executing this request uses asynchronous runtime in the background and we also implemented waiting periods for our automations in n8n in reality this runs you see are not instantaneous and will use a lot of tokens to execute so be mind mindful of your llm cost let's push this further let's ask our data analyst agent to give us a different visualization for the cryptocurrency data we just [Music] scraped there look at how beautiful this visuals are this may be just a basic data analytics and visualization but imagine you have this capability at your fingertips this process will take a lot of effort if you do this manually using python for data analytics the power of Claud Sonic ai's coding capability made this possible and with the e2b sandbox code interpreter it's a perfect combination Additionally the n8n automations we built running in the background makes this system more efficient in handling real-time data queries and data processing for seamless analysis and visualizations on the fly now to make this even more exciting let's try and give our data anal data that is not available from its knowledge base which is the document store we connected with it let's use the file upload capability within the chat interface for our conversation here we're uploading a CSV document containing ETFs or exchange traded funds data let's see how our data analyst figure out what data to use when interacting with us I'm using the test chat interface within the workflow canvas to see how our agent operates in the background there you have it it gave us the summary of the CSV file we uploaded and it correctly summarized the ETF data we gave it here we see the tool calling function it executed in the background it used the code interpreter tool to analyze the new data we gave it and run the python code it generated to give us the data visualization not only that it also analyzed the data and gave us a comprehensive explanation for the visuals in our ETF data [Music] to all of you who made it this far into this full stepbystep tutorial on how we built this awesome data analytics AI agent using flow eyes and nadn thank you from the bottom of my heart for supporting my channel and taking your time to learn awesome AI applications like this if you want to replicate this process or want to follow along with this tutorial give it a go and download the free resources I provided for you from the link in the description as always these resources are for free some of them are also inspired by other creators who gave same resources for free so all I'm asking is to give some love and support this channel by clicking the like And subscribe buttons hope you get something out of this tutorial I would love to hear from you comment down below and give your thoughts about this video until next time see you on the next video

Original Description

Let's Build AI Automation Systems for your Business and see how we can help you scale with AI. ๐Ÿ‘‰Click here to apply to speak with us @Limitless AI : https://cal.com/jeffrey-limitlessai/30min Build a Data Analyst AI Agent with n8n & Flowise | Step-by-Step Masterclass Download the FREE Resources HERE to follow along ๐Ÿ‘‰: https://limitlessai.gumroad.com/l/data_analyst_agent In this in-depth tutorial, I'll walk you through the complete process of building a powerful Data Analyst AI Agent from scratch using n8n and Flowise! Whether you're a beginner or a seasoned pro, this tutorial will guide you step-by-step to create an intelligent AI agent capable of scraping data, updating knowledge bases, and performing advanced data analysis and visualizations using Python. Here's what you'll learn: 1. How to design agentic workflows in Flowise 2. Seamlessly integrating automation tools in n8n 3. Powering the AI Agent with the Anthropic Claude Sonnet AI model for complex coding and tool use 4. Automating data scraping and knowledge base updates 5. Utilizing the E2B sandbox code interpreter for creating Python-based data visualizations By the end of this tutorial, you'll have a fully functional AI-powered data analyst that can tackle real-world data challenges with ease. ๐Ÿ””Don't forget to LIKE, SUBSCRIBE, and hit the notification so you donโ€™t miss out on more practical AI automation builds! ๐Ÿ›  TOOLS USED [some are Affiliate Links to Access tools]: Eleven Labs AI Voice [Affiliate link] ๐Ÿ‘‰https://try.elevenlabs.io/4l0b8yi9gl3b 1. n8n AI Automation ๐Ÿ‘‰ https://n8n.partnerlinks.io/limitless_ai 2. Flowise AI ๐Ÿ‘‰ https://flowiseai.com/ 3. Google Finance SERP API ๐Ÿ‘‰ https://serpapi.com/google-finance-markets 4. Airtable ๐Ÿ‘‰ https://airtable.com/invite/r/BNflfRWj ๐Ÿ“… Timestamps: 00:00 โ€“ Intro 01:34 โ€“ About Flowise 04:51 โ€“ Building the Data Analytics Agent in Flowise 14:48 โ€“ Building the Google Finance Scraper Tool in n8n 15:38 โ€“ Create Custom Scraper tool for the Agent 22:55 โ€“ Create
Watch on YouTube โ†— (saves to browser)
Sign in to unlock AI tutor explanation ยท โšก30

Related Reads

๐Ÿ“ฐ
Exploratory Data Analysis (EDA) โ€” New York city Yellow taxi โ€” Part 1: Data Preparation
Learn to prepare data for exploratory data analysis using the New York City Yellow taxi dataset, a crucial step in understanding and visualizing data insights.
Medium ยท Data Science
๐Ÿ“ฐ
Segmentando Clientes com Anรกlise Fatorial e Clustering
Learn to segment customers using factor analysis and clustering, reducing 14 variables to 4 personas
Medium ยท Data Science
๐Ÿ“ฐ
From Four Platforms to One: How Tongcheng Travel Built a Unified Data Integration Platform withโ€ฆ
Learn how Tongcheng Travel unified four data integration platforms into one using Apache technologies and a batch-stream architecture
Medium ยท Data Science
๐Ÿ“ฐ
Longitudinal Data Infrastructure
Learn how longitudinal data infrastructure can become AI's next foundation for continuity
Medium ยท AI

Chapters (6)

Intro
1:34 About Flowise
4:51 Building the Data Analytics Agent in Flowise
14:48 Building the Google Finance Scraper Tool in n8n
15:38 Create Custom Scraper tool for the Agent
22:55 Create
Up next
This could be the most perfect data frontend
Matt Williams
Watch โ†’