Webhooks for messages/chats

Comments

18 comments

  • Andreas Haugstrup Pedersen

    Hi Carl-Fredrik,

    We are not likely to implement webhooks for conversations as it wouldn't really be a good fit. You can however use our push service to get real-time notifications about conversations (and lots of other things). The bad news is that we don't have any public documentation yet. I'll write up some docs so you can look at it. :)

    /Andreas

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    I can see that it could be very transaction heavy, I actually kind of "reverse engineered" your code a year ago for the push service in an attempt to build a desktop notifier using Adobe Air.

    I would be very interested in your documentation though! :)

    But please don't prioritize this Andreas too much, right not it's just for my own curiousity. I just setup an API user and it would be pretty cool to have it answer private messages. :)

    0
    Comment actions Permalink
  • Callserver

    You could use postmarkapp or a service like that to parse inbound emails  ;)

    0
    Comment actions Permalink
  • Jacob Flatter

    Hi Carl,

    Any chance you could share some of that code?  I am trying to use chat as a way for a user to quickly add a related item without exiting the original item entry screen for a new item (of different app).

    For example, user is in the middle of adding a Toolbox item and notices that the search for Tool (which is an app reference on Toolbox) does not return any items.  The user would like to quickly add a new Tool without exiting the current item entry.  Chat may be an easy way to solve this using really simple "Bots".

    Thanks,

    Jacob

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    Hi Jacob! Unfortunately my code didn't work in the browser because of security rules (http://en.m.wikipedia.org/wiki/Same_origin_policy) and the Faye server didn't work in Adobe Air. But I think a node js application could do this for you. If I find the time I will create a prototype.

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    Podio seems to have changed some of the methods in their API because I can't get the signature tokens for establish a notification client.

    Andreas, all I need is a method to get these signatures (for the push channels). Is that something you can give me?

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    I don't think we changed anything. What API operation are you using?

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    A year ago or so I used https://api.podio.com/device/push_subscriptions/ which I can't get to work any longer.

    Try this: curl -H "Authorization: 'OAuth2 487e87{get-your-own-access_token}'" https://api.podio.com/device/push_subscriptions/

    And you will get this:

    {"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http:\/\/api.podio.com\/device\/push_subscriptions\/","query_string":"","body":null,"method":"GET"},"error_description":"No matching operation could be found. The path '\/device\/push_subscriptions\/' was not found..","error":"not_found"}

    Notice the http, not https which is required and what I used. The method Get push subscriptions are not present any more on https://developers.podio.com/doc/mobile but at this snapshot it's there http://web.archive.org/web/20120121194737/https://developers.podio.com/doc/mobile

    So something has for a fact changed. :) Wow it's fun to play Sherlock Holmes.

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    We do move things around from time to time, I didn't know this went a year back. :)

    These days you get the signature when you get an object you can subscribe to. E.g. if you get an app item it will have a "push" property with the signature and a few other things.

    Does that help?

    All the best,

    Andreas

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    No worries! Thank you! This looks promising:

    New message from /user/1549995

    { channel: '/user/1549995',

    data:

    { event: 'conversation_event',

    ref: { type: 'user', id: 1549995 },

    data:

    { event_id: 3684663,

    created_on: '2013-07-15 21:37:14',

    settings: [Object],

    conversation_id: 1020496,

    text: 'hello',

    total_unread_count: 1,

    data: [Object],

    action: 'message',

    created_by: [Object],

    unread_count: 1 },

    created_by: { type: 'user', id: 618362 },

    created_via: 1 } }

    I will go about to build my own podio bot "hologram", it will answer some questions, and if it can't:  "I'm sorry, my responses are limited. You must ask the right questions."

    This is awesome!

    @Jacob I will clean up some code in the next few days and get back to you. Next week I start my vacation which mean I have a lot more time. :)

    Cheers!

    0
    Comment actions Permalink
  • Jacob Flatter

    @Carl,

    That combination of "I think this is going to work" and "I can't wait to spend part of my vacation on this" is AWESOME!

    Thanks for the effort, I will be patiently waiting.

    Jacob

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    @Andreas: It works great, but their seems to be a glitch in how messages are displayed. Take a look at the attachment. The response without heading is not from me, if I refresh the page "his" name is displayed correctly.

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    The response might come back so fast that the UI gets confused. Can you try having your bot sleep for 5 seconds before responding?

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    Sure, that worked great! We don't want the UI to be confused.

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    I filed a bug on our end so we'll see if we can't get the issue fixed. You can probably lower your bot's sleep time to 1 second. I just wanted to confirm that was really the issue.

    0
    Comment actions Permalink
  • Luke Abell

    Carl- any chance I could have the code you used?

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    Luke: What code are you interested in? The node js bot who can reply to messages? It's **VERY** simple with a single reply every time. But perhaps something to build upon. I tried to have it create an item if the message was in a specific format but it didn't work as expected and I haven't had the time to work on it any more.

    0
    Comment actions Permalink
  • Gustav Sverre Kampp

    I would love to have this re-assessed from the Podio team.

    The option to make Bots that can communicate with users using conversation in Podio would be beneficial - especially now that you can have the Podio Chat app installed.... Also - a conversation could be connected to other fora this way.

    The API already offer the option of writing and reading to conversations now, but a webhook is required for automating any processes.

    So Pleeeease!! Reconsider make a webhook for conversations....

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk