IFTTT allows you to plug nearly anything into nearly anything else. And, using this guide, you can use it to trigger Mechanic tasks using that same set of nearly anything. This means that you can run sales with a lightswitch, or with the International Space Station.

To get started, head to the "Settings" section of your Mechanic account. You can find it here, from your home screen:

In the "Webhooks" section, click the "+ Add a webhook" button.

Next, configure your new webhook with the name and event topic of your choice. Your configuration might look like this:

Save the webhook, and copy the resulting webhook URL:

We'll use that webhook URL in just a moment. :)

Let's move on to IFTTT. Begin by starting a new applet, registering or logging in as needed.

Click the blue "+this" text, and choose whatever service you'd like to set off your Mechanic task. After selecting the service, you'll be asked to choose a specific trigger. Again, choose whatever you like.

Next, click the "+that" text, and search and select the "Webhook" service.

This service only has one action, called "Make a web request". Select it.

On the next screen, configure the action with your Mechanic webhook URL, and a "POST" method, like so:

If you want to pass specific information from your IFTTT trigger on to Mechanic, use the "Content Type" and "Body" settings as appropriate, and continue on to save your new IFTTT applet.

A quick technical note: Mechanic will expose submitted webhook data in {{ event.data }}, according to your content type: plain text will be represented as a string, while JSON and form-encoded content will be exposed as an object. Get in touch with support if you have questions about this!

Back over in Mechanic, create a new task or open an existing task, and add user/ifttt/trigger to its task subscriptions. If you chose a different event topic when configuring your Mechanic webhook, don't forget to use the right topic here!

If you're creating a new task, try using an echo action to quickly see what kind of data IFTTT might be sending your way. Use the "Echo" insert button, beneath the task script editor, to easily add an echo action that returns all event data, like so:

That's it! Use that chat button in the corner if you have any questions. :) Have fun!

Did this answer your question?