匠人学院 JR Academy
  • Position

    Where am I now, and where should I go?

    How your job is changing, where your experience can take you and what you still need for a target role, worked out from what you have actually done. Free, and the full result needs no sign-up.

    Analyse my career and skills

    Look up a career

    Will AI replace my job?AI impact and transition paths for common careersNew jobs in the AI eraWhat they do, what they need, how to move in

    Focused tools

    AI Engineer interview readiness30 timed questions on what you still need before interviewsCareer personality testDirections that suit how you workReturning to China checkJob prospects in China by school, major and graduation date

    AI coach

    Talk to your AI coachStill unsure after your result? Talk through what is holding you back
  • Core courses

    AI Engineer BootcampEngineering bootcamp from LLM apps to agentsAI Engineer Full-Stack Project Class16 weeks · RAG and full-stack AI projectsVibe Coding Masterclass8 weeks · direct agents to build and ship a productAI Essentials10 hours · use AI for email, reports, data and copyAI Office Automation Course8 weeks · help a whole company adopt AIOne-Person Company (OPC) Bootcamp15 weeks in person · build a one-person company with AIAll courses →

    AI engineering

    Machine Learning & Data Engineering Full-Stack ClassAI Agent & MCP Project BootcampAI Engineer Core TechniquesAI Engineer FoundationsAI Engineer Advanced: RAG to Agents and TuningClaude Code TasterAll AI engineering courses →

    AI at work

    AI Coding for everyoneClaude Code One-Day Masterclass (Non-Technical)Enterprise AI Automation BootcampAI Marketing BootcampAI Risk, Governance and Audit CourseOpenClaw 4-Week Personal AI Assistant BootcampAll AI-at-work courses →

    Career development

    AI Product Manager (BA) Bootcamp + InternshipAustralia IT Interview BootcampAustralia IT Technical Interview BootcampAustralia IT Resume BootcampAustralia Big Tech Job Search BootcampAustralia IT Career Planning BootcampAll career courses →

    Learn free first

    Vibe CodingAI for office workPrompt MasterAI EngineerAI data analysisResource centerInstructorsAll learning paths →
  • Evidence

    What will convince an employer?

    Certifications, projects, team work and competition entries, collected into one portfolio.

    See the portfolio

    Certifications

    Cert Master · all certificationsPrep and mock exams for AWS, Azure, GCP, Claude and moreAWS CLF-C02Entry-level AWS cloud certificationAWS SAA-C03Entry certification for cloud architectsClaude certificationsAnthropic Claude certification seriesAll certifications →

    Projects and team work

    P3 team projectsBuild a project with real teammates in a simulated team workflowP3 project experienceThe parts of a P3 project that go on your resumeDemo DayProject showcaseP3 certificatesProof once a project is completeAll of P3 →

    Competitions and work

    HackathonsBuild something against the clockSubmit your workAdd your project to the showcaseCareerOS portfolioDo tasks in the desktop app; your results become portfolio pieces
    Cert MasterBrowser extension, app and mini programScreenshot a question for analysis and practise anywhereAbout Cert Master
  • Connect

    How do I get myself in front of employers?

    Resume, interviews, referrals and mentors. See how far you are from the target role first, then decide what to fix.

    Start with Jobpin

    Resume and openings

    Graduate careersGraduate preparation across Australia, China, Malaysia, Singapore, the US and UKJobpinAI job search workspace: resume, roles, applicationsAI resumeRewrite your resume against a job descriptionReferralsRoles shared by students and mentorsOpportunitiesInternships, projects and collaborationsOffer boardOffers students have received

    Interviews

    AI Engineer interview guideSeven areas, with worked examplesFDE interview guideFive rounds, from scoping to the customer roundAI mock interviewPractise by text or voice and see the gapsInterview storiesReal interview experiencesSystem Design handbookPrepare for system design interviewsAll interview prep →

    Mentors

    1:1 mentorsBook AI, career and technical mentors by the hourGroup tutoringShare a tutor with a few others and pay less eachCareer coachingResume, interview and direction packages
    Jobpin desktopOne workspace for the whole job searchOrganise real experience and refine resume versions for target roles on macOS or Windows.About Jobpin
BusinessMembershipDownload CareerOS
0
匠人学院 JR Academy

Follow Us

linkedinfacebooktwitterinstagramyoutube

We Accept

/image/layout/pay-paypal.png/image/layout/pay-visa.png/image/layout/pay-master-card.png/image/layout/pay-airwallex.png/image/layout/pay-alipay.png
Airbotix · AI learning & creation for kids Another Life · AI story game
Products46

