In this clip from our **n8n Office Hours at SCALE** webinar, we walk through how to use AI Agents in n8n to extract structured data—like names, emails, skills, and education—from unstructured resume files.
Whether you're dealing with uploaded resumes, unstructured documents, or internal HR automation, this demo shows how to transform raw file input into usable outputs that can feed directly into tools like **Google Sheets**.
What You’ll Learn
- How to normalize and extract text from binary file uploads
- Using switch logic to route based on file type
- Setting up AI agents with system/user prompts
- Structuring outputs for clean integration with spreadsheets
- How to handle AI agent errors gracefully in production flows
- When to use focused chains vs. full AI agent nodes
- Guidance on choosing the right LLM (OpenAI, Gemini, Ollama, etc.)
- Overview of Microsoft Teams integration in n8n
Featured Tools & Nodes
- File Extraction (Binary → Text)
- AI Agent with Output Parser
- Microsoft Teams Trigger (demo-ready)
- Structured outputs into Google Sheets
- Error handling using alternate node paths
Useful Links
- [Join the next Virtual Event](https://lu.ma/n8n-events)
---
Want to connect? Find me on social media and reach out to me directly:
- LinkedIn: https://www.linkedin.com/in/angelgmenendez/
- X: https://x.com/djangelic
If this walkthrough helped, make sure to like and subscribe so you never miss a live demo or expert tip.
Оглавление (4 сегментов)
Segment 1 (00:00 - 05:00)
What is the best approach to parsing resumeé content like email names, skills and education? Also, do we have support for Microsoft Teams from Nikile Terra Lar. Nikuel, thank you so much for submitting your question here. So, I did a little bit of work on this the other day and I want to highlight that this is a great feature to utilize AI agents on. So, I wish this question was a little bit more specific. So I took my own path on this as far as how to approach it and what I've settled on is using the chat feature within the NAND instance. I've set it up so that I can accept upload any file. And what I want to walk you through today is how we can use AI agents to get structured outputs into things like Google Sheets for example with this kind of data. So let's go ahead and dive right in. Now to answer the second question first you asked do we do you support Microsoft teams and we do so in this particular case I'm using the built-in chat window here on the bottom lefthand corner but what we can do is we can replace that here with the Microsoft teams trigger so we have Microsoft teams I don't have a teams instance set up for demo yet I am working on that to so we can show that live in the future but for today just know that for example on new chat messages if you set up like a team's bot what we can do is send into teams those files and then from there we can take and parse them out. So I'm going to walk you through the logic real quick and if there's any questions pertaining to that I'm happy to address them. So what I'm going to do let me go ahead and I think I have some past executions here. Perfect. I don't see your screen. Yeah. Oh no I don't. Hold on. Let me share my screen once more here. Bear with me two seconds here. There we are. Perfect. Sorry about that. Excellent. Let's go ahead and copy this to editor. All right. Excellent. So, this is what I was talking about here. Here we have our teams chat. And so, we do support teams and you can replace this trigger internally, this chat node with the teams trigger. So, in this particular case, I'm just using chat. And what I did is I created a fake resume. So one of the things within about utilizing NADN is when a file comes into NADN it is stored as a binary object. So you can imagine this not quite zeros and ones but just about just a blob of text that is then converted into the actual file that you typically see. So if we click on view here we have a fake resume here for Dr. Stacy Pard DDS. So this resumeé came in as a text file. And so the first thing I want to talk about is how to parse the file itself. So one of the things we have to do a little bit of transformation within NADN to be able to pull out the data to even get it to our AI agent. We can't unfortunately as of right now you can't quite get this these types of files directly into an AI agent as a file. You have to do a little bit of conversion. Now, I think that's changing and in the future, I think it will be a lot easier. But for now, let's take a look at how we handle it. Got to make sure to drink from the Naden merch mug here. So, what we have first and foremost is a switch node. Now, I like the switch because here what we can do is see we can basically create outputs for every kind of file type there is. And the goal is normalizing these outputs so that we can pass these out to the AI agent in a standardized way. So that is our goal here. So what I've done is I've gone into this the rules here and I've passed in the file name and what I'm doing is looking for that file extension. So the file extension is going to tell us, hey, what kind of file is this? In this case, we have a text file. So I have different checks for each one, right? So we've got HTML, ODS, PDF, RTF, so on and so forth. This is the one we're looking for. Fake RS. ext. So in here, what we're doing is we're taking that and we're passing it down a set output here. And we're doing that because what we need to do is we need another node called the ex binary extraction node. Let me actually pull it up here. So the way to pull this up, hit plus here. Going to search for binary. There we go. extract from file. So I've set up that same node but in different ways multiple times here. So outputting through each one here. In this particular case, we're taking the binary data, extracting out the text, and as you can see, we're putting it in a JSON object called text. So standardizing it, getting it ready to pass into our AI agent. Then we merge it into this set node here. So what we're doing is merging this output. Merge text outputs.
Segment 2 (05:00 - 10:00)
My mentor would be so upset. One of the key things when building out these workflows is make sure to name your nodes. Now if you think of NAD as an analog to coding, it's the same as commenting your code. If you don't comment your code, you're going to have no clue later on what is happening. What we're doing here is we're merging all these potential outputs to text. JSON. ext. And as you can see, it comes in as this big blob, right? And so in this particular case, there was several. And I'm only really looking for one output in this particular case. Although we could in theory create have the AI agent parse multiple outputs in this case, but really we just want the first one in this case. And then this is where we get into the AI portion. So this has really been a gamecher not just for NADN but for the world at large using AI agents in order to handle this kind of unstructured data in a way that makes it easy to pass into other tools right and in this particular case I've given it I like to think of these system messages and you do that by hitting add option system message I like to think of this as giving it a personality right so the thought process here is the AI agents start off is a blank slate. You're giving it a personality. You're giving it an instruction set in the form of two prompts. The system message, which kind of tells it what it's supposed to be doing, and then the user message, which is giving it the data to process. So, in this one, it's pretty easy. You're a helpful assistant that extracts email, name, skills, and education from resume text. Pretty straightforward, right? And then we're passing in that resume text. So, in the past, if I was a programmer, this step would have taken me hours and it would have been very specific because what I would have had to do is use something like reax or some kind of JavaScript code to go in and look for something that said name equals Dr. Stacy Pard or whatever. And this would only work if the input was the same every time. This, of course, makes the process very difficult. Now, I can build something. I literally built this in maybe 20 minutes to get this working. And the key point that you need to make here is that to get it in this nice format here, there is one additional step. And this is why I like the question, this question that was submitted because it allows me to show the structured output. So let's take a look. You'll notice here a little toggle switch and I've switched that on. Normally it would have output these four items as one blob of text which again is also not useful right like it's very difficult to tell like a Google sheet a node hey here's the name here's the email here's the skills when it's all just one blob of text what I really need is it to come out in a specific way toggle helps it gives you a new option here let's take a look I'm going to zoom in just a bit this output parser. Now, if we double click on this, you'll see here that we're able to define what our output looks like. So, this is huge when creating these types of agents because by doing this, you can define, hey, this is what I want. This is what I'm looking to do. And what that's going to allow us to do is then we can map different outputs. So, what I'm doing here is validating the output, making sure that the name that came in is actually showing up, that the email is actually showing up. Basically, we're making sure that these outputs stay consistent, almost like a test in a way. And what that's going to allow us to do now is pass that into our Google Sheets note. Now, I didn't actually go through that step, but it's very straightforward from that point on. The other thing we want to do as the kind of the downside of using AI agents is there is a chance of hallucination or of errors and what we want to do is handle that those types of errors. So in this case what I've done and a feature that I think is not used often enough. I don't I think because it's hidden in the settings most people don't know it exists but typically when we get to this step it if you don't change the settings it just stops. It just stops working. So if you open it up and you go to settings, you can on error create a new output for error outputs. Now in this case, what we can do is say, hey, if we error out here, that means that the AI agent messed up. Something didn't work out correctly, something was not working as expected. So we can then pass a set message saying, "Hey, unable to parse the agents output. " We can say, "Hey, something's wrong with our AI agent. you need to figure it out. This helps handle gracefully errors that come out of that AI agent and allow us to
Segment 3 (10:00 - 15:00)
then either resubmit it or fix our prompt or whatever needs to happen. But then eventually we can then pass into the chat if you use output or text as the key object here these values that we were looking for. So in a nutshell that is the way to handle this process. So if you have if you're receiving a lot of unstructured inputs like different file types and you need to get them in a structured output AI agents are wonderful for this and I do see a related question has come in how do we decide between various tools that are available for agentic AI automation NAN langraph lang flow crewi AWS vert so in to it's hard to answer that question you have to have a good understanding of and I guess let me split that question up here. The various tools like when we talk about tools are abilities at least in the NADN terminology tools are pl you can almost imagine them as plugins to your AI agents to make it do all kinds of stuff. You can do things like call on another subworkflow. I use this quite a bit for things like searching databases, right? So giving the AI searching capabilities to look in a specific database, get a certain output and then use that to answer a question or you can for example give it access to the web. You can basically HTTP request tool to pass an output out and go to a website and using that data from that website answer the question as well. So just to clarify terminology in this case I think based on the examples that you gave I think you mean the model right here. So how would we choose like which model is best and a lot of it is going to depend on your internal use cases what's available especially for enterprise organizations. Some enterprises might have their own internal models that they're using and that is probably going to define or just help you make that decision initially. So if you want the kind of the simplest most easiest kind of drop in tool, I recommend like open AIS, right? That t technically for general work, it works good at just about everything. If you're looking for something that's like more PII friendly, you're trying to protect data, you might want to run Open AI within Azure. So within Azure you can actually deploy your own version of open AI and using that model of Azure it will not be used for example for training data. So you can basically be sure as you can be with any model out there that your data is not going to leak. So you might want to go with Azure. Now your organization might internally be using AWS. So you could do that or maybe Google Gemini. So choosing the model falls down to what your needs are and what your organization has allowed you to utilize internally. And so from there that is how I would pick or if you re if privacy really is like the number one thing for you my recommendation is use Olama deploy it yourself locally. So anyway I Mandy I know I haven't really called on you much. Do you have any insights on this as well as far as like how to choose which model like what model works best for what? Do you have any suggestions on that as well? Yeah, there's a lot of the model choices out there. I think one first one is context windows. You're going to you require a huge context window or if you're categorizing stuff for example, you might use a mini or a nano model. These are very quick at responding putting things into buckets. But if you need something a bit more generative and you don't need to provide too much context, then use the cheapest model for your input. So I think that's a good tip as well. Beautiful. Yep. I agree. Totally forgot. And one of the things that like I really like, like for example, I know Open AI's model accepts, at least the four 40 models accept up to like 128,000 tokens. They have a web page where you can go and I think it's called a tokenizer and you can put in sample text and it'll tell you how many tokens it uses. And for some of the builds I've done internally, I've actually gone in and tested it because I don't want to go too I want to make sure that I'm not too close to that context window because the closer I get, the more likely hallucinations are to arrive. Exactly. So be very careful about that. And then the other one, Angel, is around tool calling. Not all models can call tools. So if you just need a very basic kind of question answering, the agent is probably not the right node. You can use the basic question answering node that we have. But if you need to use tools, then an appropriate model that has tool calling. I found this out the hard way. I was trying to run old lama models and trying to run everything locally and then all of a sudden you get a message model does not support calling tools. So just be aware, make sure you
Segment 4 (15:00 - 17:00)
take the requirements, use the right model, use the right node in N8 for your use case. Great point. Yeah, just to point out what Mandep is talking about here. So you have the AI agent node here. That's what we're running right here. But we have the ability to have more what do we call it? More focused AI agents. Exactly. So you can use like a basic LLM chain or information extractor question and answer chain. So sentiment analysis. This one I like a lot. So like for example, if your goal is like simply to figure out whether or not me like incoming messages are a certain happy, sad, angry, looking to purchase, not looking purchase, that kind of stuff, you would use something like this because you don't need these tools. It doesn't it it's not needed. And not only that, but it's more focused. It's more these models are set ahead of time to allow for le they're less likely to hallucinate doing what you're looking for because they're not as broad. And a great one that you're hiding underneath there is there the classifier, the text classifier. So it's a great way of branching your logic. You can think of it as an intelligence switch statement. Absolutely. So for categorizing emails, categorizing the priority of a support request and the real trick on this one is to rename the output. It just flows in a very natural way. I think you were describing earlier renaming the nodes, renaming the workflow items. It's like commenting your code. It's like writing meaningful environment var variable names, right? It's a you alongside your workflow, you get your documentation and it's a way of explaining what your thinking is to your fellow colleagues and workflow builders and even yourself. Sometimes you might not visit this for a few months and you come back and you're like, what was I thinking? What was going on here? Just labeling them makes such a big difference. Excellent. All right, great points. Thanks for watching this clip from our NAND office hours webinar. If you found it helpful and have more questions of your own, we'd love to hear from you. Just drop your question using the link in the description. Or better yet, join us live at the next monthly office hours to ask in real time. And if you got value from this, hit that like and subscribe so you don't miss the next one. We're here to help you scale smarter with NATN. I'll see you at our next office