https://dagster.io/ logo
#ask-community
Title
# ask-community
s

Stefan Adelbert

05/27/2022, 12:19 AM
Triggering Automations from the Outside World I would like to be able to trigger a job run as a result of some external event - a user clicking a button somewhere on the internet or some other system creating the event, e.g. Zapier, JotForm, Pipedream. A sensor could poll for some condition to be true (level triggering), but it would be neat to have dagster respond directly to a trigger (event triggering). I'm aware of "Launch a run" using GraphQL (https://docs.dagster.io/concepts/dagit/graphql#launch-a-run). To use this functionality for a dagster instance running in GCP, I suppose I'd need to create a (secure) endpoint which can behave like a webhook. That endpoint would need to translate a REST API call to a GraphQL and vice versa for the response. Anyone got recommendations for a good way to achieve this?
dagster bot resolve to issue 1
s

sean

05/27/2022, 1:19 PM
@prha @daniel
p

prha

05/27/2022, 4:13 PM
Hi Stefan. We’ve informally discussed adding an abstraction to be able to translate a simple action / trigger into a set of job-specific (with run config / tags) launch parameters, to support this type of “push”-style launches. I’ll add an issue so we can formally track this
@Dagster Bot issue Add “trigger” like abstraction to support push-style launches from external events
d

Dagster Bot

05/27/2022, 4:13 PM
p

prha

05/27/2022, 4:14 PM
I think we’d probably still use GraphQL for everything, so want to make sure that the REST -> GraphQL is not the main blocker.
s

Stefan Adelbert

05/27/2022, 11:38 PM
@sean @prha Thanks for responding. I'm ok with doing the REST to GraphQL translation. It should be fairly trivial. I image launching a "delegator" job which gets a pass-thru of all params from the REST call and then yield the appropriate
RunRequest
. Doing it this way would allow for the "trigger" mechanism to be completely generic and the "switching", i.e. picking the appropriate job, could then the repo specific. This is relevant for me because I have several instances of dagster running in various locations and I'd want to have a general mechanism like this running for each instance.