Get Messages from the Heap CRM WebHook (and HeapCL)

You can now retrieve messages using the Heap CRM webhook. If I set the variable (JSON, POST or GET) “list” to “messages John Doe” I will get a JSON payload containing messages associated to the prospect John Doe.

Sense HeapCL is just a client to the WebHook, you can now retrieve this information directly from the terminal. If I type:

./heapCL --list "messages John Doe" --save "messages.csv"

I'll get a CSV containing messages associated to John Doe. If I type:

./heapCL --list "messages John Doe" --save "messages.txt"

I'll get a plain text file containing each message.

HeapCL has been updated, so all users should download the latest version.

HeapCL >

5 Responses to “Get Messages from the Heap CRM WebHook (and HeapCL)”

  1. Paul Says:

    Code examples please?

  2. Paul Says:

    Ben to be clear I would like to see example of pulling John Doe data and displaying info on the website or better yet doing this with opportunity

  3. Ben Says:

    Hi Paul -

    Using CL is as easy as it appears above. Also the CL doc here has been updated to reflect this information:

    As for a JSON example, the WebHook doc has been updated (near bottom):

  4. Paul Says:

    Ben - can you provide simple PHP code to demonstrate above?

  5. Ben Says:

    Hi Paul -

    PHP already has built in methods to convert JSON into arrays and back again. Assuming you know how to send data over the internat (if you don't look here:, you just need to look at two commands:


    So if you wanted to request the messages for John Doe you would do something like:

    $myarray = array();
    $myarray['list'] = "messages John Doe";

    Other values you might want to set, please look at webhooks docs

    $payload = json_encode($myarray);

    Send the payload to the webhook and save the response to resultpayload

    $resultarray = json_decode($resultpayload,true);


    Loop over the array, print part of it, whatever.


Leave a Reply