Zapier Zaps with branching Logic - zapier

I want to create a zap with branching logic. I want to do this since the gateway/REST API am using supports addition of only one web hook. I require a Zap that can perform Action 'A' when suppose trigger returns an event with 'event_type' = 'alpha' and Action 'B' will be performed when the same trigger returns an event with 'event_type' = 'beta'
example:
if trigger_A.output.event_type = 'alpha'
then 'Send mail' to 'abc#xyz.com'
else if trigger_A.output.event_type = 'beta'
then 'Send message' to 'Slack'
else
post in 'Facebook' trigger_A.output.message
Is this possible with a single Zap?
NOTE that I cannot add multiple webhooks to my REST API, and hence I cannot have multiple Triggers, and I can use use maximum 1 Zap.
Any help from the forum would be appreciated.

edit: This answer is outdated. See the other answer about Zapier's first-party support for Paths.
David here, from the Zapier Platform team.
I've got good news and bad news! The bad: this is not currently possible out of the box. It's being discussed internally and we have nothing further to say about it at this time.
The good news is that the workflow you describe is possible, but it'll take a few zaps:
Zap A: Webhooks (catch) -> Code -> Webhooks (post)
Zap B: Webhooks (catch) -> Gmail (send mail)
Zap C: Webhooks (catch) -> Slack (send message)
Zap D: Webhooks (catch) -> Facebook (create new post)
The steps are as follows:
Your service sends a webhook to Zap A with a key+value describing event_type
You have a code step that runs the real version of the pseudocode you posted above, setting a url variable based on the event type. Zaps B,C,D each have a unique url for their trigger, all of which are known to Zap A.
Zap A posts to the url returned in step 2, sending along whatever data you'd like.
One of the child zaps (B,C,D) gets triggered, doing the desired action.
So there you have it! Not pretty, but certainly doable.
​Let me know if you've got any other questions!

I know this is an old question, but it's worth sharing the good news. You can now define branching logic with Zapier out-of-the-box:
Paths let you build advanced workflows to run different actions based
on conditions you decide. Paths are Zapier's conditional logic tool.
Think of Paths as If/then logic: if A happens in your trigger app,
then do this, if B happens then do something else, and so on.
The Paths feature is only available on Professional, Professional Plus, and Teams plan accounts. More can be found in the Zapier documentation on Paths.
Another option that may be helpful is using filters and multiple zaps.

Related

Webhooks for Zapier

I am having some trouble using the webhooks Zap with another program called FileStage. I have the Catch Hook and Get enabled. I've been able to do this on one Zap but when I duplicated it (because I need more than 3 paths) it no longer works on the duplicated zaps. I also tested this through the sample data and it worked file, it's just not running with new data.
Any help that you can lend would be appreciated as it helps us streamline our workflow to ensure nothing's missed.
Thanks!
I've been able to do this on one Zap but when I duplicated it (because I need more than 3 paths) it no longer works on the duplicated zaps)
Each duplicated zap gets its own Webhook Url, so you'll need to set up multiple outgoing webhooks in FileStage.

Using Zapier to process a backlog of existing emails in GMail?

I've successfully set up a Zap to process new emails matching a given search in my Gmail account (extracting info and adding it to a Google Sheet). But I'd like to make it process the 145 existing matching emails already archived in my Gmail as well. Is there a way to accomplish this?
David here, from the Zapier Platform team. Unfortunately, Zapier is built around doing ongoing work, not a single task. Polling is specifically designed to only process new things after the zap has been turned on. So, you'll have to cheat a bit.
For the purposes of your backlog you could set the gmail filter to look for what it's set to now, plus a label (say, zapier-backlog). If you do the search right now, it should be empty (and a poll on the zap with that search shouldn't return anything). After you turn the zap on, add that label to all emails you want processed, and the'll show up as "new" to the zap and all get processed accordingly.
Once that's done, you'll want to remove those changes and only have it process new emails. Hope this helps. ​Let me know if you've got any other questions!

Jenkins pipeline manual step permission

