IFTTT Do webform
I’ve just made up a way to make a Do webform app using IFTTT. You can upload the code wherever you want or even in local.
Recipe
If Maker trigger then send a preformatted text.
My example recipe is a IF Notification but you can use this trigger to fire an email, a slack message or SMS.
Code
Here is the code, do not forget to match the trigger and key.
<!DOCTYPE html>
<html>
<link href="css/bootstrap.min.css" rel="stylesheet">
<body>
<h1>IFTTT Form</h1>
<form class="form-inline">
<div class="form-group"> <label class="sr-only" for="v1">Value1</label> <input type="text" class="form-control"
id="v1" placeholder="Value 1"> </div>
<div class="form-group"> <label class="sr-only" for="v2">Value2</label> <input type="text" class="form-control"
id="v2" placeholder="Value 2"> </div>
<div class="form-group"> <label class="sr-only" for="v2">Value3</label> <input type="text" class="form-control"
id="v3" placeholder="Value 3"> </div> <button type="button" class="btn btn-default"
onclick="myFunction()">Send</button>
</form>
<script> function myFunction() { var base, trigger, end, url; var value1, value2, value3; base = "https://maker.ifttt.com/trigger/"; end = "/with/key/<insert-maker-key>"; trigger = "webform"; value2 = ""; value3 = ""; value1 = "?value1=" + document.getElementById("v1").value; value2 = "&value2=" + document.getElementById("v2").value; value3 = "&value3=" + document.getElementById("v3").value; url = base + trigger + end + value1 + value2 + value3; window.open(url, "_self"); }</script>
</body>
</html>
2 Comments
Louis · 24 May, 2017 at 13:38
This is awesome! Spent three days looking for this… THANK YOU!
How would I include target=”_blank” to open the confirmation in a new window?
And how do I turn value3 into a and not break the script?
I’ve tried with the following:
Send
function myFunction() {
var base,trigger,end,url;
var value1,value2,value3;
base=”https://maker.ifttt.com/trigger/”;
end=”/with/key/oHtBjSZrTpphQEO6ikEmuCYr8uvcKLzHCCOyig*****”;
trigger=”ExpressionsContactForm”;
value2=””;
value3=””;
value1 = “?value1=” + document.getElementById(“v1”).value;
value2 = “&value2=” + document.getElementById(“v2”).value;
value3 = “&value3=” + document.getElementById(“v3″).value;
url = base + trigger + end + value1 + value2 + value3;
window.open(url,”_self”);
}
Jorge · 5 August, 2018 at 13:33
Hey Louis,
It’s been so long since I don’t check the blog, hope you could have solved it by yourself.
Best regards.
Comments are closed.