現在我們開始實作『在Google表格的新增/修改聯絡人資料自動發佈到Slack Channel』這一個應用。
1.首先登入到Workato的服務介面。( https://www.workato.com/ ) 輸入你的帳號及密碼,按下『Login』登入。
2.建立Google Sheets連結:
- 點選『App Connections』
- 點選『Create a new connections』
- 在Application欄位請輸入Google sheets,並點選『Google Sheets』
- 點選『Connect』
3.建立Workbot for Slack連結
- 點選『App Connections』
- 點選『Create a new connections』
- 在Application欄位請輸入workbot,並點選『Workbot for Slack 』
- 點擊『Link your account』
- 點擊『Allow』
- 確認Connection success表示連線成功
3.2在Slack建立Workbot連線測試
- 點選『# general』頁籤,在文字輸入列,輸入 “ @workbot”按下Enter鍵。
- Workbot回應”A new contact has been added!”表示連線完成。
4.創建第一個食譜(Recipe)
- 點擊『Recipes』
- 點擊『Create a new recipe』
- 在Name輸入『Google Sheets to Slack』
- 在Pick a starting point選擇『Trigger from an app』
- 點擊『Start building』
- 點選『Google Sheets』
- 點選『New/update row in sheet in My Drive』
6.設定Connection,選擇剛才所建立的My third Google Sheets account
7.這個是我們之前建立的Google試算表,請記下檔名(New Contacts)、工作表1
8.在Setup步驟,請依照Google試算表來選取:
- Spreadsheet : 選擇『New Contacts』
- Sheet :選擇『工作表1』
- Column to monitor :選擇『All columns』,監視所有欄位。
9.連線到Workbot for Salck:
- 點選『+』
- 選擇『Action in an app』
- 選擇『Workbot for Slack』
10.在Action步驟:點選『Post message』
11.在Connection步驟:點選原先設定到的『My Workbot for Slack account』
12.在Setup步驟,先移除建議值,請點選『Remove suggestions』
13.設定傳送訊息到Slack,有兩個Block區塊,分別傳送圖片及文字。
- 在Reply channel 請選擇要發佈訊息的頻道,在Select from list功能下選擇『general』
- 在Blocks區塊,展開區塊後點擊『Add block』按鈕。(如果沒有看到這個畫面,可以點擊區塊右上方『...』會出現INPUT MODE,請選取『Fixed list』就會出現)
- Type : 選擇『 Section with image』
- Section text : 『新增一位聯絡人』
- Image URL : 請從左邊的Recipe data拖拉或點選『Image Url』
- Image alternative text : 如果圖片沒有出現的替代文字,請輸入『圖片下載失敗』
15.建立這二個區塊,傳送聯絡人資訊到Slack
- 點選『+ Add block』
- Type : 選擇『Section with text』
- Section text :請填寫姓名、Email、電話,並分別從左側Recipe data將對應的資料項托拉進來。
16.完成以上步驟就可以存檔及測試
- 點選『Save』存檔
- 點選『Test』測試流程
- 點選『Start recipe』啟動流程。
17.開啟Slack查看#general頻道,可以看到以下畫面就表示成功從Google Sheets傳送資料到Slack。
沒有留言:
張貼留言