How to use IFTTT with TRIGGERcmd
-
oops - that was for @Russ
-
FYI, for anyone reading, @triggercmddm got it working. He needed to change the trigger name from 'reboot' to 'Reboot in 10 seconds' and he needed to remove '¶ms=russ.txt' from the body.
URL: https://www.triggercmd.com/api/IFTTT?trigger=Reboot in 10 seconds&computer=R1 BODY: token=XYZ
-
...so just for the record and to complete the loop.
@Russ just IM'd me and resolved the issue.
Amazing service and phenomenal customer journeyIn brief, to reboot/restart your Windows 10 PC from an iOS Home Screen button click, do the following:
- Install TriggerCMD Agent
- Sign up/in to IFTTT
- For the If bit: select Button Widget
- For the Then bit: select webhooks and enter the following:
i. URL: https://www.triggercmd.com/api/IFTTT?trigger=Reboot in 10 seconds&computer=R1
ii. METHOD: POST
iii. CONTENT TYPE: x-www-form-urlencoded
iv. BODY: token=XYZ
Notes:
There are spaces in "Reboot in 10 seconds"
My computer name is "R1"
<obviously <XYZ> is my tokenTo add the button widget to your iOS home screen:
- Tap the share icon (square with the up arrow)
- Tap "Add to Home Screen"
- Tap "Add"
- Enjoy
-
I know this is an old post, but I wanted to share what I intent to do in order to illustrate what can be done with a very practical example.
I have a set of surveillance cameras. Some are indoor, some are outside. My associated software is iSpy. I also have a security system that only allows to get notifications via emails, as the Cie has its own proprietary surveillance system, at a different cost than mine (^_^). I want shut down the indoor and backyard cameras when I am in house, and turn them back on when I leave, or sleep, using the notification eMail. So, I plan on… Create 2 tasks conditions in IFTTT, for “Off” & “On”.
Use <if><gmail> with proper filter on sender and subject), using respectively the words”Disarmed” & “Armed”.
Use your method to trigger a batch commands to iSpy, that may look like this:
URL: https://www.triggercmd.com/api/IFTTT?trigger=run ispy.exe "recordstop.alarmset"&computer=MyPC
... where alarmset is the set of cameras to stop in this case.
I will keep you posted of the outcome. -
@rpondevie, good luck. That's a cool project. I suggest you make your IFTTT URL something like this:
https://www.triggercmd.com/api/IFTTT?trigger=ispy&computer=MyPC¶ms=recordstop.alarmset
Then make a command with these values:
- Trigger = ispy
- Command = c:\program files\ispy\ispy.exe (probably a different path)
- Allow Parameters = true
-
@Russ how would I run it with multiple parameters I am trying to make a program where it moves the mouse with powershell when I run from the triggercmd website with parameters it run but when I run it like that my parameters do not pass threw only one does
https://www.triggercmd.com/api/IFTTT?trigger=mouse&computer=LAPTOP-M0RN3NEB¶ms={{TextField}},{{NumberField}}
-
@spotandjake-100, you can pass multiple parameters by separating them with a space, or a %20, so like this:
https://www.triggercmd.com/api/IFTTT?trigger=mouse&computer=LAPTOP-M0RN3NEB¶ms={{TextField}}%20{{NumberField}}
-
does the IFTTT webhook method work with a free account or only with subscription?
I tested with this comment without succeshttps://www.triggercmd.com/api/IFTTT?trigger=Notepad&computer=PC
method = POST
Content-Type: application/x-www-form-urlencodedwith PC being the name of my computer as registered in my profile.
-
@koen-van-lent, it should work with a free account too, but only 1 per minute of course.
Do you have token=(your token from Instructions page) in the body?
-
Yuppie, this works so well thank you for the article. I did a simple google assistace IFTTT applet to put my mac to sleep.
-
@Mittal-Makwana, nice, what command does that?