CareerOS and tools

  • CareerOS
  • Cert Master
  • Jobpin
  • Jobpin web
  • Jobpin report
  • Jobpin desktop download
  • My job search reports
  • Buy report credits
  • Jobpin billing
  • AI Toolbox
  • AI Skill Marketplace

Membership

  • Membership
  • AI membership

Courses

  • Bootcamps
  • Training Camp
  • Kanban learning
  • AI Builder course
  • MCP course
  • NotebookLM workshop
  • Business Analyst course
  • Web Full-Stack Bootcamp
  • DevOps Bootcamp
  • Data Engineering Bootcamp
  • Data Analysis Bootcamp
  • Coding for Beginners
  • Algorithm Bootcamp

Career services

  • Graduate careers
  • Graduate careers in Australia
  • Graduate careers in China
  • Graduate careers in Malaysia
  • Graduate careers in Singapore
  • Graduate careers in the US
  • Graduate careers in the UK
  • 1:1 coaching
  • Career coaching
  • AI Engineer VIP
  • BA & PM Internship
  • Data Science Internship
  • Data Analysis Internship
  • Marketing Internship
  • Resume Review
  • Interview Coaching
  • Job Application Service
  • Job Monitoring
  • LinkedIn Management
  • LinkedIn Networking
Library57

Learning paths

  • All Learning Paths
  • AI Engineer
  • Context Engineering
  • Vibe Coding
  • Prompt Master
  • AI Builder
  • AI Product Manager
  • Python Basics
  • AI Productivity
  • AI Data Analysis
  • AI Finance
  • AI Content Creation
  • AI Image Creation
  • Frontend Development
  • Hermes Agent
  • OpenClaw Local Agent

Interactive labs

  • Prompt Lab
  • Frontend Lab
  • JavaScript Lab
  • Python Lab
  • AWS Lab
  • Azure Lab
  • LLM Lab
  • Git Lab

Reference and guides

  • Resources
  • Wiki
  • Cheat sheets
  • Roadmaps
  • AI roadmaps
  • Videos
  • Ebooks
  • Blog
  • Interview handbook
  • Mock exams
  • Free resources

Cities

  • Sydney
  • Melbourne
  • Brisbane
  • Adelaide
  • Singapore
  • Kuala Lumpur
  • London
  • New York
  • San Francisco
  • Los Angeles
  • Seattle
  • Toronto
  • Vancouver

Immigration

  • Australia Immigration
  • Skilled Visa 189/190/491
  • Employer Sponsored 482/186/494
  • Business Visa 188/888
  • UK Immigration
  • US Immigration
  • Canada Immigration
  • Singapore immigration
  • Malaysia immigration
Business20

For business

  • AI for Business
  • Business portal sign-in
  • Corporate Training
  • Internship Partnership
  • Recruitment Partnership
  • Enterprise (EN)

Metatree AI Lab

  • Metatree AI Lab (Chinese)
  • AI solutions (Chinese)
  • Digital employees (Chinese)
  • Case studies (Chinese)
  • Metatree AI Lab
  • AI services
  • Digital employees
  • Case studies

AI education for kids

  • Airbotix — AI Learning & Creation for Kids
  • AU Family Resource Hub
  • NAPLAN Report Guide
  • My School Data Guide
  • Sydney Private School Fees 2026
  • Kids Coding Programs
About15

Company

  • About Us
  • Our Mentors
  • Become a Mentor
  • Metaverse Classroom
  • JR Careers
  • Another Life — AI Story Game
  • Contact Us

Help and policies

  • FAQs
  • Terms & Conditions
  • Privacy Policy
  • Cancellation & Refund Policy
  • Site map

Friend links

  • CS Browser

Contact

  • hello@jiangren.com.au
  • 0421-672-555

Offices

Level 10b, 144 Edward Street, Brisbane CBD (Headquarter)
Level 2, 171 La Trobe St, Melbourne VIC 3000
45A13, Block B, Oriental Hope Tianxiang Plaza, 500 Tianfu Avenue Middle Section, Wuhou District, Chengdu, Sichuan, China
Business Hub, 155 Waymouth St, Adelaide SA 5000
Disclaimer
footer-disclaimerfooter-disclaimer

JR Academy acknowledges Traditional Owners of Country throughout Australia and recognises the continuing connection to lands, waters and communities. We pay our respect to Aboriginal and Torres Strait Islander cultures; and to Elders past and present. Aboriginal and Torres Strait Islander peoples should be aware that this website may contain images or names of people who have since passed away.

All content on the JR Academy website, including course materials, logos, and information provided, is protected under Australian intellectual property laws. Unauthorized use, sale, distribution, reproduction, or modification is strictly prohibited. Violations may result in legal action. By accessing our website, you agree to respect our intellectual property. JR Academy Pty Ltd reserves all rights, including patents, trademarks, and copyrights. Any infringement will be subject to legal prosecution. View Terms of Service

