Is it possible for a workflow to allow multiple triggers? For example an HTTP request but also an incoming email?

This topic was automatically generated from Slack. You can find the original thread here.

Nacho Caballero : Is it possible for a workflow to allow multiple triggers? For example an HTTP request but also an incoming email?

Dylan Sather (Pipedream) : In limited ways, yes, and we plan to greatly expand this functionality. There’s not a UI for it (nor would you see secondary triggers appear in the UI once configured), but you can use our REST API to setup these “subscriptions”.

See https://docs.pipedream.com/api/rest/#listen-for-events-from-another-source . The emitter ID and listener ID will accept either an event source ID (dc_abc123) or a workflow ID (p_abc123). In your case, your workflow is your listener, and the event sources are your emitters.

So you could, for example, select an email trigger when you create your workflow (through the UI), then use this API to configure additional subscriptions that send events from an HTTP event source to this workflow, as well.

Dylan Sather (Pipedream) : We’d actually love to know how you’d like to use this, and how this API works for you, so that we can start thinking about how to expose this in the UI

Giao Phan : It’s a bit undocumented, but if you use the native http trigger, you can also use that hostname as an email address and it should work.

Nacho Caballero : Ah, very cool. So blahblah@pipedream.net, right?

Nacho Caballero : It takes a couple minutes, but it works great and I get all these useful properties :+1:

image.png

Giao Phan : yeah en******@pipedream.net

Dylan Sather (Pipedream) : nice glad that worked for you Nacho

Nacho Caballero : Yes, secret level unlocked. :tada: Thanks for the subscription suggestion, though. For now I can get by with Giao’s method. I often have to run a workflow in response to a customer request. Sometimes I want to do it by sending an HTTP request directly from the command line (with an email param) but other times it might be easier to trigger it by forwarding the customer email directly

Nacho Caballero : By the way, it’s no bother, but for every new workflow (or right now after sending the first email), I get four automatic GET events like this one that error out

image.png

Nacho Caballero : also favicon.ico, apple-touch-icon-precomposed.png and /

Dylan Sather (Pipedream) : Just to confirm, do you see those requests only when you load the workflow’s URL in a browser, or in the email and other cases?

Nacho Caballero : Every single time I create a workflow

Nacho Caballero : in a browser

Nacho Caballero : Just created one now:

Dylan Sather (Pipedream) : oh hmm, that’s odd. Would you mind giving me the exact steps to reproduce? Are you saying those events actually appear automatically, without you sending an event to the workflow?

Nacho Caballero : yep. Create a workflow and select an HTTP trigger. That’s it

Nacho Caballero : It doesn’t happen if I select a cron trigger

Dylan Sather (Pipedream) : what browser? I’m not able to replicate in Chrome.

Nacho Caballero : Chrome in OSX. Let me try in incognito mode in case it’s due to an extension