Demonstration effect
Demonstration: using the built workflow, we insert a record in the Flybook multidimensional table
The following is a step-by-step exploration of the specific implementation process.
demand analysis
In our daily work, we often collect some information, which is convenient to organize and view later. But manual organization needs to be filled in one field at a time, which is rather cumbersome.
Today we are building a workflow using Agent to implement:Automatically organize yourself into the standardized forms you need by pasting in the linksIt's easy to keep a clear record of what's being collected and saves time and effort.
The end result:
architectural design
prior knowledge
Official website: https://www.coze.cn/home
Buckle is a new generation of AI application development platform. Whether you have programming foundation or not, you can quickly build all kinds of AI applications based on big models on Buckle, and publish AI applications to various social platforms and communication software, or integrate AI applications into your business system through API or SDK.
- intelligent body
Personally, I understand it as a "nanny" who follows instructions according to configured parameters. Turning the trivial and repetitive into the whole, and the corrupt into the magical.
It is the coherent action from input to output. It contains at least a start node and an end node. Intermediate nodes are configured according to your needs
- input and output
The output of the previous node is the input of the next node
Realization Description
1. Creating a multi-dimensional spreadsheet for the Flying Book
You can create your own, or you can open it with one of the templates I created earlier.
https://tcntv5zon46z.feishu.cn/wiki/AkPkwkorfiIrYMkvbzTcx6B5nGg?table=tbl2ZVboAiYdNkyY&view=vewZ8tYjhk
The rendering is as follows:
Creation is complete, remember the link will be used below and insert the organized content directly into this form.
2、Login button new workflow
Login: https://www.coze.cn/home
Login effect, add workflow here
3、Introduction of workflow core components
- functional component
- Core Component Introduction
开始节点
: Contains input parameters to be used as input parameters for the next step
结束节点
: Contains output parameters as final output
添加按钮
: With multi-dimensional available plug-ins, big models, workflows, etc. (according to their own needs to choose), the details are as follows:
试运行
: Test whether the current session is effective and test whether the overall effect meets the requirements.
Simple test a url text analysis tool small plugin. You can see that a successful trial run will show the effect
First have a general impression, know the function of each component, the details will be introduced in the following specific use and distribution of parameters.
4, url analysis small plug-in use
1. Add workflow
2, add url analysis plugin
3. Detect whether the plug-in is in effect
- Configuration parameter url, reference to the start of the session.
Note: Here you have to connect the wire of the start link to configure the url in the parameter, otherwise it won't be displayed.
- test run
The display shows that the plugin parses the url to produce a lot of text, which contains a variety of information. Currently the plugin is working properly.
5、Configuration of large models for content analysis
- Configuring Input Parameters
- Configuring System Prompts
Cue word template (set to your needs)
# 内容解析
按下面的格式提取内容
# 内容提取
summary: 摘要
author:作者
keyword:关键词
time:文章发布时间计算的毫秒数
status:状态
minutes:预估阅读时长
text:标题
link:文章链接
url:标题
# 限制
原始输出和最终输出要求一样
- Configuring User Prompts
- Configuring Output Parameters
On demand, here are the names of the columns of a multidimensional table, the
So for parameter types we use arrays Array<Object>
The form of the set, noting the parameter types
- Test run effect
The result of the run shows that the collation is given as per our requirement,here as expected.
Think: Obviously we've organized the multidimensional table according to the format of the opening multidimensional table, but how do we insert the Flying Book multidimensional table?
6. Plug-ins assist in inserting multi-dimensional forms
We add a multidimensional table plugin to insert a record into the table.
The question that needs attention is: how can what I'm organizing be linked to this form? That is, the question of how it can be converted through this plugin.
Check out the input parameters of the example plugin below, that is, click on View Example
As you can see, the meaning of the parameters is roughly as follows
{
//我们开始新建表格的url
"app_token": "https://bytedance.larkoffice.com/base/CUB4bbZUXaJFT0sU1Vecn1GunFc?table=tblTLjqChZ1z14dn&view=vew3LMVlRA",
//表格列名,分不同类型,替换成自己的和开始新建的表格对应
"records": [
{
"fields": "{"文本":"文本内容","单选":"选项 1","日期":1674206443000}"
}
],
//表名
"table_name": "数据表",
"user_id_type": "open_id"
}
Think: Obviously, we use the big model (content analysis) output does not meet the input of this plug-in, this time in the come between the two need a bridge to achieve the transformation of json, and ultimately we require to be able to have a string of such a json as an input parameter.
The required format is as follows:
{
"fields": {
"作者": "{{author}}",
"状态": "{{status}}",
"阅读时长": "{{minutes}}",
"日期": {{time}},
"关键词": "{{keyword}}",
"摘要": "{{summary}}",
"标题": {
"link": "{{url.link}}",
"text": "{{url.text}}"
}
}
}
So we need to sub ah add a big model to assist in implementing the json transformation.
Here's my system cue word (for reference, customizable)
# 角色
你是一个高效的自动化办公表格助手,能够快速整理资料并进行分类,方便个人和团队进行后期检索。
## 技能
### 技能 1:整理资料
3. 输出整理后的 JSON 格式内容。
===回复示例===
解析输入参数中的内容并整理成下面的格式,填充后格式如下
"fields": {
"作者": "{{author}}",
"状态": "{{status}}",
"阅读时长": "{{minutes}}",
"日期": {{time}},
"关键词": "{{keyword}}",
"摘要": "{{summary}}",
"标题": {
"link": "{{url.link}}",
"text": "{{url.text}}"
}
}
===示例结束===
## 限制:
- 注意严格按照我给出的格式取值
- 只是转化,不得修改内容
- 输出内容必须按照文本中解析的结果,不得修改其中的内容,输入几组就展示几组,不能变更和增减,只做转化内容
- 输出内容必须严格按照给定的 JSON 格式,不能有任何偏差。
Check the test results, OK!
As of now, it's just a matter of inserting it into the form in the last step.
7, the use of fly book multi-dimensional form add_records insertion
Need to add a plugin add_records
The first time you run it, you need to authorize it, just follow the instructions
Display a successful authorization to run the overall test.
The final runtime effect
Workflow Demo
tabular display
summarize
Pitfall 1: The first time you run a workflow you need to authorize it, just look at the results and see what you are prompted to do!
Stepping on the Pit 2: Note the parameter types in the table, if you encounter a parameter type that runs incorrectly, the
Please refer to the official documentation describing this interface: https://open.feishu.cn/document/server-docs/docs/bitable-v1/app-table-record/create
The specific parameter formats for the different types of fields are given here
Pothole 3: It's best to test every additional node, i.e., good unit testing.