ModulesLabQuizAll courses

Connecting Tools, Data and Knowledge

Wire your automations and agents to the systems and documents your organisation actually uses, safely and without code.

Module 7 of 14 · Day 4 · Session 7 · AI Administrator: Agentic Workflows & Automation

Module 07 ~50 min read + lab No code

What you will learn

Prerequisites: Module 6: Adding AI Steps to Automations. You need n8n plus a Google Drive, Notion or Airtable account with a few sample documents.

1. Connectors, credentials and APIs in plain words

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:

Webhooks: the door that knocks on you

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.

2. MCP: a universal plug for agents

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.

Host

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.

Client

The connection inside the host that talks to one server. You never see it; it is plumbing.

Server

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.

A plug is also a hole

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.

3. Knowledge sources and RAG for administrators

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:

  1. Upload. You point the tool at a folder of documents: PDFs, Word files, Notion pages, a help centre.
  2. Chunk and index. The tool cuts each document into passages of a few hundred words and stores them so that passages with similar meaning sit close together. This is done once, and again when a document changes.
  3. Retrieve, then answer. When a question arrives, the tool finds the five or ten most relevant passages and hands them to the model with the instruction "answer only from these". The model writes the answer and names the passage it used.

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 problemUsual causeFix
Confident wrong answerPrompt allows general knowledge"Answer only from the provided passages; otherwise say not found"
Right document, wrong versionOld file still in the folderOne folder, one owner, delete superseded versions
Answer misses a tableTable split across chunksKeep tables on one page; use larger chunks for tabular docs
Cannot find obvious contentScanned PDF with no text layerRun OCR or re-export from the source

4. Data hygiene: what may leave the building

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:

BucketExamplesRule
Public or internal-generalPolicies, product docs, templates, published pricesMay be sent to a reputable provider under a business agreement
Personal dataNames with contact details, HR records, customer historiesOnly under a data-processing agreement, with a lawful basis, and minimised: send the fields the step needs, not the whole record
RestrictedPayroll, medical, legal privilege, credentials, unreleased financialsDo 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.

Practical lab

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.

1

Prepare the document folder

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.

2

Connect the source

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.

3

Build the index

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.

4

Add the question trigger

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.

5

Retrieve and answer

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:

You answer staff questions using ONLY the policy passages provided to you. If the passages do not contain the answer, reply exactly: "Not found in the current policies. Please contact HR." Never use general knowledge. Never guess dates, amounts or limits. End every answer with: Source: [document name and section]. Keep answers under 120 words.
6

Test with eight questions

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.

7

Record what left the building

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.

Deliverable

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.

Knowledge check

Pick one answer per question, then check your score. These mirror the style of the final exam.

1. What is a webhook?

Why: An API is you asking the system; a webhook is the system telling you, which is why it is used when seconds matter.

2. In MCP, which part exposes a system's tools and resources?

Why: A server wraps one system, such as a CRM, and advertises its tools and resources. The host decides which servers the agent may use.

3. Why should a knowledge assistant cite the document it used?

Why: Citations are the only check a reader has. Without them, a wrong answer and a right one look identical.

4. Which of these should not be sent to an external model provider?

Why: Payroll is restricted data. Use an approved in-house model or keep the step human.

5. Why create a dedicated service account for automations?

Why: Continuity and accountability. The account should still be given the narrowest scope that works.

Self-check

Answer in your own words first, then open the model answer.

1. Explain MCP to a colleague using the USB analogy in three sentences.

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.

2. What three instructions make a RAG prompt safe for policy questions?

Answer only from the provided passages; say 'not found' rather than guess; cite the document and section in every answer.

3. Sort these into the three data buckets: leave policy, customer email address, payroll file, product FAQ.

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.

Summary

Key takeaways

  • Connectors knock on a system's API for you; credentials should be service accounts with the narrowest scope.
  • Webhooks push events to you instantly; polling triggers check on a schedule.
  • MCP is the universal plug that lets an agent discover and use tools; enable only the tools a workflow needs.
  • RAG gives models your documents: upload, index, retrieve, then answer only from the passages with a citation or 'not found'.
  • Sort data into public, personal and restricted before connecting anything, and keep a register of what goes where.

Further reading: Model Context Protocol guide · n8n for intelligence workflows · LangChain and RAG pipelines