• Resolved Matt Cromwell

    (@webdevmattcrom)


    I really love the idea of this plugin, but I can’t seem to get a simple webhook to be sent successfully to Slack (I know you have an addon for Slack, but the webhooks in Slack are dead simple).

    Here’s my configuration:

    View post on imgur.com


    I’ve tested this webhook in Postman and it’s worked perfectly every time. See here:

    View post on imgur.com


    I’ve tested triggering it with “Post Added” or “post Published”. I’ve tried with CPTs as well. I’ve tried changing the “key” to “body” or “payload” or “text”.

    The simplest example Slack provides is simply this:
    payload={"text": "This is a line of text in a channel.\nAnd this is another line of text."}

    Any insight you can provide would be helpful. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Matt Cromwell

    (@webdevmattcrom)

    I think this might be my issue here:
    https://github.com/BracketSpace/Notification/issues/129

    Digging into that a bit now.

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Hi Matt, this is exactly the problem πŸ™

    We are going to release a new version this or the next week but unfortunately we hadn’t a chance to deal with the JSON in webhook. The freetype JSON input is indeed planned but no ETA.

    I’ll take a look into this today and see if the new resolved API helps to fix this. Maybe there will be a way to easily escape the { and } characters.

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Matt, good news, I managed to allow to escape the merge tags and make them unresolvable, which means you can now pass JSON in webhook field.

    It should look like this: http://brkts.com/qdG9A1 (please note it’s *not* encoded as a JSON anymore)

    If you want to give it a try here’s a development version of the plugin.

    • This reply was modified 6 years, 11 months ago by Kuba Mikita.
    • This reply was modified 6 years, 11 months ago by Kuba Mikita. Reason: working download link
    Thread Starter Matt Cromwell

    (@webdevmattcrom)

    Dev version is doing all kinds of strange things. AFter I saved the new notification, it loads the CPT in Gutenberg.

    See here:

    View post on imgur.com


    Plugin Author Kuba Mikita

    (@kubitomakita)

    Oh wow! Is this a standard WP instance?

    Thread Starter Matt Cromwell

    (@webdevmattcrom)

    Yes. WP 5.1.4 with only a couple other plugins installed. The current live version of Notifications works just fine, but the dev version you provided above is what triggered that problem.

    Here’s a screencast of it:
    http://somup.com/cqh6Fdnz5o

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Grrr, I introduced this bug when I did the last update πŸ™ sorry for that and thank you a ton for the video! It immediately showed me where the error sits.

    I’ll update the plugin tomorrow (bed time here πŸ™‚ ) and update the dev package. Will let you know

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Ok, not it should be good. You can download the dev version from the same place.

    Thread Starter Matt Cromwell

    (@webdevmattcrom)

    Latest ZIP resolved the Gutenberg issue; but I’m back to not getting any webhooks to be triggered. Neither CPT nor standard Posts. Also enabled Debugging and nothing shows up there at all (with WP_DEBUG, and WP_DEBUG_LOG both set to true).

    I pinged you in WP Slack if that’s quicker/easier.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Simple Slack webhook’ is closed to new replies.