AI workflow automation
AI workflow automation
Everyone has probably experienced this:
-
Arriving at the company every morning, spending half an hour checking emails, filtering out the important ones, and then replying to them one by one.
-
After receiving customer feedback, it needs to be manually organized, categorized, and then sent to the corresponding person in charge.
-
Social media needs to be updated regularly, and each update requires writing copy, adding images, and scheduling the post.
These repetitive tasks consume a lot of your time, but they actually don't require much thinking.
AI workflow automation is the solution to these kinds of problems: entrusting repetitive tasks with clear rules to AI to complete automatically.
The core goal of workflow automation is:To free up your time from execution and dedicate it to decision-making..
What is an AI workflow?
An AI workflow is connecting multiple AI capabilities and tools to form an automated process.
Simply put, when an event occurs, a series of operations is triggered, and AI performs understanding, judgment, and generation in the middle.
The concept of workflow automation
A typical workflow consists of three parts:
| Components | Function | Common examples |
|---|---|---|
| Trigger | When it starts executing | Receiving a new email, scheduled time, someone submits a form |
| Action | What operation to perform | Send messages, save data, generate content |
| Condition | Handle differently based on the situation | If it is an urgent email, notify; otherwise, summarize |
For example:
-
Trigger: Check a specified news website every 6 hours.
-
Action 1: AI scrapes news content and filters out content related to your industry.
-
Action 2: AI summarizes the relevant news into a summary of less than 100 words.
-
Action three: Send the summary to your Slack channel.
This is a complete AI workflow. Once set up, it runs automatically without any action from you.
AI Workflow vs Traditional Automation
The biggest difference between AI workflows and traditional automation is that AI can process unstructured content and make judgments.
| Comparison Items | Traditional Automation | AI Workflow |
|---|---|---|
| Content Processing | Can only process structured data | Can understand text, images, and speech |
| Rule source | Requires humans to hardcode rules | AI can make judgments based on content |
| Flexibility | Rules must be rewritten when they change | Behavior can be changed by adjusting prompts |
| Applicable scenarios | Simple, repetitive, deterministic tasks | Complex tasks requiring understanding and judgment |
For example, forwarding an email to Zhang San after receiving it—this is traditional automation with clear rules.
After receiving an email, the AI judges its importance, immediately notifies for important ones, and summarizes unimportant ones to be sent weekly—this is an AI workflow that requires understanding and judgment.
n8n workflow platform
n8n is an open-source workflow automation tool that can be self-hosted or used as a cloud version.
A feature of n8n is fully visual operation, allowing complex workflows to be built by dragging and dropping.
Open source address:https://github.com/n8n-io/n8n
n8n installation
Experience n8n with one command using npx (requires Node.js environment to be installed beforehand):
npx n8n
You can also deploy and run it using Docker:
Original prompt (Chinese, left untranslated)
# Create data persistence volume
docker volume create n8n_data
# Start n8n container
docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
After deployment, you can see the n8n interface by opening http://localhost:5678 in your browser.

