首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >松弛view_submission有效载荷block_ids

松弛view_submission有效载荷block_ids
EN

Stack Overflow用户
提问于 2022-01-19 21:31:32
回答 1查看 281关注 0票数 2

我试图从一个松弛的模式有效负载(使用Integromat)获取提交的数据,但是我无法将字段匹配为字段名(block_ids)和每个提交的随机更改。

不知道从哪里开始,是否有什么事情是我可以做的来阻止这件事,或者我如何在Integromat处理这件事?

有效载荷如下:

代码语言:javascript
复制
{
   "blocks":[
      {
         "type":"header",
         "block_id":"GH6Wh",
         "text":{
            "type":"plain_text",
            "text":"AHome",
            "emoji":true
         }
      },
      {
         "type":"input",
         "block_id":"ayv5",
         "label":{
            "type":"plain_text",
            "text":"Project Title",
            "emoji":true
         },
         "optional":false,
         "dispatch_action":false,
         "element":{
            "type":"plain_text_input",
            "action_id":"field_project_title",
            "dispatch_action_config":{
               "trigger_actions_on":[
                  "on_enter_pressed"
               ]
            }
         }
      },
      {
         "type":"input",
         "block_id":"4Tf7",
         "label":{
            "type":"plain_text",
            "text":"Client Project Contacts",
            "emoji":true
         },
         "optional":false,
         "dispatch_action":false,
         "element":{
            "type":"multi_static_select",
            "action_id":"client_project_contacts",
            "placeholder":{
               "type":"plain_text",
               "text":"Select",
               "emoji":true
            },
            "options":[
               {
                  "text":{
                     "type":"plain_text",
                     "text":"jennifer",
                     "emoji":true
                  },
                  "value":"47dht5f-1942-4448-9842-20fef64dcd67"
               }
            ]
         }
      },
      {
         "type":"divider",
         "block_id":"a=6G"
      },
      {
         "type":"section",
         "block_id":"qtq0W",
         "text":{
            "type":"mrkdwn",
            "text":"Project Start",
            "verbatim":false
         },
         "accessory":{
            "type":"datepicker",
            "action_id":"field_project_start_date",
            "initial_date":"2022-01-19",
            "placeholder":{
               "type":"plain_text",
               "text":"Select a date",
               "emoji":true
            }
         }
      },
      {
         "type":"section",
         "block_id":"4YOTI",
         "text":{
            "type":"mrkdwn",
            "text":"Project Finish",
            "verbatim":false
         },
         "accessory":{
            "type":"datepicker",
            "action_id":"field_project_end_date",
            "initial_date":"2022-03-19",
            "placeholder":{
               "type":"plain_text",
               "text":"Select a date",
               "emoji":true
            }
         }
      },
      {
         "type":"divider",
         "block_id":"MZU"
      },
      {
         "type":"input",
         "block_id":"v09",
         "label":{
            "type":"plain_text",
            "text":"Project Manager",
            "emoji":true
         },
         "optional":false,
         "dispatch_action":false,
         "element":{
            "type":"static_select",
            "action_id":"field_project_managers",
            "placeholder":{
               "type":"plain_text",
               "text":"Select",
               "emoji":true
            },
            "options":[
               {
                  "text":{
                     "type":"plain_text",
                     "text":"Eric ",
                     "emoji":true
                  },
                  "value":"b85ba51b-2346-481f-98a8-2b94fh994575"
               }
            ]
         }
      },
      {
         "type":"input",
         "block_id":"gxN9",
         "label":{
            "type":"plain_text",
            "text":"Project Team",
            "emoji":true
         },
         "optional":false,
         "dispatch_action":false,
         "element":{
            "type":"multi_static_select",
            "action_id":"field_project_team",
            "placeholder":{
               "type":"plain_text",
               "text":"Select",
               "emoji":true
            },
            "options":[
               
            ]
         }
      },
      {
         "type":"divider",
         "block_id":"CU1k"
      },
      {
         "type":"input",
         "block_id":"ows",
         "label":{
            "type":"plain_text",
            "text":"Setup apps",
            "emoji":true
         },
         "optional":true,
         "dispatch_action":false,
         "element":{
            "type":"checkboxes",
            "action_id":"setup_apps",
            "options":[
               {
                  "text":{
                     "type":"plain_text",
                     "text":"Harvest",
                     "emoji":true
                  },
                  "value":"setup_harvest"
               },
               {
                  "text":{
                     "type":"plain_text",
                     "text":"Dropbox Project Folder",
                     "emoji":true
                  },
                  "value":"setup_dropbox"
               }
            ]
         }
      },
      {
         "type":"divider",
         "block_id":"Eov"
      }
   ],
   "private_metadata":"",
   "callback_id":"_project_setup_form_submit",
   "state":{
      "values":{
         "ayv5":{
            "field_project_title":{
               "type":"plain_text_input",
               "value":"cvgf"
            }
         },
         "4Tf7":{
            "client_project_contacts":{
               "type":"multi_static_select",
               "selected_options":[
                  {
                     "text":{
                        "type":"plain_text",
                        "text":"Jennifer",
                        "emoji":true
                     },
                     "value":"04a96f00-c84d-403c-992f-28fgh34b7ade"
                  }
               ]
            }
         },
         "qtq0W":{
            "field_project_start_date":{
               "type":"datepicker",
               "selected_date":"2022-01-19"
            }
         },
         "4YOTI":{
            "field_project_end_date":{
               "type":"datepicker",
               "selected_date":"2022-03-19"
            }
         },
         "v09":{
            "field_project_managers":{
               "type":"static_select",
               "selected_option":{
                  "text":{
                     "type":"plain_text",
                     "text":"Eric",
                     "emoji":true
                  },
                  "value":"b85ba51b-2346-481f-9sa8-2b9468994575"
               }
            }
         },
         "gxN9":{
            "field_project_team":{
               "type":"multi_static_select",
               "selected_options":[
                  {
                     "text":{
                        "type":"plain_text",
                        "text":"Elliot",
                        "emoji":true
                     },
                     "value":"94c4b483-fbg8-4211-971d-38cf615fdc5e"
                  }
               ]
            }
         },
         "ows":{
            "setup_apps":{
               "type":"checkboxes",
               "selected_options":[
                  {
                     "text":{
                        "type":"plain_text",
                        "text":"Harvest",
                        "emoji":true
                     },
                     "value":"setup_harvest"
                  }
               ]
            }
         }
      }
   }
}
EN

回答 1

Stack Overflow用户

发布于 2022-02-07 15:41:52

在创建视图时,您可以(但不需要)为每个块指定一个"block_id"属性。当没有提供ID时,每次似乎都是随机生成的。

示例:

代码语言:javascript
复制
{
  "type": "modal",
  "callback_id": "modal-identifier",
  "title": {
    "type": "plain_text",
    "text": "Just a modal"
  },
  "blocks": [
    {
      "type": "section",
      "block_id": "section-identifier",
      "text": {
        "type": "mrkdwn",
        "text": "*Welcome* to ~my~ Block Kit _modal_!"
      },
      "accessory": {
        "type": "button",
        "block_id": "just-a-button",
        "text": {
          "type": "plain_text",
          "text": "Just a button",
        },
        "action_id": "button-identifier",
      }
    }
  ],
}

来源,我为按钮添加了第二个"block_id"

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70777993

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档