๐ŸŒฑ UiPath Webhook

Posted by labft3231 on April 3, 2020

UiPath Webhook.


  1. webhook์˜ ์•Œ์•„๋ณด๊ณ  ์‹ถ์€ ๊ณ„๊ธฐ

    • log์— ๋”ฐ๋ฅธ ํŠธ๋ฆฌ๊ฑฐ ํ™œ์šฉ
    • ๋กœ๊ทธ๋ฅผ ๊ธฐ๋ก ๋ฐ ํ”„๋กœ์ ํŠธ ๊ด€๋ฆฌ



  2. ์‚ฝ์งˆ ๊ณผ์ •

    • RPA์™€ ์ตœ๊ทผ go์–ธ์–ด๋ฅผ ๊ฐ™์ด ๋ณ‘ํ–‰ํ•˜๊ณ  ์žˆ์–ด์„œ go์–ธ์–ด์˜ ๋‹ค์–‘ํ•œ ํ”„๋ ˆ์ž„์›Œํฌ ์ค‘์— revel framework์„ ์„ ํƒํ•˜์—ฌ test web ๊ฐœ๋ฐœ (ํ•˜์ง€๋งŒ webhook์—์„œ ๋กœ๊ทธ๋ฅผ ๋ฐ›์•„์˜ค์งˆ ๋ชปํ•จ.)

    • curl์„ ํ†ตํ•ด http request๋ฅผ ๋‚ ๋ฆฌ๋ฉด ์„œ๋ฒ„๋Š” ์ •์ƒ์ ์œผ๋กœ ๋™์ž‘ํ•˜์—ฌ ์„œ๋ฒ„๋Š” ๋™์ž‘ํ•˜์ง€๋งŒ ์ œ๋Œ€๋กœ ๋œ ๊ฐ’์ด ๋“ค์–ด์˜ค์ง€ ์•Š์Œ

    • ์˜ˆ์‹œ ๊ฒ€์ƒ‰ํ•˜์—ฌ github๋ฅผ ํ†ตํ•ด node.js ๊ธฐ๋ฐ˜์˜ webhook ์„œ๋น„์Šค ์ฐพ์•„ clone

    • ์†Œ์Šค๋ฅผ ๋ณด๊ณ  rest swagger๋ฅผ ํ†ตํ•ด ํ•„์š”ํ•œ url๊ณผ ์ธ์ž๋ฅผ ํ™•์ธํ•œ ๊ฒฐ๊ณผ ์ฒ˜์Œ ํ™œ์„ฑํ™”๋ฅผ ์œ„ํ•ด์„œ ๋‹ค์Œ ์ธ์ž๋ฅผ ๋„ฃ์–ด์•ผํ•จ

      [POST] /api/Account/Authenticate ์—์„œ ์•„๋ž˜์˜ ์ •๋ณด๋ฅผ ๋ณด๋ƒ„

      1
      2
      3
      4
      5
      
      {
        "tenancyName": "",
        "usernameOrEmailAddress": "",
        "password": ""
      }
      
    • ์œ„์˜ ์กฐ๊ฑด์— ํ•ด๋‹น๋œ๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋Š” ์ธ์ž๋“ค์„ ์„ค์ •ํ•ด๋ดค์ง€๋งŒ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๋œธ
      1
      2
      3
      4
      5
      6
      7
      8
      9
      
      {
      
      โ€‹	"message":"Invalid credentials, failed to login.",
      
      โ€‹	"errorCode":1000,
      
      โ€‹	"resourceIds":null
      
      }
      
    • requestํ•˜๋Š” ์ธ์ž๊ฐ€ ์ž˜๋ชป๋˜์—ˆ๋‹ค๊ณ  ํŒ๋‹จํ•˜์—ฌ ๋‹ค์–‘ํ•œ ์ธ์ž๋ฅผ ๋ฐ”๊ฟ”๊ฐ€๋ฉฐ ์ค˜๋ฐจ์ง€๋งŒ ์‹คํ–‰๋˜์ง€ ์•Š์•˜์Œ

    • ๊ตฌ๊ธ€๋ง ํ•œ ๊ฒฐ๊ณผ ๋ณ„๋กœ ์ •๋ณด๊ฐ€ ์—†์—ˆ์ง€๋งŒ ์˜จํ”„๋ ˆ๋ฏธ์Šค ํ˜•ํƒœ์—ฌ์•ผํ•œ๋‹ค๋Š” ๋ง์ด ์žˆ์Œ

    • ์ผ๋‹จ ์˜จํ”„๋ ˆ๋ฏธ์Šค ํ˜•ํƒœ๋ฅผ ์‹คํ–‰ ํ•ด๋ณด๊ธฐ ์œ„ํ•ด uipath์— free trial ์‹ ์ฒญํ•œํ›„ ์˜จํ”„๋ ˆ๋ฏธ์Šค ์„ค์น˜ํ–ˆ์ง€๋งŒ. tanant ID์„ค์ •๊ณผ ๋น„๋ฐ€๋ฒˆํ˜ธ ์„ค์ •์ด ์žˆ์–ด ์„ค์ •ํ–ˆ์ง€๋งŒ ์—ญ์‹œ node์—์„œ ์‹คํ–‰์ด ๋˜์ง€ ์•Š์Œ

    • orchestrator๋ฅผ ๋ฟ์•„๋‹ˆ๋ผ studio๋„ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ๊ธ‰์œผ๋กœ ์‹ ์ฒญ์ด ๋˜์–ด์•ผํ•˜๋‚˜ ์‹ถ์–ด trial key ๋ฐœ๊ธ‰

    • ๋ฐœ๊ธ‰ ๋ฐ›์€ํ‚ค๋กœ ํ™œ์„ฑํ™” ํ•˜๋ คํ–ˆ์ง€๋งŒ ๋ผ์ด์„ผ์Šค ํ‚ค๊ฐ€ ์ž˜๋ชป๋˜์—ˆ๋‹ค๋Š” ์—๋Ÿฌ๊ฐ€ ๋œธ

    • UiPath์— ๋ฌธ์˜ ๋ณด๋ƒˆ์ง€๋งŒ โ€˜-โ€˜๋ฅผ ์—†์• ๊ณ  ๋“ฑ๋กํ•ด๋ณด๋ผ๋Š” ์—ฐ๋ฝ์„ ๋ฐ›์Œ

    • ํ•ด๊ฒฐ ํ›„ ์•Œ๋ ค์ค€๋‹ค ์—ฐ๋ฝ์ด ์™”์ง€๋งŒ ์ฃผ๋ง์ด๋ผ ๊ทธ๋Ÿฐ์ง€ ์—ฐ๋ฝ์ด ๋Š๊ฒผ๋‹ค.



  1. ์˜ˆ์ƒ

    • ๋‚ด๊ฐ€ ์ธ์ž ์ž˜๋ชป ์ž…๋ ฅํ–ˆ๊ฑฐ๋‚˜, ์˜จํ”„๋ ˆ๋ฏธ์Šค ํ™˜๊ฒฝ์—์„œ ๋™์ž‘์ด๊ฑฐ๋‚˜..

    • flask๋ฅผ ํ™œ์šฉํ•œ ์‚ฌ๋žŒ์€ ์ธ์ž๊ฐ€ ์•„๋ฌด๊ฒƒ๋„ ์—†๋Š” POST ๋ฉ”์†Œ๋“œ์ธ๋ฐ log๊ฐ€ ์ž˜๋“ค์–ด์˜จ๋‹จ๋‹ค.. (https://excelcult.com/2019/10/01/how-to-use-uipath-orchestrator-webhooks/)

    • uipath ์˜จํ”„๋ ˆ๋ฏธ์Šค๋Š” ์•„๋งˆ studio์— ๋ผ์ด์„ผ์Šค ๋“ฑ๋กํ•˜๊ณ  cloud.uipath.com์— ๋กœ๋ด‡์„ ๋“ฑ๋กํ•˜๋ฉด์„œ ์–ป์€? ์ธ์ž๋ฅผ ํ™œ์šฉ



  1. ๊ฒฐ๋ก 

    • ๋กœ๊ทธ์ธ์ด ์•ˆ๋˜๋Š”๋ฐ Studio์ปค๋ฎค๋‹ˆํ‹ฐ ๋ฒ„์ „์—์„œ๋Š” ํ™œ์„ฑ ๋ถˆ๊ฐ€๋Šฅํ•œ์ง€.

    • ์•„๋‹ˆ๋ฉด post์— ์ธ์ž๋Š” ์–ด๋–ค ๊ฐ’์„ ์–ด๋””์„œ ๋ณด๊ณ  ์ ์–ด์•ผํ•˜๋Š”์ง€?

โ€‹