No internet connection
  1. Home
  2. Ideas

Allow "bot"/app posts on pages for linking to other services

By Christian Scheuer @chrscheuer
    2021-08-06 08:18:42.586Z2021-08-06 08:30:56.111Z

    We're moving from ClickUp as the backend for managing bugs, roadmap items etc. to Linear.app.

    Just take a look at this beautiful UI to see why:

    One of the big benefits of Linear is that it can integrate directly into Intercom, our support system, and link a customer conversation with a developer work item. So when we "close" the task in Linear because we've completed the feature or fixed the bug, the intercom conversation(s) automatically gets opened, which allows us to notify the users who were interested.

    For the Ty forum, we'd love to be able to also create "links" between a forum page and such external services. In the simplest way, we would just need an API that allows us to post a comment (post) in a page, on behalf of a user. We could then just create a "bot" user to be the user we're identifying – or, it could be done based on the admin that made the change (but that could create havoc for notifications).
    It could also be that "bot messages / external links" were something like this, ie. not comments but more like timestamped activity messages:

    Here's how it looks in Linear that I have "attached" an external link - here it's the "Message from Gabriel Lundh" that shows I've attached an Intercom conversation with the task.

    It would be awesome if Ty, could either:

    • Create an API where we can add posts to a page identifying as a user (this is very flexible)
    • or, have a way to add "activity" messages to a page

    Both would be used for saying things like:

    • "This issue is now tracked in our bug reporting system as SF-345"
    • "This issue has now been marked as resolved in our bug reporting system"

    If it was made more like the backlinks feature where you could have an "attachment" link, perhaps such links could also be made private.
    If we have a public facing issue page, we wouldn't necessarily want a public post on that issue page to refer to the link directly to our Linear.app tracking item – so maybe in the future, attachments could be hidden and only seen by some users (not sure how that could be implemented, and sounds a bit complex).


    To sum it up - we would love to have the ability to post posts on pages identifying as a user through the API :)
    I think such an API would leverage many more types of workflows than just the one mentioned here.

    • 10 replies
    1. C
      Christian Scheuer @chrscheuer
        2021-08-06 08:44:57.831Z

        In my mind, the general purpose "have an API to add posts to a page impersonating a user" seems to be the most straight forward and most usable feature of the ones mentioned above.

        1. CChristian Scheuer @chrscheuer
            2021-08-06 08:51:46.075Z

            See the "Tracked as SF-56" progress note below. That's pretty much what I would just love to be able to create. Even more ideally, such progress notes could be marked as non-repliable so they don't start threads.

            Now I can keep track of what dependencies our own features have on TY features in Linear:

            1. CChristian Scheuer @chrscheuer
                2021-08-06 08:53:29.165Z

                Once Webhooks come, we could allow bidirectional updating, so that when you make a comment on the TY page, we could update our Linear task with a comment that the forum thread had been updated, etc.
                We can already integrate into webhooks in Linear so that we could make the bot posts on TY from changes in Linear, but going both ways would make this realllllly good :)

            2. In reply tochrscheuer:

              I like this idea — I think some of this can be done already, via the current APi.

              I'll have a look, an reply in more detail, after a new release with (most of) the idea-tracker features.

              1. In reply tochrscheuer:

                These requests will be made from a backend service, which has an API secret, right? (But not directly from an end user's Electron app or browser, which wouldn't have any API secret)

                we would just need an API that allows us to post a comment (post) in a page, on behalf of a user

                I can add this, to the Do API — so the initial version will support Like voting a post, subscribing to notifications, and also posting replies & status updates.

                have an API to add posts to a page impersonating a user ... progress notes could be marked as non-repliable so they don't start threads

                Ok

                I'm thinking you could POST to the upcoming Do API, with an API secret, and JSON like:

                POST /-/v0/do  {
                  doActions: [{
                    asWho: 'ssoid:a-soundflow-user-id',  <—— any user, or just 'sysbot'
                    doWhat: 'CreateMetaPost',          <—— others can't reply (by default)
                    doHow: {
                      text: 'Tracked as <b><a href="....">SF-55</a></b>' ,
                      textFormat: 'CommonMark',
                      appendTo: { pageId: '1234' },
                  }, {
                    asWho: 'ssoid:someone',
                    doWhat: 'CreateReplyPost',   <—— others can reply to Reply Posts
                    doHow: {
                      text: "...",
                      textFormat: 'CommonMark',
                      replyTo: { pageId: _, postNr: _ },
                  }]
                }
                
                1. CChristian Scheuer @chrscheuer
                    2021-08-27 20:28:49.076Z

                    These requests will be made from a backend service, which has an API secret, right? (But not directly from an end user's Electron app or browser, which wouldn't have any API secret)

                    Yes these would be made from a backend service.

                    I can add this, to the Do API — so the initial version will support Like voting a post, subscribing to notifications, and also posting replies & status updates.

                    Amazing! That could bring us really far!

                    Love the proposed API/json

                  • In reply tochrscheuer:

                    If it was made more like the backlinks feature where you could have an "attachment" link, perhaps such links could also be made private

                    Maybe something like this?

                    POST /-/v0/do  {
                      doActions: [{
                        ...
                        doWhat: 'CreateMetaPost',
                        doHow: {
                          text: 'Tracked as <b><a href="....">SF-55</a></b>' ,
                          ...
                          visibleOnlyTo: ['groupname:core_members'],
                      }, {
                    

                    This would mean that each reply, would be optionally associated with a list of groups & users, and then only members of those groups, and those specific users, could see the reply.

                    1. I suppose if the link is to an external website, then Ty cannot know who should see it — so would need to be told, via sth like visibleOnlyTo: ['groupname:core_members'] (?).

                      But if there was a new "Link" type reply, which pointed to a page in the same forum, then Ty could know who should get to see it, and not. — But your system is external so I'm thinking that then it's visibleOnlyTo: ... ? (or something similar but better, what could that be)

                      1. CChristian Scheuer @chrscheuer
                          2021-08-27 20:29:46.975Z

                          Love the CreateMetaPost suggestion. VisibleOnlyTo would be a perfect solution for what we're after :)

                      2. Progress
                        with doing this idea
                      3. C
                        Christian Scheuer @chrscheuer
                          2021-08-06 08:49:26.722Z

                          Tracked as SF-56

                          1. @KajMagnus marked this topic as Planned 2021-08-10 11:02:39.060Z.