How to post to slack any data programmatically from Gainsight (Rules Engine and JO)

  • 18 August 2020
  • 7 replies

Userlevel 6
  • Lets put your data to work!
  • 769 replies


This video shows how to post any message to Slack from Rules Engine (or JO) leveraging External Actions in Gainsight. We use 2 methods that Slack has to do this:

  1. Webhook (first half of the video)
  2. OAuth authentication (2nd half of the video)

7 replies

Userlevel 5
Badge +3

Hi @rakesh 

Super helpful Thanks for the detailed information. And recently I tried this external action and it worked well.

And I documented all the steps as well. Below is the link where we can see each and every step.


Userlevel 7
Badge +2

Useful info bumping this to the top!!

Userlevel 2


question for you, if the query returns multiple results, how will these post to slack? will each result post as it’s own slack message, or will they all post as 1 message?

i have a use-case where i want Timeline Activities of a specific type to get pushed to a Slack channel for broader collaboration and discussion. but i would like each Activity that meets the criteria to be it’s own Slack post, not grouped together.


Userlevel 5
Badge +3

Hi @smathew4 

Of course, it will process each record as a new slack message, but everything depends on your source data how you setup.

Userlevel 2


I am trying to create the JSON here, can you help me out? I am using Output Header value as the merge field from Rules Engine, but having trouble otherwise. Pasting my current JSON below. This won’t save in GS because of “Please enter valid JSON and char limit should not exceed 10,000” error

*Account:* {Account_Id_Name}\n
*Created by:* {GS_Created_By_User_ID_Name}\n
*Subject:* {Subject}\n
*Ticket:* {Ticket_Number}\n
*Experience Sentiment:* {Experience_Sentiment}\n
*Experience Complaint:* {Support_Experience_Complaint}
*Feedback Ask:* {Feedback_Ask}\n\n
*Notes:* {Notes}
"channel": "temp-test-gainsight-efl"


Userlevel 5
Badge +3

Hi @smathew4 

Below is the format of how the Payload should be created in Gainsight External Actions.

It should be 2 open({{) and 2 close(}}) parenthesis like below.

"blocks": [
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Account:* {{Account_Id_Name}}\n
*Created by:* {{GS_Created_By_User_ID_Name}}\n
*Subject:* {{Subject}}\n
*Ticket:* {{Ticket_Number}}"

Hope this helps


Userlevel 2


I actually got it to work with the below payload. What do the blocks and types parameters do?


{"text":"New Experience Feedback: \n\n *Company Name* : {{Name}},\n *Created by*: {{Created}},\n *Subject*: {{Subject}},\n *Ticket Number*: {{Ticket}},\n *Experience Sentiment*: {{Sentiment}},\n *Experience Complaint*: {{Support}} - {{Product}},\n *Feedback Ask*: {{Feedback}},\n\n *Notes*: {{Notes}}","channel": "temp-test-gainsight-efl"}