Skip to main content
rakesh
Gainsight Employee ⭐️
Lets put your data to work!
August 18, 2020

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

  • August 18, 2020
  • 16 replies
  • 1054 views

 

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)

16 replies

phani_kumar
Gainsight Employee ⭐️⭐️
September 8, 2020

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.

Thanks.

sai_ram
Expert ⭐️⭐️
November 6, 2020

Useful info bumping this to the top!!

smathew4
Contributor ⭐️⭐️⭐️⭐️
May 25, 2021

@phani_kumar 

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.

thanks!

phani_kumar
Gainsight Employee ⭐️⭐️
May 25, 2021

Hi @smathew4 

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

smathew4
Contributor ⭐️⭐️⭐️⭐️
June 16, 2021

@phani_kumar 

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

{
"text":
*<https://kcura.lightning.force.com/{!recordId.Id}|{!fNumber}>*
*Account:* {Account_Id_Name}
*Created by:* {GS_Created_By_User_ID_Name}
*Subject:* {Subject}
*Ticket:* {Ticket_Number}
*Experience Sentiment:* {Experience_Sentiment}
*Experience Complaint:* {Support_Experience_Complaint}
{Product_Experience_Complaint}
*Feedback Ask:* {Feedback_Ask}
*Notes:* {Notes}
"channel": "temp-test-gainsight-efl"
}

 

phani_kumar
Gainsight Employee ⭐️⭐️
June 17, 2021

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}}
*Created by:* {{GS_Created_By_User_ID_Name}}
*Subject:* {{Subject}}
*Ticket:* {{Ticket_Number}}"
}
}
]
}



Hope this helps

Thanks

smathew4
Contributor ⭐️⭐️⭐️⭐️
June 17, 2021

@phani_kumar 

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

 

{"text":"New Experience Feedback: 

 *Company Name* : {{Name}},
 *Created by*: {{Created}},
 *Subject*: {{Subject}},
 *Ticket Number*: {{Ticket}},
 *Experience Sentiment*: {{Sentiment}},
 *Experience Complaint*: {{Support}} - {{Product}},
 *Feedback Ask*: {{Feedback}},

 *Notes*: {{Notes}}","channel": "temp-test-gainsight-efl"}

 

Contributor ⭐️⭐️⭐️
May 5, 2023

Is there a similar video for this now that Connectors 2.0 has replaced External Actions?

achandak
Helper ⭐️
May 8, 2023

@billrlarseniii 

There’s no connector method available which directly post messages to Slack channels. The steps shared in the Video are still good.

Contributor ⭐️⭐️⭐️
May 8, 2023

I don’t seem to have this option available to me. The only thing on the External Actions page for me is a link to Connectors 2.0.