© 2017-2026 JR Academy Pty Ltd. All rights reserved.

ABN 26621887572

HomeLearnCoursesCerts
  1. Home
  2. Learn
  3. Blog
  4. n8n 工作流自动化实战手册 — 核心功能详解:节点、触发器与数据流
JR Academy · BlogCareer insights

n8n 工作流自动化实战手册 — 核心功能详解:节点、触发器与数据流

深入理解 n8n 的工作原理:常用节点类型、数据流动机制和 5 个实战工作流

Published2026-11-30
Reading time2 min
Author

Contents

  • 节点的三大类型
  • 1. Trigger 节点(触发器)
  • 2. Action 节点(操作)
  • 3. Logic 节点(逻辑控制)
  • 5 个实战工作流
  • 工作流 1:GitHub PR 自动通知 Slack
  • 工作流 2:每日数据汇总邮件
  • 工作流 3:表单提交自动入 CRM + 发欢迎邮件
  • 工作流 4:文件上传自动处理
  • 工作流 5:Telegram Bot 查询数据库
  • 数据流动:理解 $json 和 $node

n8n 编辑器界面:节点与数据流

n8n 的核心是节点(Node)之间的数据流动。每个节点接收上游数据、处理后输出给下游。理解这一点,你就能设计任意复杂的工作流。

节点的三大类型

1. Trigger 节点(触发器)

工作流的起点,决定什么时候运行。

触发器 说明 典型用法
Webhook 接收 HTTP 请求时触发 接收表单提交、API 回调
Schedule 定时触发(Cron 表达式) 每天早上 8 点跑数据报告
Email Trigger 收到邮件时触发 自动处理客户邮件
File System 文件变化时触发 新文件上传自动处理
Manual 手动点击触发 测试或一次性任务

Schedule 节点的 Cron 表达式:

0 8 * * 1-5    // 周一到周五早上 8:00
0 */2 * * *    // 每 2 小时
0 9 * * 1      // 每周一早上 9:00

2. Action 节点(操作)

对各类服务执行操作的节点,n8n 有 1,000+ 内置集成。

常用集成:

通讯: Slack、Gmail、Telegram、Notion
数据: PostgreSQL、MySQL、MongoDB、Google Sheets
代码: HTTP Request、GraphQL、Execute Command
云服务: AWS S3、Google Drive、Airtable
AI: OpenAI、Anthropic Claude、Hugging Face

3. Logic 节点(逻辑控制)

节点 功能
IF 条件分支,根据数据走不同路径
Switch 多条件分支
Merge 合并多个分支的数据
Loop Over Items 遍历数组中的每一项
Wait 暂停工作流,等待指定时间或外部事件
Set 设置/修改数据字段
Code 执行自定义 JavaScript 或 Python

5 个实战工作流

工作流 1:GitHub PR 自动通知 Slack

场景:有人提交 PR,自动发 Slack 提醒代码 reviewer。

节点链: Webhook → IF(判断是否为 PR 事件)→ Slack

Webhook 配置: POST /github-webhook
IF 条件: {{ $json.body.action }} === "opened" AND {{ $json.body.pull_request }} 存在
Slack 消息: 
  "🔔 新 PR: {{ $json.body.pull_request.title }}
   作者: {{ $json.body.pull_request.user.login }}
   链接: {{ $json.body.pull_request.html_url }}"

在 GitHub 仓库 Settings → Webhooks 填入 n8n 的 Webhook URL,事件选 Pull requests。


工作流 2:每日数据汇总邮件

场景:每天早上 8 点从数据库查询前一天数据,发邮件给管理层。

节点链: Schedule → PostgreSQL → Code(格式化)→ Gmail

// Code 节点:把数据库查询结果格式化为 HTML 表格
const items = $input.all();
const rows = items.map(item => 
  `<tr><td>${item.json.date}</td><td>${item.json.orders}</td><td>${item.json.revenue}</td></tr>`
).join('');

return [{
  json: {
    html: `<table><thead><tr><th>日期</th><th>订单数</th><th>收入</th></tr></thead>
           <tbody>${rows}</tbody></table>`,
    subject: `每日数据报告 - ${new Date().toLocaleDateString('zh-CN')}`
  }
}];

工作流 3:表单提交自动入 CRM + 发欢迎邮件

场景:网站表单提交 → 自动创建 HubSpot 联系人 → 发个性化欢迎邮件。

节点链: Webhook → HubSpot(Create Contact)→ Gmail(Send Email)

Webhook 接收: { name, email, company, role }

HubSpot 节点:
  - firstname: {{ $json.body.name.split(' ')[0] }}
  - email: {{ $json.body.email }}
  - company: {{ $json.body.company }}