If you don't want to set it up yourself, you can also use the n8n Cloud versionhttps://n8n.io/and start using it by registering directly.
Core concepts: nodes, connections, triggers
The n8n interface consists of a canvas and nodes; understanding these three core concepts allows you to start using it:
| Concept | Function | Description |
|---|---|---|
| Node | Executes specific operations | For example, "Send Email," "Call OpenAI," or "Save Data" |
| Connection | Connect nodes | Drag from one node to another node to define the execution order |
| Trigger | Start the workflow | The first node of each workflow, defining "when to start" |
Basic steps to create a workflow:
-
1. Add a trigger node on the canvas (e.g., "Schedule Trigger" or "Webhook").
-
2. Add the first action node and configure its parameters.
-
3. Drag a line from the trigger to the action node.
-
4. Continue adding more nodes and connect them sequentially.
-
5. Click "Test" to see if the workflow runs normally.
-
6. Activate the workflow to let it run automatically.
Integrate OpenAI node
n8n has a built-in OpenAI node that can directly call GPT models.
Configuration steps:
-
1. Find OpenAI in the node list and drag it onto the canvas.
-
2. Add your OpenAI API Key in the node settings.
-
3. Select the model to use (e.g., gpt-3.5-turbo or gpt-4).
-
4. Write a prompt, which can reference the output data from previous nodes.
A typical prompt configuration might look like this:
Original prompt (Chinese, left untranslated)
Please summarize the email content below into a 3-sentence abstract:
{{$json.body}}
摘要:
Where {{$json.body}} references the body content of the previous email node.
Practical Application: Automatically summarize emails and send Slack notifications
We will build a complete workflow: after receiving an email, the AI summarizes the content, and then sends it to Slack.
This workflow requires three nodes:
-
1. Email trigger: Triggers when a new email is received.
-
2. OpenAI node: Summarizes the email content.
-
3. Slack node: Sends the summary to a specified channel.
Configuration points:
-
Email node: Configure IMAP or use n8n's email trigger.
-
OpenAI node: Set the prompt to summarize this email, not exceeding 100 words, and input the body of the referenced email.
-
Slack node: Configure the Slack Bot Token, select the channel, and reference the OpenAI output in the message content.
Connect these three nodes, and once testing is successful, activate it, and the workflow will run automatically.
The n8n node library is very rich, supporting hundreds of services such as Gmail, Notion, Airtable, and Google Sheets. Take some time to explore the node library, and you will find many scenarios that can be automated.
Make (formerly Integromat)
Make is another popular workflow automation platform, formerly known as Integromat and renamed to Make in 2021.
Compared to n8n, Make is more geared towards business users, has a more polished interface, and offers stronger features in its paid version.
Comparison between Make and n8n
| Comparison items | n8n | Make |
|---|---|---|
| Open source | Yes, self-hostable | No, pure SaaS |
| Free version | Self-hosting is completely free | Yes, with limited features |
| Interface | Technical-oriented | More friendly and refined |
| Number of nodes | Hundreds | Thousands |
| Enterprise features | Requires paid version | Perfected |
| Learning curve | Slightly steep | Relatively gentle |
Simple summary: If you want to take control yourself and have technical skills, choose n8n; if you want something simpler and easier to use with enterprise-grade support, choose Make.
AI Module Usage
Make has built-in multiple AI-related modules:
OpenAI Module: Calls models such as GPT, DALL-E, and Whisper.
Make AI Module: Make's own AI features, which can intelligently process data.
Other AI Tools: Supports Anthropic Claude, Google AI, Midjourney, and others.
The process of using AI in Make:
-
1. Search for OpenAI or the AI tool you want to use in the module library.
-
2. Drag it onto the scenario canvas.
-
3. Configure the API key and parameters.
-
4. Pass the data from the previous module to the AI module.
-
5. Pass the AI's output to the subsequent module.
A feature of Make is the AI prompt assistant—you can describe what you want to do in natural language, and it will help you generate the prompt.
Practical example
We use Make to create a "social media content automatic generation" workflow:
-
1. Trigger: Scheduled to trigger every Monday at 9 AM.
-
2. Google Sheets module: Reads your pre-prepared product updates and event information.
-
3. OpenAI module: Generates copy for Weibo, LinkedIn, and Twitter based on the spreadsheet content.
-
4. Airtable module: Saves the generated copy to the review spreadsheet.
-
5. Slack module: Notifies you that "this week's content has been generated, please review in Airtable".
Once the entire process is set up, it will run automatically every Monday. You only need to review and fine-tune the content, not write the copy from scratch.
Zapier AI automation
Zapier is a pioneer in workflow automation, founded in 2011.
Zapier's features include the largest number of connected applications (over 6000) and ease of use.
Basic Zapier usage
Zapier calls a workflow a Zap. The steps to create a Zap are:
-
1. Select the trigger application and trigger event (e.g., "Gmail receives new email").
-
2. Connect your account and configure the trigger conditions.
-
3. Select the first action application and action event (e.g., "OpenAI generates text").
-
4. Configure the action parameters, referencing the trigger data.
-
5. You can continue to add more actions.
-
6. Test and enable Zap.
Zapier's interface is simpler than n8n and Make, with each step being form-based and no need for drag-and-drop connections.
AI Actions feature
Zapier has released a dedicated AI Actions feature that allows you to describe what you want to do in natural language, and it automatically configures the entire Zap.
For example, if you input:
Original prompt (Chinese, left untranslated)
当我收到带有"发票"标签的邮件时,把附件保存到 Google Drive,
然后用 AI 提取金额和日期,记录到 Airtable,
最后给我发一条 Slack 通知。
Zapier AI will automatically recognize which steps are needed and help you configure each node.
You can also use AI to help you write prompts. For example, when calling GPT, if you say "Help me write a prompt to summarize this email," the AI will generate a professional prompt template.
Suitable scenarios
Zapier is best suited for these scenarios:
| Scenario | Why choose Zapier |
|---|---|
| Connecting niche applications | Zapier supports 6000+ applications, many others do not |
| Simple personal automation | Simplest interface, fastest to learn |
| Non-technical users | No technical background required |
| Rapid prototype validation | A workflow can be set up in minutes |
Tool selection recommendations:Beginners should start with Zapier, those who want deeper control should use n8n, and enterprise-level needs should choose Make. In fact, the core idea of the three tools is the same; learning one makes it easy to switch to another.
Custom GPTs and Claude Projects
In addition to chaining multiple services with workflow tools, you can also create dedicated AI assistants to handle specific tasks.
OpenAI's GPTs and Anthropic's Claude Projects are examples of such tools.
Create a Custom AI Assistant
Example using OpenAI GPTs, the steps to create a custom assistant are:
-
1. Visit the ChatGPT official website and click "Explore" → "Create a GPT".
-
2. In the "Create" tab, describe the assistant you want using natural language.
-
For example: "You are a runoob technical documentation editor, responsible for explaining complex technical concepts in an easy-to-understand way, suitable for beginners to read."
-
3. In the "Configure" tab, configure more detailed settings.
-
4. Add knowledge base files (optional).
-
5. Configure features (such as web search, code interpreter).
-
6. Test, adjust, and finally publish.
The creation process for Claude Projects is similar, performed in the Projects feature on the Claude official website.
Knowledge base upload
One of the major advantages of a custom AI assistant is the ability to upload your own knowledge base.
Supported file formats usually include:
| Format | Description |
|---|---|
| Most commonly used, suitable for documents, reports, and books | |
| TXT | Plain text, simple and universal |
| DOCX | Word document |
| CSV | Table data |
| JSON | Structured data |
After uploading, the AI will answer questions based on this knowledge.
For example, you can upload your company's product documentation, customer service manuals, and historical cases to create an "Internal Knowledge Assistant," and employees can ask it questions directly.
Or you can upload all the articles you have written to create a "Writing Style Assistant" that will write new content imitating your style.
Prompt customization
Instructions are the core of a custom assistant; they define the AI's role, behavior, and output format.
A good prompt usually includes:
-
Role definition: Who you are and what you do.
-
Behavioral guidelines: How you should act and how you should not act.
-
Output format: What the structure of the answer should be.
-
Constraints: What are the taboos and precautions.
An example of a prompt:
Original prompt (Chinese, left untranslated)
你是 runoob 的技术文档助手。
你的任务是把复杂的技术概念解释得通俗易懂,适合初学者。
Please follow these rules when answering:
1. 先用一句话简单解释是什么
2. 然后用生活中的例子类比
3. 最后给出一个最简单的代码示例
4. 如果有重要的注意事项,用加粗标出
不要使用太深的术语,必要术语要解释。
保持语气友好、鼓励,像老师在教学生。
The more specific the prompt, the more stable the AI's performance.
Webhook and triggers
Webhook is a very important concept in workflow automation; it allows external systems to trigger your workflow in real-time.
How Webhooks work
Simply put, a Webhook is a "URL callback address."
The traditional way is "polling": your system asks the external system every so often, "Is there new data?"—this is very inefficient.
Webhook is "pushing": when the external system has new data, it actively sends you an HTTP request to notify you.
Webhook workflow:
-
1. You create a Webhook trigger in n8n/Make/Zapier and get a URL.
-
2. Configure this URL in the external system (e.g., GitHub, Stripe, your website).
-
3. When an external system triggers an event (such as someone submitting code or making a payment), it sends data to this URL.
-
4. Your workflow receives the data and begins execution.
Webhooks are real-time, triggering the workflow within milliseconds of the event occurring.
Event-driven automation
Webhooks enable event-driven automation.
Common Webhook event sources:
| Event source | Typical event | Usage examples |
|---|---|---|
| GitHub | Someone submits code, someone raises an Issue | Automatically reply to an Issue using AI upon receipt |
| Stripe | Someone makes a payment, subscription expires | Send a thank-you email upon receiving a payment |
| Typeform | A form has been submitted | After the form is submitted, AI analyzes the content and assigns it |
| Shopify | New orders, inventory alerts | Automatically generate shipping orders when a new order arrives |
| Your website | User registration, comments | Welcome email when a new user registers |
We use Python to implement a simple Webhook receiving + AI processing workflow:
Example
============================================
Simple Webhook Server + AI Processing Workflow
Use Flask to receive Webhook and call OpenAI for processing
============================================
from
flask
import
Flask
,
request
,
jsonify
import
openai
import
json
Initialize Flask application
app
=
Flask
(
name
)
Configure OpenAI (please replace with your API Key)
openai.
api_key
=
"sk-your-api-key-here"
def
process_with_ai
(
content:
str
)
str
:
"""
Process the received content with AI
Perform a simple "content classification + summarization" here
"""
prompt
=
f
"""
Please analyze the following content and do two things:
1. Category: Determine if it is a "question", "suggestion", or "thanks"
2. Summary: Summarize the core content in one sentence
Content:
{content}
Please return in JSON format, as follows:
{{
"category": "question/suggestion/thanks",
"summary": "Summary content"
}}
"""
response
=
openai.
ChatCompletion
.
create
(
model
=
"gpt-3.5-turbo"
,
messages
=
[
{
"role"
:
"system"
,
"content"
:
"You are runoob's content analysis assistant."
}
,
{
"role"
:
"user"
,
"content"
: prompt
}
]
,
temperature
=
0.7
)
return
response.
choices
[
0
]
.
message
.
content
@
app.
route
(
"/webhook"
,
methods
=
[
"POST"
]
)
def
webhook_handler
(
)
:
"""
Endpoint for receiving Webhooks
External systems send POST requests to this URL
"""
Get request data
data
=
request.
get_json
(
)
(
f
"Received Webhook data: {data}"
)
Extract the content we need (adjust field names according to the actual situation)
Here we assume the incoming data has a "content" field
content
=
data.
get
(
"content"
,
""
)
if
not
content:
return
jsonify
(
{
"status"
:
"error"
,
"message"
:
"Missing content field"
}
)
,
400
Process content with AI
try
:
ai_result
=
process_with_ai
(
content
)
(
f
"AI processing result: {ai_result}"
)
Parse the JSON returned by the AI
parsed_result
=
json.
loads
(
ai_result
)
Here you can store the result in the database, send notifications, etc.
For demonstration, we just print it out
category
=
parsed_result.
get
(
"category"
,
"Unknown"
)
summary
=
parsed_result.
get
(
"summary"
,
""
)
(
f
"Category: {category}"
)
(
f
"Summary: {summary}"
)
Return success response
return
jsonify
(
{
"status"
:
"success"
,
"category"
: category
,
"summary"
: summary
}
)
except
Exception
as
e:
(
f
"Error processing: {e}"
)
return
jsonify
(
{
"status"
:
"error"
,
"message"
:
str
(
e
)
}
)
,
500
@
app.
route
(
"/test"
,
methods
=
[
"GET"
]
)
def
test_page
(
)
:
"""
A simple test page for testing Webhooks
"""
return
"""
Test Webhook
"""
if
name
==
"main"
:
(
"Webhook server started at http://localhost:5000"
)
(
Webhook URL: http://localhost:5000/webhook
)
(
"Test page: http://localhost:5000/test"
)
app.
run
(
port
=
5000
,
debug
=
True
)
After running this server, you can test it by opening http://localhost:5000/test in a browser, or by sending a test request with curl:
Instance
Send test Webhook request
curl
-X
POST http:
//
localhost:
5000
/
webhook \
-H
"Content-Type: application/json"
\
-d
'{
"content": "runoob's tutorials are great! It would be even better if there were more practical examples of AI workflows."
}'
If everything is normal, you will see the categories and summaries returned by the AI.
When using Webhook in a production environment, remember to add a verification mechanism—such as signature verification, checking the source IP, or using an API Key. Otherwise, anyone can send requests to your Webhook, which may cause security issues.
Collection of Practical Projects
In this section, we provide three complete practical project ideas that you can directly apply as templates.
Automatically Generate Daily News Briefing
Goal: Automatically collect industry news every morning, have AI filter and summarize it, and send it to your email or Slack.
Required Tools: n8n/Make/Zapier, RSS feed, OpenAI, Email/Slack.
Workflow Steps:
-
1. Scheduled Trigger: Triggered every morning at 8 AM.
-
2. RSS Node: Read RSS feeds from several industry media you follow.
-
3. Deduplication node: Filter out duplicate news.
-
4. OpenAI node: Read news item by item and determine if it is relevant to your industry.
-
5. OpenAI node: Summarize the relevant news into abstracts.
-
6. OpenAI node: Compile all abstracts into an email, including a title and introduction.
-
7. Email node: Send to your mailbox.
Prompt example:
Original prompt (Chinese, left untranslated)
请阅读下面这篇新闻的标题和摘要,判断它是否与"AI 技术应用"相关。
只需要回答"是"或"否",不要解释。
新闻标题:{{$json.title}}
新闻摘要:{{$json.summary}}
Automatic social media content publishing
Goal: Automatically generate multi-platform social media copy based on product updates, and schedule it for publishing after review.
Required tools: Make/Zapier, Airtable, OpenAI, Buffer/Hootsuite.
Workflow steps:
-
1. Airtable trigger: Triggers when you add a "Product Update" record in Airtable.
-
2. OpenAI node: Generates Weibo copy (lively style) based on the product update.
-
3. OpenAI node: Generates LinkedIn copy (professional style) based on the product update.
-
4. OpenAI node: Generates Twitter copy (concise style) based on the product update.
-
5. Airtable node: Writes the copy for the three platforms into the "Pending Review" table.
-
6. Slack node: Notifies you that there is new content pending review.
-
7. Buffer Node (after manual review): Scheduled posting to various platforms.
This process is both automated and retains manual review control—after all, social media is directly facing customers, so oversight is necessary.
Automatic Customer Feedback Classification
Goal: After receiving customer feedback, AI automatically classifies it, analyzes sentiment, and assigns it to the corresponding person in charge.
Required Tools: n8n, Typeform/form tool, OpenAI, Airtable, Slack.
Workflow Steps:
-
1. Webhook Trigger: Triggered when a customer submits feedback on the website.
-
2. OpenAI Node: Analyzes the sentiment of the feedback (positive/neutral/negative).
-
3. OpenAI node: Classify feedback type (Bug/Feature Request/Usage Question/Thanks).
-
4. OpenAI node: Extract keywords and priority.
-
5. Airtable node: Save all information to the feedback database.
-
6. Conditional branch: If the feedback is negative and high priority, follow the urgent process; otherwise, follow the normal process.
-
7. Slack node: Notify the technical lead for urgent feedback, and notify customer service for normal feedback.
-
8. OpenAI node: Generate a polite automated reply to thank the customer for their feedback.
- Email node: Send the automated reply to the customer.
This workflow allows customers to receive an immediate reply while enabling internal teams to quickly respond to important issues.
A principle for designing workflows:First, automate mechanical tasks like "collecting, organizing, and distributing," leaving "judgment, decision-making, and creativity" to humans.Do not try to let AI make all the decisions; human-machine collaboration yields the best results.
Comparison summary of three tools
We provide a comprehensive comparison of three mainstream tools, n8n, Make, and Zapier, to help you choose:
| Comparison items | n8n | Make | Zapier |
|---|---|---|---|
| Open source | Is | No | No |
| Self-hosted | Supports | Does not support | Not supported |
| Free plan | Self-hosting is completely free | Free version limits the number of operations | Free version limits the number of Zaps |
| Number of connected applications | Hundreds | Thousands | 6000+ |
| Interface style | Visualization canvas | Refined canvas | Step form |
| Learning curve | Medium | Lower | Minimum |
| Enterprise features | Paid version required | Improved | Improved |
| Technical threshold | Slightly high (self-hosted) | Low | Minimum |
| Target audience | Developers, technical teams | Small and medium-sized enterprises, teams | Individuals, beginners |