現在我們開始實作『在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』
- 點選『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!”表示連線完成。
- 點擊『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』
- Spreadsheet : 選擇『New Contacts』
- Sheet :選擇『工作表1』
- Column to monitor :選擇『All columns』,監視所有欄位。
9.連線到Workbot for Salck:
- 點選『+』
- 選擇『Action in an app』
- 選擇『Workbot for Slack』
- 在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 : 如果圖片沒有出現的替代文字,請輸入『圖片下載失敗』
- 點選『+ Add block』
- Type : 選擇『Section with text』
- Section text :請填寫姓名、Email、電話,並分別從左側Recipe data將對應的資料項托拉進來。
- 點選『Save』存檔
- 點選『Test』測試流程
- 點選『Start recipe』啟動流程。