Forum Discussion

AshleyHarris's avatar
AshleyHarris
Qrew Trainee
5 years ago

Pipelines Slack Channel

I have created a Pipeline between QB and Slack, so that when a Record is Created in QB a message is sent to a Channel in Slack. How do I include a link to the QB Record in the Slack message?

------------------------------
Ashley Harris
------------------------------

5 Replies

  • I don't know much about slack, but assuming that it can accept a hyperlink, then you can make a Formula Rich text field with this syntax.

    var text Words = "the words the user would click on";
    var text URL = URLRoot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#];

    "<a href=" & $URL & ">" & $Words & "</a>"


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • AdamParker2's avatar
      AdamParker2
      Qrew Member

      Not sure how this worked for you, but Slack did not recognize this formatting for me and spit out the full text, "<ahref" stuff and all. 
      If you are comfortable with a clickable full link URL being displayed, try this: 

      1. Make a Formula URL field called [Link to Record for Slack] (or something like that)

      2. Make the value: 
      URLRoot() & "db/" & Dbid() & "?a=dr" &
      "&rid=" & [Record ID#]  

      3. Add this field [Link to Record for Slack] to your pipeline delivery. 

      My results came out like you see below. 
      The URL was clickable, because of Slack's URL handling in chats. 

      -------------------------------------------------

      James has created a new job!
      Client: Nike
      Job Code: NIK_0720_152
      Estimated Start Date: 2020-07-22 00:00:00+00:00
      ----------------------
      Link: https://xxxxxx.quickbase.com/db/xxxxxx?a=dr&rid=123

      This bold items are fields mapped from the pipeline. 

      NOW if anyone knows how to get ride of those timestamp zeroes, I'd love to hear it. The field they are pulling from is Date (not time) field, so I think it's Slack. 




      ------------------------------
      Adam Parker
      ------------------------------
      • KeithJusas's avatar
        KeithJusas
        Qrew Captain
        Adam,
        one simple way may be to create a formula text field and convert your date field to text and use the text field in the pipeline.

        Also if you use the "Title" property in the pipeline you can mask the link so instead of seeing https://xxxxxx.quickbase.com/db/xxxxxx?a=dr&rid=123 in your Slack message you can have something like Click to view Job

        ------------------------------
        Keith Jusas
        CEO
        Juiced Technologies, Inc.
        Ronkonkoma NY
        6316175060
        ------------------------------
  • You actually don't need to use pipelines for this.  You can use the Webhooks features in QB to send a webhook directly to slack.   

    Assuming you already set up an endpoint in slack,  then you just set up a webhook in the table you are triggering from,  configure the message as a JSON and it will send the message directly to slack instantly.  

    This method will resolve any formatting issues,  as it will just pass along the raw value (so long as you format your JSON correctly).

    Example:





    ------------------------------
    Jeff Peterson
    ------------------------------