In our existing CD pipeline there is a manual step to push from test to production. Furthermore only certain persons can authorise this. We control this through Jenkins freestyle jobs in views with certain users having permissions to different views.
Now we are thinking about using Jenkins pipelines. There is an input step for a user to manually approve the go ahead to the next stage.
Is there a way to control who can perform the manual input? Alternatively, is there an API for progressing the pipeline, in which case we could build the tooling to let relevant users have permission.
Research
This SO post suggests it's not possible to do the API call.
This Jenkins issue tells me there is no ability to resume a pipeline that is stopped because of a failure
So far it's looking like a resounding "NO" to authorisation of manual step and progressing via API. Any other ideas appreciated.
From the documentation that you linked to, there's a submitter parameter where you can specify the allowed users/external groups allowed to respond to the input, which sounds like it should be what you're looking for.
submitter (optional)
User IDs and/or external group names of person or people permitted to respond to the input, separated by ','. If you configure "alice, bob", will match with "alice" but not with "bob". You need to remove all the white spaces.

Can I use the URLTrigger plugin for FogBugz with TestRail?

We're using TestRail and FogBugz. I found this trigger today:
http://help.fogcreek.com/7755
The URL Trigger Plugin allows you to specify an HTTP request to be
sent to a specific URL when events occur in FogBugz. To create a
URLTrigger, select one or more events that your trigger will respond
to, then add values to the URL querystring using a list of variables
presented by the plugin.
I'm trying to get this to integrate, somehow, with TestRail. Ideal steps:
In TestRail, mark a test as failed, and enter the FB number in the Defects box.
In FogBugz, resolve the case.
FogBugz, using this plugin, sends an update string to TestRail, and changes the status of the test to "Retest".
My question: is this even possible, or am I dreaming again?
This is not possible with only URLTrigger plugin.
The main issue is that TestRail has access to the FB case number but FB does not know the TestRail case numbers. To do what you want you'll need a fuller feature set to look up the TestRail cases by "defect" (FB case) and then set their status.
It can likely be done with a custom FogBugz plugin which can include significantly more logic and multiple calls to the TestRail API.

Get Attendee Data w/ Website Workflow's 3rd Part Next Steps

I am working w/ the Event Brite API and I have a need that I am trying to figure out the best approach for. Right now, I have an event that people will be registering for. At the final step of the registration process, I need to ask them some questions that are specific to my event. Sadly, these questions are data-driven from my website, so I am unable to use the packaged surveys w/ Event Bright.
In a perfect world, I would use the basic flow detailed in the Website Workflow of the EB documentation, ending upon the "3rd Party Next Steps" step (redirect method).
http://developer.eventbrite.com/doc/workflows/
Upon landing on that page, I would like to be able to access the order data that we just created in order to update my database and to send emails to each person who purchased a seat. This email would contain the information needed to kick off the survey portion of my registration process.
Is this possible in the current API? Does the redirect post any data back to the 3rd party site? I saw a few SO posts that gave a few keywords that could be included in the redirect URL (is there a comprehensive list?). If so, is there a way to use that data to look up order information for that order only?
Right now, my only other alternative is to set up a polling service that would pull EB API data, check for new values, and then kick off the process on intervals. This would be pretty noisy for all parties involved, create delay for my attendees, and I would like to avoid it if possible. Thoughts?
Thanks!
Here are the full set of parameters which we support after an attendee places an order:
http://yoursite.com/?eid=$event_id&attid=$attendee_id&oid=$order_id
It's possible that order_id and attendee_id would not be a numeric value, in which case it would return a value of "unknown." You'll always have the event_id though.
If you want to get order-specific data after redirecting an attendee to your site, you can using the event_list_attendees method, along with the modified_after parameter. You'll still have to look through the result set for the new order_id, but the result set will be much smaller and easier to navigate. You can get more information here: http://developer.eventbrite.com/doc/events/event_list_attendees/
You can pass the order_id in your redirect URL in order to solve this.
When you define a redirect URL, Evenbrite will automatically swap in the order_id value in place of the string "$order_id".
http://your3rdpartywebsite.com/welcome_back/?order_id=$order_id
or:
http://your3rdpartywebsite.com/welcome_back/$order_id/
When the user completes their transaction, they will be redirected to your external site, as shown here: /http://developer.eventbrite.com/doc/workflows/
When your post-transaction landing page is loaded, grab the order_id from the request URL, and call the event_list_attendees API method to find the order information in the response.

Resources