Gmail 节点:
  - To: {{ $json.body.email }}
  - Subject: 欢迎加入,{{ $json.body.name.split(' ')[0] }}!
  - Body: (HTML 模板)

工作流 4:文件上传自动处理

场景:用户上传 CSV 文件 → 解析数据 → 批量写入数据库。

节点链: Webhook(接收文件)→ Spreadsheet File(解析 CSV)→ Loop Over Items → PostgreSQL(Insert)

关键配置:Webhook 节点设置 Binary Data 接收文件,Spreadsheet File 节点解析 CSV 内容为 JSON 数组,Loop Over Items 遍历每行,PostgreSQL 节点批量插入。


工作流 5:Telegram Bot 查询数据库

场景:给 Telegram Bot 发消息,自动查询数据库返回结果。

节点链: Telegram Trigger → Code(解析命令)→ PostgreSQL → Telegram(回复)

// Code 节点:解析用户命令
const text = $json.message.text;
const chatId = $json.message.chat.id;

// 支持命令: /stats, /order <id>
const command = text.split(' ')[0];
const arg = text.split(' ')[1];

return [{ json: { command, arg, chatId } }];

数据流动:理解 $json 和 $node

n8n 里每个节点的输出格式是 [{ json: {...} }, { json: {...} }, ...]——一个 items 数组。

在 Expression 里引用数据:

{{ $json.fieldName }}          // 当前节点输入的字段
{{ $json.nested.deep.value }}  // 嵌套字段
{{ $items()[0].json.name }}    // 当前节点第一个 item
{{ $node["节点名"].json.id }}  // 引用指定节点的输出
{{ $workflow.id }}             // 当前 workflow 的 ID

在 Code 节点里处理多条数据:

// 处理所有 items
const results = $input.all().map(item => ({
  json: {
    ...item.json,
    processed: true,
    timestamp: new Date().toISOString()
  }
}));
return results;

// 只返回满足条件的 items(相当于 filter)
return $input.all().filter(item => item.json.status === 'active');
Author
Share or copy the link
← Previous articlen8n 工作流自动化实战手册 — 安装与快速上手:5 分钟跑起第一个工作流Next article →n8n 工作流自动化实战手册 — AI Agent 实战:用 n8n 构建智能工作流

Related articles

🇦🇺测一下:袋鼠国码农能当FDE吗?

2026-12-01

Monash 研究:肠道酸度是膳食纤维降血压的关键;AI 搬运新闻冲击维州选举信息;MPAC 公布 2027 演出季

2026-12-01

Adelaide 物理学家获 $250,000 总理科学奖;全球葡萄酒消费六十年降四分之一;残障师范生实习障碍研究

2026-12-01

DVA-C03今日上线首发 · Google Cloud AI Agent认证完整解析 · AZ-401本月GA替代AZ-400

2026-12-01

Anthropic推迟下一代模型并调百人做安全,AWS推出AI办公三件套,Google让用户单独关掉AI训练

2026-12-01

GitHub Copilot 实战指南 — Copilot AI Code Review:30 秒让 AI 帮你审 PR,三档深度随需切换

2026-11-30
View all articles →

Done reading? Next steps

Not sure what to learn next? Tell us where you are

Tell us what you do now and where you want to go. See your gaps in skills, evidence, experience, expression and positioning, and what to work on first. No sign-in needed.

Compare with my situation
  • SkillAI Engineer Bootcamp13 weeks, 12 Theory + 13 Practice live classes. You build one Agent system across Context, RAG, Tools, Memory and production Evals. Built for Applied AI and Agent Engineer roles.See the program →
  • PositioningLearning roadmaps by roleFrontend, backend, data, AI and more, laid out stage by stage in the order to learn them.All roadmaps →
  • ExpressionTry an AI mock interviewPick a role and run a mock interview to practise explaining your experience and projects.Practise now →

Not sure what to do next?

Take this page's topic with you and see where your gaps are.

Compare with my situation
JR Academy
AI learning for the global Chinese community
BootcampsFree resourcesLearn AICareer coaching
精选推荐
AI Career Impact Map
Assess career exposure and explore transition paths and learning options
Popular tool
AI & Data Bootcamps
Build your skills through structured courses and hands-on projects
Popular courses
1:1 Career Coaching
Work with an experienced mentor on your resume and interview preparation
Career coaching
Custom Corporate Training
AI training tailored to your team
Business services
Popular tags
Vibe CodingAI codingCursorClaudeJob searchPromptFrontend developmentBackend development
Subscribe to updates

Receive AI learning resources, technical tutorials and career advice by email.

We respect your privacy and do not send spam.