Zapier: Catch Hook with Hard Coded URL

Posted by agiletortoise, Last update almost 6 years ago

Example script demonstrates how to trigger a Zap at which has a “Catch Hook” trigger. Change the “hookURL” variable and “data” passed as needed.

This example will not work unless the hookURL variable at the top of the script is changed to a valid Catch Hook URL. The data variable can also be changed to pass other values to the Catch Hook if desired. By default it will send “title”, “body”, and “content” value which can be used in the Zap action.


  • script

    // Set to Webhook URL for a Zap
    // With a "Catch Hook" trigger type
    // This can be copied from dashboard
    var hookURL = "";
    // Setup data you want passed to the Zap
    // Default pass title, body and full content of draft
    // Other values could be passed
    var data = {
    	"title": draft.title,
    	"body": draft.processTemplate("[[body]]"),
    	"content": draft.content
    // create HTTP and make POST request to Catch Hook
    var http = HTTP.create();
    var response = http.request({
      "url": hookURL,
      "method": "POST",
      "data": data,
      "headers": {
        "Accept": "application/json"
    // log result
    // if not 200 OK, fail the action
    // Otherwise Zapier successfully received post
    if (response.statusCode != 200) {;


  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.