n8n for Beginners: Your First AI Workflow in 30 Minutes

Illustration for n8n tutorial for beginners: n8n for Beginners: Your First AI Workflow in 30 Minutes

This n8n tutorial for beginners builds one useful thing: a workflow that reads yesterday's Gmail every morning, asks an AI model to summarise it, and emails you a short digest. It runs on n8n Cloud, so there's no Docker, no server and no code. Plan on about 30 minutes for a first build if your Google and OpenAI accounts are ready.

What you'll build and how long it takes

Five nodes in a row:

  1. Schedule Trigger: runs once a day.
  2. Gmail (Get Many): fetches recent inbox messages.
  3. Aggregate: combines them into one list.
  4. OpenAI: writes the summary.
  5. Gmail (Send): emails the summary to you.

After that, you check the result in your inbox. On n8n Cloud each full run counts as one execution on Cloud plans, regardless of how many nodes it contains, so a daily digest uses about 30 executions a month.

Setup: accounts and tools (n8n, OpenAI)

  • n8n Cloud trial. n8n's docs describe a 14-day trial with Pro-plan features and 1,000 executions. If you don't upgrade, the workspace is deleted when the trial ends, though you can download your workflows for 90 days afterwards. Export anything you want to keep.
  • A Gmail account. You'll connect it with Google sign-in inside n8n.
  • An AI model. Either an OpenAI API key with credit on it, or, on n8n Cloud, the OpenAI node's Use Gateway credits option, which n8n's docs say lets you run the node without your own OpenAI key. Gateway credit terms can change, so check them in your workspace.

If you're still choosing between automation tools, our Zapier vs Make vs n8n comparison explains where n8n fits.

n8n tutorial for beginners: step-by-step walkthrough

n8n: create the workflow and the trigger

  1. In n8n, click to create a new workflow and name it "Daily inbox digest".
  2. Add the Schedule Trigger node. Choose Days, interval 1, and pick an hour such as 7.
  3. Open the workflow settings and set your timezone. n8n's docs note that Cloud defaults to GMT if you don't, so a "7am" digest may arrive at the wrong time otherwise.

Gmail: fetch the emails

  1. Add a Gmail node, resource Message, operation Get Many.
  2. Under credentials, create a new Google credential and sign in with the account you want summarised.
  3. Turn off Return All and set a limit such as 30, so a busy day doesn't send a huge prompt to the AI.
  4. Add a filter so it only reads recent inbox mail. Gmail search syntax works in the search field, for example `in:inbox newer_than:1d`.
  5. Click Execute step. You should see a list of messages on the right, with subject, sender and a snippet.

Combine the emails

Add an Aggregate node and aggregate the snippet, subject and from fields. Without this step, n8n would call the AI once per email, which costs more and gives you 30 separate summaries.

OpenAI: write the summary

  1. Add the OpenAI node and choose the text operation for messaging a chat model (n8n lists it as Generate a Chat Completion or Generate a Model Response, depending on version).
  2. Pick a small, cheap model. Summaries don't need the largest one.
  3. Write the prompt. Drag the aggregated fields from the left panel into it:

> Summarise these emails for a busy small-business owner. Group them into "Needs a reply today", "FYI" and "Ignore". One line each, include the sender. Do not invent details. Emails: {{ the aggregated data }}

  1. Execute the step and read the output. If it invents things, tighten the prompt with "Only use the text provided". If the summary is too long, add a word limit such as "under 150 words"; short, specific instructions usually work better than long ones.

Gmail: send the digest

  1. Add a second Gmail node, operation Send.
  2. Set To as your own address, subject "Inbox digest", and drag the OpenAI output into the message body.
  3. Run the whole workflow with Execute workflow and check your inbox.
  4. Save, then publish (or activate, depending on your n8n version). n8n's Schedule Trigger docs say a scheduled workflow only runs on its own after it's saved and published.

Testing and fixing common errors

Google sign-in or permission errors

Usually the credential was created with a different Google account, or the consent screen was closed early. Delete the credential and reconnect. Business Google Workspace accounts may need an admin to allow third-party apps.

"No items" from Gmail

Your search filter is too narrow, or there genuinely was no mail. Loosen `newer_than:1d` to `2d` while testing.

OpenAI errors

A 401 means a wrong key; a 429 usually means no credit or a rate limit on your OpenAI account. Add a small balance or switch to Gateway credits on Cloud.

Google Sheets as a log (optional)

Once it works, add a Google Sheets node at the end to append the date and summary to a sheet. That gives you a history and makes failures obvious when a row is missing.

Docker: do you need it?

Not for this tutorial. Docker is only relevant if you later decide to self-host n8n on your own server instead of using Cloud.

Making it reliable day to day

  • Check the Executions list after the first few mornings. Failed runs show in red with the node that broke.
  • Set an error workflow in workflow settings so a failure sends you an email instead of failing silently.
  • Keep sensitive mail out. Use a Gmail label or search filter to exclude bank, HR or medical messages from what goes to the AI. If you're unsure what an AI provider does with your data, read is it safe to upload files to ChatGPT first.
  • Watch costs. One run a day is cheap. Our breakdown of AI automation cost shows how to estimate token and execution spend before you add more workflows.

FAQ

Is n8n free to use?

The Community Edition is free to self-host under n8n's Sustainable Use License, but you pay for and run the server. n8n Cloud is paid after a 14-day trial; as of October 2026 its pricing page lists Starter from EUR 20 a month billed annually.

Do I need coding for n8n?

No for workflows like this one, which use drag-and-drop nodes and short expressions you can pick from a list. Code nodes exist for JavaScript or Python if you want them later.

n8n cloud vs self-hosted?

Cloud is the easier start: n8n runs the server, updates and backups. Self-hosting with Docker costs less at high volume but makes you responsible for security, updates and uptime.

Conclusion

Build this digest during the trial, let it run for a week, and look at the Executions list. If it saves you ten minutes a morning, the next step is giving the AI the ability to act, such as labelling or drafting replies, which is where an n8n AI Agent node comes in. Keep a human check on anything it sends out.

Sources and methodology

Desk research of official documentation; no hands-on test results are claimed. Last reviewed 7 October 2026.

  • n8n pricing: https://n8n.io/pricing/
  • n8n Cloud free trial: https://docs.n8n.io/deploy/use-n8n-cloud/start-your-free-trial/
  • n8n Schedule Trigger: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/
  • n8n Gmail node: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/
  • n8n OpenAI node: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/