api(SDK/CLI에서 호출), webhook(외부 HTTP POST), schedule(크론 기반).
명령
triggers create
--kind(필수)api/webhook/schedule.--name <n>표시 이름.--config <json>종류별 인라인 설정.--x <n>,--y <n>캔버스 위치.
webhook/api에는 초기 시크릿도. 지금 복사할 것. 한 번만 표시).
triggers update
Update 플래그 (그룹별)
정체성--set-name <n>--set-kind api|webhook|schedule--set-x <n>,--set-y <n>,--set-width <n>
schedule)
--set-schedule-mode preset|cron--set-cron <expr>mode =cron용, 예:"0 9 * * *".--set-period daily|weekly|monthly|yearlymode =preset용.--set-time HH:MMpreset 용.--set-day-of-week 1..7weekly 용.--set-day-of-month 1..31monthly 용.--set-month-of-year 1..12yearly 용.--set-interval <n>간격 수.--set-timezone <IANA>예:America/Los_Angeles.--set-schedule-input <text>스케줄 실행마다 넣는 페이로드.--set-schedule-thread-id <id>채팅 Agent 용, 게시할 스레드.--set-schedule-user-id <id>사용자 귀속.--set-schedule-tts true|falsetext-to-speech 입력으로 다룸.
webhook)
--set-webhook-slug <s>경로 접미사(URL이.../trigger/webhook/<slug>가 됨).--set-webhook-input-path <json-path>본문에서 입력 추출.--set-webhook-image-path <json-path>이미지 데이터 추출.--set-webhook-audio-path <json-path>오디오 데이터 추출.--set-webhook-auth-kind <k>none/secret/header.--set-webhook-auth-header <name>headerauth의 헤더 이름.
api)
--set-api-slug <s>경로 접미사.--set-api-auth-kind <k>none/secret/header.--set-api-auth-header <name>.
--patch <json>임의 병합.
triggers edit
$EDITOR에 전체 JSON. 저장하면 적용.
triggers delete
triggers secret rotate
레시피
매일 오전 9시 서울 시간 스케줄 추가
CMS 용 웹훅 트리거 추가
https://api.platform.nora.my/trigger/webhook/<flow-slug>/cms. X-Nora-Signature로 POST 하도록 CMS를 설정.
preset 스케줄을 cron으로 전환
웹훅이 추출하는 입력 경로 바꾸기
옛 CMS 모양:{ "body": "..." }, 경로 body.
새 모양: { "message": { "body": "..." } }: