Wire your automations and agents to the systems and documents your organisation actually uses, safely and without code.
Module 07 ~50 min read + lab No codePrerequisites: Module 6: Adding AI Steps to Automations. You need n8n plus a Google Drive, Notion or Airtable account with a few sample documents.
An API (application programming interface) is a door a system leaves open so other software can ask it things: "give me today's calendar", "create this ticket", "send this email". Every modern tool has one. You will never call an API by hand; you will use a connector, which is a ready-made node in n8n, Make, Zapier or Power Automate that knows how to knock on that door.
To use a connector you attach a credential: usually a sign-in through the familiar "Allow this app to access your Google account" screen (called OAuth), or an API key, a long secret string copied from the tool's settings page. Two rules for administrators:
An API is you asking the system. A webhook is the system telling you, immediately, that something happened: a payment cleared, a form was submitted, a ticket changed. n8n gives you a webhook URL you paste into the other tool's settings. Use webhooks when seconds matter; use polling triggers (check every minute) when they do not.
Connectors work well for fixed automations, where the designer decides in advance which door to knock on. Agents are different: the model decides at run time which tool to use, so it needs a standard way to discover tools and call them. That standard is the Model Context Protocol (MCP), published as an open protocol and now supported by most agent products.
The application the agent lives in: a chat app, n8n, Claude, Copilot, an IDE. The host decides which servers are available and asks the user for permission.
The connection inside the host that talks to one server. You never see it; it is plumbing.
A small program that exposes one system: your CRM, a file share, a calendar, a database. It advertises tools (actions) and resources (things to read).
The analogy that sticks: before USB, every device needed its own cable. MCP is the USB port for agents. A CRM vendor publishes one MCP server, and every agent product can use it, instead of every product building its own CRM connector. For you this means a growing catalogue of ready-made servers, and one place, the host, where you decide what the agent may touch.
An MCP server that can create records can also delete them if the tool is exposed. Read the tool list of any server before you enable it, and enable only the tools the workflow needs. Module 11 covers the permission model in depth.
Models know the public internet up to a date; they know nothing about your leave policy, price list or onboarding checklist. The way to give them that knowledge is retrieval-augmented generation (RAG), which sounds technical but is three plain steps:
Why the citation matters: it is the only way a reader can tell a grounded answer from a fluent guess. A knowledge assistant that cannot say "from Leave Policy v3, section 4" should not be trusted with policy questions, and a good prompt instructs it to say not found rather than improvise.
| Knowledge problem | Usual cause | Fix |
|---|---|---|
| Confident wrong answer | Prompt allows general knowledge | "Answer only from the provided passages; otherwise say not found" |
| Right document, wrong version | Old file still in the folder | One folder, one owner, delete superseded versions |
| Answer misses a table | Table split across chunks | Keep tables on one page; use larger chunks for tabular docs |
| Cannot find obvious content | Scanned PDF with no text layer | Run OCR or re-export from the source |
Every AI step sends its input to a model provider unless you run the model yourself. Before connecting a data source, sort its contents into three buckets:
| Bucket | Examples | Rule |
|---|---|---|
| Public or internal-general | Policies, product docs, templates, published prices | May be sent to a reputable provider under a business agreement |
| Personal data | Names with contact details, HR records, customer histories | Only under a data-processing agreement, with a lawful basis, and minimised: send the fields the step needs, not the whole record |
| Restricted | Payroll, medical, legal privilege, credentials, unreleased financials | Do not send to external models. Use an approved in-house model or keep the step human |
Practical habits: use the provider's business or enterprise tier, which contractually excludes your data from training; turn on redaction nodes that mask emails and phone numbers before the AI step; and keep a one-page register of which workflows send which data where. Module 11 turns this into a policy.
You will build a policy Q&A workflow: a chat message arrives, the workflow retrieves the most relevant passages from a folder of company documents, and an AI node answers only from those passages, citing the document, or replies "not found". Use three or four non-sensitive documents such as a leave policy, an expenses policy and an IT acceptable-use policy. Sample policies from your AI assistant are fine if you have none to hand.
Create a folder called Policies in Google Drive (or a Notion page tree or an Airtable base with attachments). Put three or four PDFs or Docs in it. Delete any old versions so each policy exists once.
In n8n add a Google Drive node (or Notion / Airtable), attach the credential with read-only scope, and set it to list the files in the Policies folder. Run it and confirm you see your documents.
Add a Default Data Loader and a Recursive Character Text Splitter feeding a Simple Vector Store (insert mode) with an embeddings credential. Run this branch once; it reads every file, chunks it and stores it. Re-run only when documents change.
In a second branch add a Chat Trigger node. This gives you a test chat window in n8n and can later be embedded in a page or connected to Slack.
Add a Question and Answer Chain node connected to the same vector store in retrieve mode, with a chat model attached. Set the system prompt to:
Ask four questions the documents answer, two the documents do not answer, and two that try to trick it (for example, "what is the leave allowance at Google?"). You want four cited answers and four "not found" replies. If it improvises, strengthen the ONLY and never-guess lines.
Open a sheet called Data register with columns workflow, data sent, provider, tier, owner. Add one row for this workflow. This register grows with every module and is part of your capstone.
A screenshot of the two-branch workflow, the chat transcript of your eight test questions, and the first row of your data register. Save as M7-policy-qa.
Pick one answer per question, then check your score. These mirror the style of the final exam.
Answer in your own words first, then open the model answer.
Before USB every device needed its own cable; MCP is the standard port for agents. A vendor publishes one MCP server and every agent product can use it. The host, where the agent lives, decides which servers and tools are allowed.
Answer only from the provided passages; say 'not found' rather than guess; cite the document and section in every answer.
Leave policy and product FAQ are public or internal-general; the customer email address is personal data (minimise and use a processing agreement); the payroll file is restricted and stays in-house.
Further reading: Model Context Protocol guide · n8n for intelligence workflows · LangChain and RAG pipelines