您的當前位置: 首頁(yè) > 網(wǎng)站優(yōu)化
發(fā)布時(shí)間:2026-05-05 06:14:17 瀏覽:487 次
在釘釘審批中,釘釘的話(huà)的內如果需要創(chuàng )建包含分欄表單的審批審批審批流程(??-)?,可以通過(guò)以下步驟使用API指定里面的中有指定內容:
(圖片來(lái)源網(wǎng)絡(luò ),侵刪)??1、分欄準備數據
在創(chuàng )建(???)審批流程之前,表單需要準備一個(gè)包含
| 字段名 | 類(lèi)型 | 描述 |
| formId | String | 分欄表單的釘釘的話(huà)的內唯一標識 |
| columns | Array | 分欄表單的列信息 |
| rows | Array | 分欄表單的行信息 |
columns字段是一個(gè)數組,包含分欄表單的審批審批列信息,每個(gè)元素是中有指定一個(gè)對象??,包含以下字段:
| 字段名 | 類(lèi)型 | 描述 |
| columnId | String | 列的分欄唯一標識 |
| fieldIds | Array | 該列包含的字段(?Д?)ID列表(biao) |
rows字段是一個(gè)數組,包含分欄表單的表單行信息,每個(gè)元素是創(chuàng )建一個(gè)對象,包含以下字段:
| 字段名(ming) | 類(lèi)型 | 描述 |
| rowId | String | 行的釘釘的話(huà)的內唯一標識 |
| values | Object | 該行包含的字段值,鍵(′_`)為字段ID,審批審批值為字段值 |
2、中??有指定調用API創(chuàng )建審批流程
API名稱(chēng):create_approval_process
請求方式:POST
請求URL:https://oapi.dingtalk.com/topapi/processinstance/create?access_token=<access_token>
請求參數:
form_da??ta:String,??分欄表單數據(JSON格式)
template_code:String,審批模板編碼,可在釘釘管理后臺查看或創(chuàng )建
title:String,審批標題
description:String,審批描述
approver_ids:Array,審批人ID列表,可選參數
wo??rkflow_id:String,工作流ID,可選參數
business_key:String,業(yè)務(wù)關(guān)鍵詞,可選參數
timeout:Number,審批超時(shí)時(shí)間(秒),可選參數???
after_submit:String,提交后的回調地址,可選參數
after_reject:String,駁回(′?ω?`)后的回調地(?_?;)址,可選參數
after_agree:String,通過(guò)后的回調地址,可選參數
afte??r_timeout:String,超時(shí)后的回調??地址,可選參數
extends_param:Object,擴??展參數,可選參數
form_params:Object,分欄表單參數(??-)?,必填參ヾ(′?`)?數
formId:String,分欄表單的唯一標識
columns:Array,分欄表單的列信??息
rows:Array,分欄表單的行信息
示(shi)例代碼(′?_?`)(Python):
import requestsimport json填寫(xiě)釘釘API相關(guān)信息access_token = "your_access_token"(′ω`)url = "https://oapi.dingtalk.com/topapi/processinstance/create?access_token={ }".format(access_token)template_code = "your_template_code"form_data = { "formId": &quo??t;your_form_id", "co???lumns&q(′▽?zhuān)?uot;: [{ &quヽ(′▽?zhuān)?ノot;columnId": "column1", "fieldIds"(′ω`);: [&qu??ot;field1"(??-)?;, "field2"]}, { "columnId": "column2", "fieldIds": ["field3", "field4"]}], "rows": [{ "rowId": "row1", "values": { "field1": "value1&quo??t;, "field2": "value2"}}, { "rowId": "??;row2", "values": { &qヾ(′▽?zhuān)??uot;field3": "value3", "field??4": "value4"}}]}headers = { "ContentType": "application/json;charset=utf8&quo??t;}data = { "template_code&q?uot;: template_code, "title": "審批標題", "description": &qu??ot;審批描述", "form_params": form_data}re?sponse = request??s.post(url, data=js(′?`*)on.dumps??(data), hea(′_`)ders=headers)print(response.t??ext)以上代碼將創(chuàng )建一個(gè)包含分欄表單的審批流程,請根據實(shí)際情況修改代碼中的釘釘API相關(guān)信息和分欄表單數據。
