# Build an n8n AI Agent That Turns a Lawyer's Rough Notes into Time Entries

> Build an n8n AI agent that turns a lawyer's rough end-of-day notes into one time entry per task in Google Sheets, with hours exactly as written. Free…

Source: https://learn.ynteractive.com/content/n8n-ai-agent-law-firm-time-entries · Updated 2026-10-21 · Free from Stepthrough (https://learn.ynteractive.com)

## Practice it step by step

[Start the free practice](https://learn.ynteractive.com/modules/law-time-entry-agent)

[Take the free module: why it matters, practice and a quick check →](https://learn.ynteractive.com/courses/ai-for-law-firms/14)

You do every step yourself in a practice copy of n8n. It checks your work as you go, and “Do it for me” finishes any step you get stuck on. Free, about 12 minutes, and nothing touches your real accounts. [Open full screen](https://learn.ynteractive.com/modules/law-time-entry-agent)

Free · Live now · [AI Automation for Law Firms](https://learn.ynteractive.com/content/industry/law-firms) · [n8n](https://learn.ynteractive.com/content/tool/n8n) · ~12 min · 72 steps · Intermediate

Updated October 21, 2026. Built against the tool’s current screens and checked step by step. [How we check this lesson](https://learn.ynteractive.com/content/about#how-we-check)

Time that isn't written down the same day is hard to bill. Lawyers jot a few words between calls, rebuild the week from memory on Friday, and the short calls and quick emails go missing first. In this free, interactive lesson you build an [AI agent](https://learn.ynteractive.com/content/glossary/ai-agent) in [n8n](https://learn.ynteractive.com/content/tool/n8n) that turns a day of rough notes into one time entry per task in a Google Sheet: the matter, the hours exactly as you wrote them, a one-sentence description a client can read, and a check that tells billing what still needs you. It never invents or rounds your time.

## At a glance

| Question | Answer |
| --- | --- |
| What you build | Build an AI agent in n8n for Calloway & Brandt LLP that turns a lawyer’s rough end-of-day notes into one time entry per task in Google Sheets, with the matter, the hours exactly as written, a client-ready description and a check for billing. Chat trigger, AI Agent, system prompt, model, memory and the Sheets tool. |
| Tools | n8n |
| Time | About 12 minutes, 72 steps in 12 parts |
| Level | Intermediate |
| Cost | Free |
| Ways to learn it | [Practice it step by step](https://learn.ynteractive.com/modules/law-time-entry-agent), read the guide with screenshots |

### The 12 parts, in short

1. Get n8n: Go to n8n.io, Enter your email, Sign up.
2. API key: Add credit first, Ten dollars is plenty, Now the key, Create a secret key, and 4 more steps.
3. New workflow: Start a new workflow.
4. Chat trigger: Add the first step, Trigger on a chat message, Back to the canvas.
5. AI Agent: Add the next node, Open the AI nodes, Add the AI Agent.
6. System prompt: Open the options, Add a system message, Write the system prompt, Back to the canvas.
7. Chat model: Give the agent a brain, Pick OpenAI, Open the credentials, Create a new credential, and 5 more steps.
8. Memory: Add memory, Simple Memory, Back to the canvas.
9. Sheets tool: Add a tool, Search for Sheets, Add Google Sheets.
10. Create the spreadsheet: Back to the canvas, Open Google Sheets, Name the spreadsheet, Type the first column header, and 6 more steps.
11. Configure Sheets: Add a credential, Create a new credential, Sign in with Google, Choose your account, and 16 more steps.
12. Test the agent: Open the chat, Paste today's notes, Send the message, Save to the sheet, and 1 more step.

**Start here first:** [n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets](https://learn.ynteractive.com/content/n8n-ai-agent-tutorial-google-sheets). This Law Firms version follows the same build with its own example business, Calloway & Brandt LLP.

**Part of:** [AI for Law Firms](https://learn.ynteractive.com/content/paths/ai-for-law-firms) (step 15 of 15)

## How to build an n8n AI Agent That Turns a Lawyer's Rough Notes into Time Entries: step-by-step guide with screenshots

**About the screenshots.** They come from Stepthrough’s simulated practice environment (a practice copy of n8n), not the live tool, so no real account appears. The buttons and labels match the real screens the lesson was built against. Practice it yourself free at learn.ynteractive.com.

- Tools: n8n
- Time: about 12 minutes, 72 steps in 12 parts
- Level: intermediate

### Part 1: Get n8n

#### Step 1: Go to n8n.io

Time that isn't written down the same day is hard to bill. You jot a few words between calls, then rebuild the week from memory, and the short calls and quick emails go missing first. We are going to build an AI agent that turns your rough notes into time entries in a spreadsheet. First, you need an n8n account.

![The n8n.io website in Stepthrough’s practice copy, step 1 of 72 (Go to n8n.io): the cursor is on “Get started free”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-01.webp)

**Step 1 of 72.** Start at **n8n.io**. Click **Get started free**.

#### Step 2: Enter your email

This is just practice, so anything works — it won't actually send anything.

![The n8n sign-up form in Stepthrough’s practice copy, step 2 of 72 (Enter your email): the email is ready to paste, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-02.webp)

**Step 2 of 72.** Type any email address — this is practice, so a fake one is fine.

#### Step 3: Sign up

In the real n8n, it sends you a six digit code, then asks for a name, a password, and an account name. Go do that in your own browser later, then come back and we will build.

![The n8n sign-up form in Stepthrough’s practice copy, step 3 of 72 (Sign up): the cursor is on “Continue”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-03.webp)

**Step 3 of 72.** Click **Continue**. n8n emails you a code, then asks for a name and password — do that part on your own and come back here.

### Part 2: API key

#### Step 4: Add credit first

Your agent needs a brain, and that means an [API key](https://learn.ynteractive.com/content/glossary/api-key) from OpenAI. Go to platform dot openai dot com — that is the developer side, not ChatGPT, and it bills completely separately. Before you make a key, put some money on the account. A brand new key with a zero balance just returns errors. If you would rather not spend anything yet, n8n gives every new account free [credits](https://learn.ynteractive.com/content/glossary/ai-credits). In your own n8n, you can pick gateway credits on the model step and skip the key.

![The OpenAI platform billing page in Stepthrough’s practice copy, step 4 of 72 (Add credit first): the cursor is on “Add to credit balance”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-04.webp)

**Step 4 of 72.** Your agent needs a model to think with. At **platform.openai.com → Billing**, click **Add to credit balance** — a key with no credit behind it just errors. (Want to skip this? New n8n accounts include free credits: in your own n8n, pick **Gateway credits** on the model step instead of a key.)

#### Step 5: Ten dollars is plenty

A little credit goes a very long way. You are charged per request, not per month, and writing a day of time entries costs fractions of a cent.

![The OpenAI platform billing page in Stepthrough’s practice copy, step 5 of 72 (Ten dollars is plenty): the cursor is on “Continue”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-05.webp)

**Step 5 of 72.** Ten dollars goes a long way — you pay per request, not per month. Click **Continue**. In your own account you add a card here.

#### Step 6: Now the key

Balance sorted. Now go to API keys in the left menu.

![The OpenAI platform billing page in Stepthrough’s practice copy, step 6 of 72 (Now the key): the cursor is on “API Keys”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-06.webp)

**Step 6 of 72.** Balance sorted. Click **API Keys** in the left menu.

#### Step 7: Create a secret key

![The OpenAI API keys page in Stepthrough’s practice copy, step 7 of 72 (Create a secret key): the cursor is on “+ Create new secret key”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-07.webp)

**Step 7 of 72.** Click **+ Create new secret key**.

#### Step 8: Name the key

Name it after whatever is going to use it. Future you, staring at a list of forty keys, will thank you. I am calling this one n8n agent.

![The OpenAI API keys page in Stepthrough’s practice copy, step 8 of 72 (Name the key): “n8n agent” is typed in, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-08.webp)

**Step 8 of 72.** Name it after what will use it. Type **n8n agent**.

#### Step 9: Create it

Default project, all permissions — that is fine for this. Create the key.

![The OpenAI API keys page in Stepthrough’s practice copy, step 9 of 72 (Create it): the cursor is on “Create secret key”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-09.webp)

**Step 9 of 72.** Leave Project and Permissions alone and click **Create secret key**.

#### Step 10: Copy it now

Now pay attention, because this is the only time you will ever see this key. Copy it and paste it into n8n, or into your password manager. If you lose it, you do not get it back — you delete it and make another.

![The OpenAI API keys page in Stepthrough’s practice copy, step 10 of 72 (Copy it now): the cursor is on “Copy”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-10.webp)

**Step 10 of 72.** This is the only time OpenAI shows you the key. Click **Copy**, then paste it somewhere safe.

#### Step 11: Back to n8n

One last warning — this key can spend your money. Never commit it to code, never paste it into a chat, and if it ever shows up on screen while you are recording, revoke it before you publish.

![The OpenAI API keys page in Stepthrough’s practice copy, step 11 of 72 (Back to n8n): the cursor is on “Done”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-11.webp)

**Step 11 of 72.** Click **Done**. Treat that key like a password — never paste it into a chat, a repo, or a screen recording.

### Part 3: New workflow

#### Step 12: Start a new workflow

Now you are inside n8n. This overview page lists every workflow you have. Top right, click create workflow, and you land on an empty canvas.

![The n8n overview page in Stepthrough’s practice copy, step 12 of 72 (Start a new workflow): the cursor is on “Create workflow”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-12.webp)

**Step 12 of 72.** This is your n8n home. Click **Create workflow** in the top right.

### Part 4: Chat trigger

#### Step 13: Add the first step

Every workflow needs a trigger — the thing that kicks it off. We want a chat trigger so you can paste in the day's notes.

![The n8n workflow canvas in Stepthrough’s practice copy, step 13 of 72 (Add the first step): the cursor is on “Add first step…”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-13.webp)

**Step 13 of 72.** Every workflow starts with a trigger. Click **Add first step…**

#### Step 14: Trigger on a chat message

A panel slides in with every way a workflow can start — manually, on a schedule, on a webhook. We want on chat message, so we can have a conversation with the agent.

![The n8n node list in Stepthrough’s practice copy, step 14 of 72 (Trigger on a chat message): the cursor is on “On chat message”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-14.webp)

**Step 14 of 72.** The trigger panel opened on the right. Pick **On chat message** near the bottom.

#### Step 15: Back to the canvas

n8n opens the node so you can configure it. There is nothing we need to change here, so close it with the X in the top right and get back to the canvas.

![An n8n node’s settings window in Stepthrough’s practice copy, step 15 of 72 (Back to the canvas): the cursor is on “×”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-15.webp)

**Step 15 of 72.** n8n opens the node so you can configure it. Nothing to change here — click the **×** in the top right.

### Part 5: AI Agent

#### Step 16: Add the next node

Now we decide what happens when a message comes in.

![The n8n workflow canvas in Stepthrough’s practice copy, step 16 of 72 (Add the next node): the cursor is on “+”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-16.webp)

**Step 16 of 72.** Click the **+** on the right edge of the trigger node.

#### Step 17: Open the AI nodes

A panel opens and asks what happens next. The agent lives under AI, right at the top.

![The n8n node list in Stepthrough’s practice copy, step 17 of 72 (Open the AI nodes): the cursor is on “AI”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-17.webp)

**Step 17 of 72.** The **What happens next?** panel opens with categories. Click **AI** at the top.

#### Step 18: Add the AI Agent

There it is — AI Agent. This is the piece that can plan and then carry out actions using whatever tools you give it. You give it your notes, and it can write each time entry and save it to a spreadsheet — all in one step.

![The n8n node list in Stepthrough’s practice copy, step 18 of 72 (Add the AI Agent): the cursor is on “AI Agent”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-18.webp)

**Step 18 of 72.** In **AI Nodes**, click **AI Agent** — it makes a plan and carries it out using the tools you give it.

### Part 6: System prompt

#### Step 19: Open the options

Right now this agent has no personality and no orders. It does not know it works for Calloway and Brandt, or what a good time entry looks like.

![An n8n node’s settings window in Stepthrough’s practice copy, step 19 of 72 (Open the options): the cursor is on “+ Add Option”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-19.webp)

**Step 19 of 72.** The agent has no personality yet. Click **+ Add Option** under Options.

#### Step 20: Add a system message

Pick system message. This is the standing instruction the agent reads before every request. It is where we tell it who the firm is, how to write a time entry, and what it must never do.

![A dropdown menu in n8n in Stepthrough’s practice copy, step 20 of 72 (Add a system message): the cursor is on “System Message”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-20.webp)

**Step 20 of 72.** Choose **System Message**. This is the standing instruction the agent follows every time.

#### Step 21: Write the system prompt

Here is the actual prompt. It tells the agent what each entry needs: the date, the matter, the hours, a one-sentence description a client can read, and a check for billing. A task with no clear matter gets marked unclear. And the rule that matters most: never invent, estimate or round your hours. If you didn't write the time down, the entry says so.

![An n8n node’s settings window in Stepthrough’s practice copy, step 21 of 72 (Write the system prompt): the system prompt is ready to paste, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-21.webp)

**Step 21 of 72.** The box starts with **You are a helpful assistant**. Replace it with the standing instruction: it is long, so just Paste in the system prompt on the box.

```text
You are the time entry assistant for Calloway & Brandt LLP.

Calloway & Brandt LLP is a small litigation and business law firm. Its lawyers record their time every day, and the billing team turns those entries into client invoices at the end of the month.

The audience is the lawyer who wrote the notes, who reads every entry before it goes to billing.

The tone should be plain, brief and factual, like a billing description a client can read.

Your job is to turn the lawyer's rough notes into one time entry per task.

For each task, return:
- Date
- Matter (the client or case name exactly as the notes give it)
- Hours (exactly as written in the notes, or "Hours not given")
- Description (one sentence, starting with a past-tense verb, like "Drafted..." or "Call with client re: ...")
- Check: "Ready", or one short sentence on what the lawyer must confirm before billing

If the matter is unclear or a task could belong to more than one matter, write "Unclear" in Matter and say why in Check.

When the user asks you to save the entries, use the Google Sheets tool to store each one.

Never invent, estimate or round hours. Never add facts, results or legal conclusions that are not in the notes. Never include Social Security numbers, account numbers or other personal identifiers.
```

#### Step 22: Back to the canvas

That gives the agent everything it needs to know about writing time entries for the firm. Close the node.

![An n8n node’s settings window in Stepthrough’s practice copy, step 22 of 72 (Back to the canvas): the cursor is on “×”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-22.webp)

**Step 22 of 72.** That tells the agent who it works for and how to write a time entry. Close the node with the **×**.

### Part 7: Chat model

#### Step 23: Give the agent a brain

See that red triangle on the agent? It is complaining because it has no model. An agent can plan, but it cannot think without a language model underneath it.

![The n8n workflow canvas in Stepthrough’s practice copy, step 23 of 72 (Give the agent a brain): the cursor is on “+”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-23.webp)

**Step 23 of 72.** The agent has a red warning: it has no model. Click the **+** under **Chat Model**.

#### Step 24: Pick OpenAI

OpenAI chat model. This is where that API key finally gets used.

![The n8n node list in Stepthrough’s practice copy, step 24 of 72 (Pick OpenAI): the cursor is on “OpenAI Chat Model”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-24.webp)

**Step 24 of 72.** Click **OpenAI Chat Model**.

#### Step 25: Open the credentials

And here is where that key you copied finally goes.

![An n8n node’s settings window in Stepthrough’s practice copy, step 25 of 72 (Open the credentials): the cursor is on “Credential”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-25.webp)

**Step 25 of 72.** Here is where that key goes. Click the **Credential** dropdown.

#### Step 26: Create a new credential

You want create new credential, right at the bottom. In your own n8n, if you skipped the key, you would pick gateway credits here instead.

![A dropdown menu in n8n in Stepthrough’s practice copy, step 26 of 72 (Create a new credential): the cursor is on “+ Create new credential”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-26.webp)

**Step 26 of 72.** Click **+ Create new credential** at the bottom of the list. (Free credits instead? Pick **Gateway credits** in your own n8n.)

#### Step 27: Paste the key

This is the one moment it matters that you copied it — remember, OpenAI never shows it to you again.

![The n8n credential window in Stepthrough’s practice copy, step 27 of 72 (Paste the key): the api key is ready to paste, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-27.webp)

**Step 27 of 72.** Paste in the API key on the field to drop in the key you copied from OpenAI.

#### Step 28: Save the credential

n8n tests the connection straight away, and from now on this credential is available to every node in every workflow — you only do this once.

![The n8n credential window in Stepthrough’s practice copy, step 28 of 72 (Save the credential): the cursor is on “Save”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-28.webp)

**Step 28 of 72.** Click **Save**. n8n tests the connection and stores the key for every future node.

#### Step 29: Open the model list

Now the model dropdown.

![An n8n node’s settings window in Stepthrough’s practice copy, step 29 of 72 (Open the model list): the cursor is on “Model”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-29.webp)

**Step 29 of 72.** A new credential leaves **Model** on **Select a model...**. Click the **Model** dropdown.

#### Step 30: Choose the model

GPT five mini. Fast, cheap, and plenty for turning notes into time entries. Do not reach for the expensive model until you have a reason.

![A dropdown menu in n8n in Stepthrough’s practice copy, step 30 of 72 (Choose the model): the cursor is on “gpt-5-mini”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-30.webp)

**Step 30 of 72.** Pick **gpt-5-mini** — fast and cheap, plenty for this. (The list is long: type **gpt-5-mini** in **Search...** to find it.)

#### Step 31: Back to the canvas

That is the brain wired in. Close it up.

![An n8n node’s settings window in Stepthrough’s practice copy, step 31 of 72 (Back to the canvas): the cursor is on “×”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-31.webp)

**Step 31 of 72.** The model is wired up. Close the node with the **×**.

### Part 8: Memory

#### Step 32: Add memory

Next, memory. Without this, every message starts from nothing — you could not say save those, because it would not remember which entries you meant.

![The n8n workflow canvas in Stepthrough’s practice copy, step 32 of 72 (Add memory): the cursor is on “+”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-32.webp)

**Step 32 of 72.** Without memory the agent forgets each message. Click the **+** under **Memory**.

#### Step 33: Simple Memory

Simple memory is fine here — it keeps the recent conversation inside n8n, no database, no extra credentials.

![The n8n node list in Stepthrough’s practice copy, step 33 of 72 (Simple Memory): the cursor is on “Simple Memory”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-33.webp)

**Step 33 of 72.** Pick **Simple Memory**. It keeps the recent conversation in n8n itself.

#### Step 34: Back to the canvas

n8n opens simple memory so you can set it up. The defaults are fine. It keeps the last five messages. Close it with the X.

![An n8n node’s settings window in Stepthrough’s practice copy, step 34 of 72 (Back to the canvas): the cursor is on “Simple Memory”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-34.webp)

**Step 34 of 72.** n8n opens **Simple Memory** so you can set it up. The defaults are fine (it keeps the last 5 messages). Close it with the **×**.

### Part 9: Sheets tool

#### Step 35: Add a tool

And now the good part — tools. This is what separates an agent from a chatbot. A chatbot just talks. An agent does things. We are going to give it Google Sheets so it can save every entry into a time log your billing team can work from.

![The n8n workflow canvas in Stepthrough’s practice copy, step 35 of 72 (Add a tool): the cursor is on “+”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-35.webp)

**Step 35 of 72.** Tools are how the agent acts on the world. Click the **+** under **Tool**.

#### Step 36: Search for Sheets

Google Sheets is not in the recommended tools, so search for it.

![The n8n node list in Stepthrough’s practice copy, step 36 of 72 (Search for Sheets): “sheets” is typed in, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-36.webp)

**Step 36 of 72.** Google Sheets is not in **Recommended Tools**. In **Search nodes...**, type **sheets**.

#### Step 37: Add Google Sheets

Google Sheets tool. Now the agent can write rows into a real spreadsheet, with columns matching what the system prompt tells it to return. When you say save those, each task becomes a row.

![The n8n node list in Stepthrough’s practice copy, step 37 of 72 (Add Google Sheets): the cursor is on “Google Sheets Tool”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-37.webp)

**Step 37 of 72.** Click **Google Sheets Tool** — read, update and write data to Google Sheets.

### Part 10: Create the spreadsheet

#### Step 38: Back to the canvas

Before we set this up, we need to actually create the spreadsheet. Close this node for now — we are going to hop over to Google Sheets and make one.

![An n8n node’s settings window in Stepthrough’s practice copy, step 38 of 72 (Back to the canvas): the cursor is on “Back to the canvas”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-38.webp)

**Step 38 of 72.** Before we configure this node, we need a spreadsheet for the agent to write to. Close the node — we will come back.

#### Step 39: Open Google Sheets

Switch to Google Sheets. You need to create the spreadsheet that this node will write to.

![Google Sheets in Stepthrough’s practice copy, step 39 of 72 (Open Google Sheets): the cursor is on “Google Sheets”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-39.webp)

**Step 39 of 72.** Click the **Google Sheets** tab to create a new blank spreadsheet.

#### Step 40: Name the spreadsheet

First, name it so you can find it later.

![Google Sheets in Stepthrough’s practice copy, step 40 of 72 (Name the spreadsheet): the cursor is on “Daily Time Log”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-40.webp)

**Step 40 of 72.** Click the title and rename it to **Daily Time Log**.

#### Step 41: Type the first column header

Now set up the column headers. These need to match what the system prompt tells the agent to return. In A1, type Date.

![Google Sheets in Stepthrough’s practice copy, step 41 of 72 (Type the first column header): the cursor is on “A1”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-41.webp)

**Step 41 of 72.** In cell **A1**, type **Date**.

#### Step 42: Matter

B1 — Matter.

![Google Sheets in Stepthrough’s practice copy, step 42 of 72 (Matter): the cursor is on “B1”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-42.webp)

**Step 42 of 72.** In cell **B1**, type **Matter**.

#### Step 43: Hours

C1 — Hours.

![Google Sheets in Stepthrough’s practice copy, step 43 of 72 (Hours): the cursor is on “C1”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-43.webp)

**Step 43 of 72.** In cell **C1**, type **Hours**.

#### Step 44: Description

D1 — Description.

![Google Sheets in Stepthrough’s practice copy, step 44 of 72 (Description): the cursor is on “D1”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-44.webp)

**Step 44 of 72.** In cell **D1**, type **Description**.

#### Step 45: Check

And E1 — Check. Five columns, matching exactly what the system prompt tells the agent to return. Each task becomes a row in this sheet.

![Google Sheets in Stepthrough’s practice copy, step 45 of 72 (Check): the cursor is on “E1”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-45.webp)

**Step 45 of 72.** In cell **E1**, type **Check**. That is all five columns — matching the system prompt.

#### Step 46: Back to n8n

The spreadsheet is ready. Switch back to n8n and connect the Google Sheets node to it.

![Google Sheets in Stepthrough’s practice copy, step 46 of 72 (Back to n8n): the cursor is on “n8n”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-46.webp)

**Step 46 of 72.** The spreadsheet is ready. Click the **n8n** tab to go back and connect it.

#### Step 47: Open the Sheets node

Double click the Google Sheets node to open it back up. Now we can connect it to the spreadsheet we just made.

![The n8n workflow canvas in Stepthrough’s practice copy, step 47 of 72 (Open the Sheets node): the cursor is on “Get row(s) in sheet in Google Sheets”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-47.webp)

**Step 47 of 72.** Double-click the Google Sheets node (n8n named it **Get row(s) in sheet in Google Sheets**) to configure it.

### Part 11: Configure Sheets

#### Step 48: Add a credential

Now we need to connect this to a real Google account.

![An n8n node’s settings window in Stepthrough’s practice copy, step 48 of 72 (Add a credential): the cursor is on “Credential”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-48.webp)

**Step 48 of 72.** The Sheets node needs a Google account. Click the **Credential** dropdown.

#### Step 49: Create a new credential

Create new credential — this one uses Google OAuth instead of an API key, so it is going to open a sign-in window.

![A dropdown menu in n8n in Stepthrough’s practice copy, step 49 of 72 (Create a new credential): the cursor is on “+ Create new credential”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-49.webp)

**Step 49 of 72.** Click **+ Create new credential** to sign in with Google.

#### Step 50: Sign in with Google

This opens the Google account chooser so you can pick which account to connect.

![An n8n node’s settings window in Stepthrough’s practice copy, step 50 of 72 (Sign in with Google): the cursor is on “Sign in with Google”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-50.webp)

**Step 50 of 72.** Click **Sign in with Google** to connect your account.

#### Step 51: Choose your account

Pick the Google account you want n8n to use. This is the account that owns the spreadsheet.

![An n8n node’s settings window in Stepthrough’s practice copy, step 51 of 72 (Choose your account): the cursor is on “Google account”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-51.webp)

**Step 51 of 72.** Click your **Google account** to continue.

#### Step 52: Allow Sheets access

Google is asking what n8n is allowed to do. Check the first box — this lets n8n read and write your spreadsheets.

![An n8n node’s settings window in Stepthrough’s practice copy, step 52 of 72 (Allow Sheets access): the cursor is on “See, edit, create, and delete all your Google Sheets…”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-52.webp)

**Step 52 of 72.** Google needs permission. Check **See, edit, create, and delete all your Google Sheets spreadsheets**.

#### Step 53: Allow Drive access

Second box — n8n needs Drive access so it can find your spreadsheets by name.

![An n8n node’s settings window in Stepthrough’s practice copy, step 53 of 72 (Allow Drive access): the cursor is on “See, edit, create, and delete all of your Google Drive files”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-53.webp)

**Step 53 of 72.** Check **See, edit, create, and delete all of your Google Drive files**.

#### Step 54: Allow external service

Last one — this lets Google connect to n8n as an external service. Check it.

![An n8n node’s settings window in Stepthrough’s practice copy, step 54 of 72 (Allow external service): the cursor is on “Connect to an external service”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-54.webp)

**Step 54 of 72.** Check **Connect to an external service**.

#### Step 55: Sign in

All three checked.

![An n8n node’s settings window in Stepthrough’s practice copy, step 55 of 72 (Sign in): the cursor is on “Continue”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-55.webp)

**Step 55 of 72.** All three are checked. Click **Continue** to complete the Google sign-in.

#### Step 56: Pick the operation

Now we tell the node what to do. By default it reads rows, but we want to add rows.

![An n8n node’s settings window in Stepthrough’s practice copy, step 56 of 72 (Pick the operation): the cursor is on “Operation”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-56.webp)

**Step 56 of 72.** Now tell n8n what to do with the sheet. Click the **Operation** dropdown.

#### Step 57: Append Row

Append row. Every time entry the agent writes gets added as a new row at the bottom of the sheet.

![A dropdown menu in n8n in Stepthrough’s practice copy, step 57 of 72 (Append Row): the cursor is on “Append Row”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-57.webp)

**Step 57 of 72.** Pick **Append Row** — the agent will add a new row for each time entry.

#### Step 58: Choose the spreadsheet

Now pick the spreadsheet.

![An n8n node’s settings window in Stepthrough’s practice copy, step 58 of 72 (Choose the spreadsheet): the cursor is on “Document”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-58.webp)

**Step 58 of 72.** Click the **Document** dropdown to pick which spreadsheet to write to.

#### Step 59: Daily Time Log

Daily Time Log — the sheet we set up with columns for the date, the matter, the hours, the description, and the check.

![A dropdown menu in n8n in Stepthrough’s practice copy, step 59 of 72 (Daily Time Log): the cursor is on “Daily Time Log”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-59.webp)

**Step 59 of 72.** Click **Daily Time Log** — the sheet we set up for the firm.

#### Step 60: Pick the sheet tab

Now pick which tab inside that spreadsheet.

![An n8n node’s settings window in Stepthrough’s practice copy, step 60 of 72 (Pick the sheet tab): the cursor is on “Sheet”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-60.webp)

**Step 60 of 72.** Click the **Sheet** dropdown to choose which tab inside the spreadsheet.

#### Step 61: Sheet1

Sheet one — it is the only tab, so this is simple.

![A dropdown menu in n8n in Stepthrough’s practice copy, step 61 of 72 (Sheet1): the cursor is on “Sheet1”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-61.webp)

**Step 61 of 72.** Click **Sheet1**.

#### Step 62: Map the Date column

Now the columns. Each column has a purple button — click it and the AI agent figures out what data goes there.

![An n8n node’s settings window in Stepthrough’s practice copy, step 62 of 72 (Map the Date column): the cursor is on “✦”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-62.webp)

**Step 62 of 72.** Under **Values to Send**, click the **✦** button next to **Date** — the AI agent will fill this in automatically.

#### Step 63: Map the Matter column

Matter. Same thing — click the purple button.

![An n8n node’s settings window in Stepthrough’s practice copy, step 63 of 72 (Map the Matter column): the cursor is on “✦”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-63.webp)

**Step 63 of 72.** Click the **✦** button next to **Matter**.

#### Step 64: Map the Hours column

Hours.

![An n8n node’s settings window in Stepthrough’s practice copy, step 64 of 72 (Map the Hours column): the cursor is on “✦”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-64.webp)

**Step 64 of 72.** Click the **✦** button next to **Hours**.

#### Step 65: Map the Description column

Description.

![An n8n node’s settings window in Stepthrough’s practice copy, step 65 of 72 (Map the Description column): the cursor is on “✦”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-65.webp)

**Step 65 of 72.** Click the **✦** button next to **Description**.

#### Step 66: Map the Check column

And check. Each one is now set to defined automatically by the model — the agent reads your column headers and figures out what goes where.

![An n8n node’s settings window in Stepthrough’s practice copy, step 66 of 72 (Map the Check column): the cursor is on “✦”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-66.webp)

**Step 66 of 72.** Click the **✦** button next to **Check**.

#### Step 67: Back to the canvas

The sheets tool is fully wired up — credential, operation, spreadsheet, sheet, and column mapping. Close it and let us test this thing.

![An n8n node’s settings window in Stepthrough’s practice copy, step 67 of 72 (Back to the canvas): the cursor is on “×”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-67.webp)

**Step 67 of 72.** Google Sheets is fully configured. Close the node with the **×**.

### Part 12: Test the agent

#### Step 68: Open the chat

Everything is connected. Time to see if it works.

![The n8n workflow editor in Stepthrough’s practice copy, step 68 of 72 (Open the chat): the cursor is on “Open chat”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-68.webp)

**Step 68 of 72.** Time to test. Click **Open chat** at the bottom of the canvas.

#### Step 69: Paste today's notes

Give it today's notes the way you actually write them: a few words per task, two matters, one task with no time and one with no clear matter.

![The n8n chat test panel in Stepthrough’s practice copy, step 69 of 72 (Paste today's notes): the prompt is ready to paste, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-69.webp)

**Step 69 of 72.** Type a prompt — give the agent a day of rough notes across **two matters**, with one task missing its time.

```text
Log my time for Oct 19. Harlow Foods v. Brightway Logistics: 1.2 drafting our responses to their second set of interrogatories, and 0.4 on a call with Dana Harlow about collecting the shipping records. Pemberton Estate: reviewed the draft trust amendment, forgot to track the time. Also 0.3 emailing opposing counsel to move the Kessler deposition.
```

#### Step 70: Send the message

Send it off. The agent reads your system prompt and turns each task into one entry, with the matter, your hours exactly as written, a clean description, and a check.

![The n8n chat test panel in Stepthrough’s practice copy, step 70 of 72 (Send the message): the cursor is on “send arrow”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-70.webp)

**Step 70 of 72.** Click the **send arrow** to talk to the agent.

#### Step 71: Save to the sheet

Four entries. Two are ready to bill. For the trust amendment, it didn't guess the time. It says hours not given. And it couldn't tell which case the Kessler deposition belongs to, so it asks you to confirm. Now tell it to save them. This is where the Google Sheets tool kicks in.

![The n8n chat test panel in Stepthrough’s practice copy, step 71 of 72 (Save to the sheet): the prompt is ready to paste, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-71.webp)

**Step 71 of 72.** The agent left the Pemberton hours blank instead of guessing, and flagged the Kessler email because the notes don’t name its matter. Now tell the agent to save the entries to Google Sheets.

#### Step 72: Send it

Send it. The agent uses the Google Sheets tool to write each entry as a row — date, matter, hours, description, and check.

![The n8n chat test panel in Stepthrough’s practice copy, step 72 of 72 (Send it): the cursor is on “send arrow”, highlighted.](https://learn.ynteractive.com/content/guide/law-time-entry-agent/step-72.webp)

**Step 72 of 72.** Click the **send arrow** — the agent will use the Google Sheets tool to write the rows.

**Part of these free courses:** [AI for Law Firms](https://learn.ynteractive.com/courses/ai-for-law-firms)

### Now do it yourself, free

Reading the steps is a start. Doing them is how it sticks. The interactive lesson puts you in a practice copy of n8n: you do every step yourself, it checks your work, and “Do it for me” finishes any step you get stuck on. Nothing touches your real accounts.

[Practice “Build an n8n AI Agent That Turns a Lawyer's Rough Notes into Time Entries” step by step](https://learn.ynteractive.com/modules/law-time-entry-agent?after=guide)

## The example: one day across two matters

Calloway & Brandt LLP is a made-up litigation and business law firm, and every matter, client and person in the lesson is made up too. An associate's notes for Oct 19 cover Harlow Foods v. Brightway Logistics (1.2 hours drafting interrogatory responses and a 0.4 call with the client about shipping records), a trust amendment review for the Pemberton Estate with no time recorded, and 0.3 on an email to opposing counsel about the Kessler deposition, with no matter named.

The agent turns that into four entries. The two Harlow entries are marked Ready. The Pemberton entry says "Hours not given" and asks for the time before billing. The Kessler email is marked Unclear, because the notes don't say which case it belongs to. Then it saves all four to the Daily Time Log sheet.

## Who this lesson is for

Associates, partners, paralegals and billing staff at small and midsize firms who want time recorded the same day, with descriptions clients don't question. You don't need to code: you click through n8n's editor, paste a system prompt and map five columns. The practice copy needs no n8n, OpenAI or Google account.

It is part of the AI for Law Firms course.

## The rules that keep the bill honest

The system prompt says never invent, estimate or round hours. If the time wasn't recorded, the entry says so instead of a guess that ends up on a client's invoice. It also says never add facts, results or legal conclusions that aren't in the notes, and never include Social Security numbers, account numbers or other identifiers.

Your firm's own rules still apply: the increment you bill in, how descriptions must read, and whether client information may go into outside tools. Check them before you build it for real.

## Why an agent and not just a chat

- The Check column (Ready, or what to confirm) turns month-end chasing into a short list.
- Unclear matters are flagged, so time is never billed to the wrong client by accident.
- Memory lets you say "save those" after it writes the entries.
- The Google Sheets tool writes the rows itself, so the time log fills in the same day.

## Try it yourself, free

Reading the steps is a start. Doing them is how it sticks. The interactive module walks you through every click in a practice copy of n8n, checks each step, and never touches your real accounts.

[Start “Build an n8n AI Agent That Turns a Lawyer's Rough Notes into Time Entries”](https://learn.ynteractive.com/modules/law-time-entry-agent)

## Frequently asked questions

**Can an AI agent write time entries for a law firm?**

It can draft them from your notes. In the lesson an n8n AI agent turns pasted notes into one entry per task (date, matter, hours, description, check) and saves each one as a row in Google Sheets. The lawyer reads every row before it goes to billing.

**Will the agent estimate time I forgot to record?**

No. The system prompt says never invent, estimate or round hours. A task without time gets "Hours not given" and a check asking you to add it.

**What do I need to build it for real?**

An n8n account (the cloud trial or self-hosted), an OpenAI API key with a little credit, and a Google account for the sheet. First check your firm's policy on putting client information into outside tools.

**Does it know my firm's billing rules?**

Only the ones you put in the system prompt. Add your billing increment and description rules, and read every row before billing.

**Is this lesson free?**

Yes. Stepthrough is completely free and the practice copy needs no accounts.

[Start this module free](https://learn.ynteractive.com/modules/law-time-entry-agent)

## More n8n tutorials

- [Lovable + n8n: Build a Web App with an AI Backend](https://learn.ynteractive.com/content/lovable-n8n-web-app-ai-backend): Build a contact form in Lovable and connect it to an n8n workflow — webhook trigger, AI Agent, Google Sheets, Gmail, and a Respond node that ties it all together.
- [AI Receipt Extractor: Receipts to Google Sheets with n8n](https://learn.ynteractive.com/content/ai-receipt-extractor-n8n-google-sheets): Drop a photo of a receipt into an n8n chat. An AI agent reads it, pulls out the date, vendor and amount, picks a category, and adds a row to Google Sheets.
- [n8n AI Email Responder: Draft Gmail Replies Automatically](https://learn.ynteractive.com/content/ai-email-responder-gmail-drafts-n8n): Build an n8n agent that watches your Gmail, reads each new customer email, and writes a reply as a draft in the same thread, ready for you to check and send.
- [Daily Job Alerts: Email Each Tech Their Jobs from Google Sheets with n8n](https://learn.ynteractive.com/content/n8n-daily-job-alerts-google-sheets-gmail): Every morning at 7, n8n reads a plumbing company's jobs sheet, skips anything not assigned yet, and emails each job to the tech it's assigned to — customer, address…
- [Gmail AI Triage: Auto-Label Every Email and Draft Replies](https://learn.ynteractive.com/content/gmail-ai-triage-labels-drafts-n8n): Build an n8n workflow that reads each new email, sorts it as a lead, a client or an invoice with a Text Classifier, adds the matching Gmail label, and drafts a reply to…
- [A Support Agent That Answers from Your Own Docs](https://learn.ynteractive.com/content/support-agent-answers-from-your-docs-n8n): Turn an n8n chat agent into a support agent that answers only from your policies in a Google Doc, refuses what it should, and hands off to a person by email.

## From the blog

- [n8n Law Firm Time Entry Agent FAQ: Setup and Rules](https://learn.ynteractive.com/content/blog/n8n-law-time-entry-agent-faq): Plain answers about an n8n AI agent that turns a lawyer's rough notes into time entries in Google Sheets, with hours exactly as written.
- [n8n Law Firm Time Entry Agent: 9 Mistakes to Avoid](https://learn.ynteractive.com/content/blog/n8n-law-time-entry-agent-mistakes): Mistakes that spoil an n8n time entry agent for lawyers, from letting it round hours to unclear matters, pasted identifiers and the wrong Sheets setup.

[All blog posts](https://learn.ynteractive.com/content/blog)

## Visual guides

This lesson’s key ideas as quick visual guides: swipe through the slides, or read the same guide as text.

- [Build your first AI agent in n8n](https://learn.ynteractive.com/content/visual/agent-can-act-quote): ChatGPT answers. An agent does something with the answer.
- [5 Steps to an n8n AI Agent That Saves to Google Sheets](https://learn.ynteractive.com/content/visual/5-steps-n8n-ai-agent-google-sheets): A visual guide: build an n8n AI agent that writes social media ideas and saves each one as a Google Sheets row, in 5 steps from the free lesson.
- [Myth: An AI Model Looks Things Up Before It Answers](https://learn.ynteractive.com/content/visual/myth-ai-models-look-things-up): Myth vs fact: by default a large language model answers from its training plus your prompt. Web search or file lookup is a separate step.

[All visual guides](https://learn.ynteractive.com/content/visual)

## Free cheat sheets

Print it or save the PDF: the key steps and checks from this lesson on one page, free.

- [n8n AI Agent to Google Sheets Cheat Sheet](https://learn.ynteractive.com/content/cheat-sheets/n8n-ai-agent-google-sheets): A free one-page cheat sheet for an n8n AI agent: chat trigger, AI Agent, system message, OpenAI model, Simple Memory and a Google Sheets tool.
- [Lovable + n8n Form Flow Cheat Sheet](https://learn.ynteractive.com/content/cheat-sheets/lovable-n8n-form-flow): A free one-page cheat sheet: a Lovable form posts to an n8n webhook, and an AI Agent logs it in Google Sheets and replies by Gmail.
- [AI Glossary Cheat Sheet: 30 Terms in Plain English](https://learn.ynteractive.com/content/cheat-sheets/ai-glossary-top-30): A free one-page cheat sheet of 30 AI and automation terms in plain English: models, prompts, n8n workflows, apps and data.

[All free printable cheat sheets](https://learn.ynteractive.com/content/cheat-sheets)

## Terms in this lesson

Plain-English definitions, each with an example from a free lesson.

[A/B testing](https://learn.ynteractive.com/content/glossary/ab-testing) · [AI agent](https://learn.ynteractive.com/content/glossary/ai-agent) · [API key](https://learn.ynteractive.com/content/glossary/api-key) · [Append row](https://learn.ynteractive.com/content/glossary/append-row) · [Buyer persona](https://learn.ynteractive.com/content/glossary/buyer-persona) · [Chat Trigger](https://learn.ynteractive.com/content/glossary/chat-trigger) · [Customer acquisition cost (CAC)](https://learn.ynteractive.com/content/glossary/customer-acquisition-cost) · [Foundation model](https://learn.ynteractive.com/content/glossary/foundation-model)

[The full AI glossary](https://learn.ynteractive.com/content/glossary)

## Related prompts

- [Case study interview questions prompt](https://learn.ynteractive.com/content/prompts/case-study-interview-questions-prompt): Plan a client interview that gets a case study's before, during and after story in their own words, with follow-up probes and…
- [Email subject lines prompt](https://learn.ynteractive.com/content/prompts/email-subject-lines-prompt): Get ten honest subject lines for a finished email, each with preview text and a character count, grouped by approach so you can…
- [SEO meta description prompt](https://learn.ynteractive.com/content/prompts/seo-meta-description-prompt): Write short search-result descriptions for your web pages: what the page offers, who it is for and one reason to click, inside…
- [Social post ideas prompt](https://learn.ynteractive.com/content/prompts/social-post-ideas-prompt): A four-part ChatGPT prompt for social post ideas built on your services and real customer questions: platform, hook and call to…

[All free prompt templates](https://learn.ynteractive.com/content/prompts)

## Browse related tutorials

[AI for Law Firms (6)](https://learn.ynteractive.com/content/industry/law-firms) · [n8n tutorials (56)](https://learn.ynteractive.com/content/tool/n8n)
