Skip to content

Instantly share code, notes, and snippets.

@brunohq
Last active May 16, 2019 14:50
Show Gist options
  • Save brunohq/52d73063540ffbf79a50d71601467870 to your computer and use it in GitHub Desktop.
Save brunohq/52d73063540ffbf79a50d71601467870 to your computer and use it in GitHub Desktop.
Bookmarklet to trigger a Zapier Webhook from any web age. The title and url of the current webpage go as parameters.
javascript:(function()
{
var iframe = document.createElement('iframe');
iframe.name = 'response';
iframe.style.visibility = 'hidden';
document.body.appendChild(iframe);
var form = document.createElement('form');
form.style.visibility = 'hidden';
form.method = 'post';
form.action = '<your_zapier_webhook_url>';
form.target = 'response';
input_url = document.createElement('input');
input_url.name = 'url';
input_url.value = window.location.href;
form.appendChild(input_url);
input_title = document.createElement('input');
input_title.name = 'title';
input_title.value = document.title;
form.appendChild(input_title);
document.body.appendChild(form);
form.submit();}
)();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment