--- title: "Post Messages to Slack with Call External API Action Type" slug: "post-messages-to-slack-with-call-external-api-action-type-1" updated: 2026-11-23T12:31:41Z published: 2026-11-23T12:31:41Z canonical: "support.gainsight.com/post-messages-to-slack-with-call-external-api-action-type-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.gainsight.com/llms.txt > Use this file to discover all available pages before exploring further. # Post Messages to Slack with Call External API Action Type Gainsight NXT Post Messages to Slack with Call External API Action Type This article explains how to post messages to Slack from Gainsight by using the Call External API action Type in Rules Engine. Gainsight recommends you first refer to the [*Call External API article*](/SFDC_Edition/Rules_Engine/Admin_Guides/Call_External_API_Action_Type) and then proceed with this article. ## Overview This tutorial explains how to create a rule by using the Call External API Action which posts messages to Slack when a new Company record is created. The Slack message contains three fields of the newly created company record; Name, ARR, and Industry.This tutorial has three sections: 1. [Configure Custom Connector](https://drive.google.com/a/gainsight.com/open?id=1XuSh9P3eR5LdrphTSeRAhDzy-AQ8VNtVE1VXiBDnLio) 2. [Setup External Action](https://drive.google.com/a/gainsight.com/open?id=1ux0IRmkAYMcn3gChxW5FxedJxAgQlUsAoMdGqzSgUgI) 3. [Configure Call External API Action](/v1/docs/post-messages-to-slack-with-call-external-api-action-type-1#configure-call-external-api-action) ## Configure Custom Connector This section explains how to create a connection to the Slack channel to which you wish to post messages. To Create Connection to Slack: 1. Navigate to **Administration > Operations > Connectors 2.0**. 2. Click **Custom Connector**. 3. Click **Create Connection**. The **Create a Connection** window is displayed. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_1.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_1.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=hgXnXVW6z0SyhiyDXVi6WpvsTizqRyey9PYJMWds6DY%3D) 4. Enter a name for your Slack connection. 5. Select the **Authorization Type** as **None**. Slack does not require any authorization method. 6. *(Optional)* Enter a description. 7. Click **CREATE**. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_2.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_2.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=IXctm5Q5i3pEqUs%2B5hb1IiveJUkrEIJp%2FtvVnfJG1a0%3D) ## Setup External Action This section explains how to create an action for the Slack Connection created in the previous section. The action you create here can be used in Rules Engine under the **Call External API** action type. To access the External Actions page: 1. Navigate to **Administration > Operations > External Actions**. 2. Click **Create Action**. The Action creation page has five sections. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_3.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_3.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=ttRWkrxYhORb9XV3NqUzVN7EhrUE%2B3bLdaOETBWAasw%3D) ## Basic Information In this section, you can configure the following fields: 1. Select the Slack Connection created in the previous section from the **Select a Connector** drop-down menu. 2. Enter a name for the action in the **Action Name** field. 3. Enter the **POST URL** of the Slack channel to which you wish to post messages from Slack. The URL shown below is for a test Slack channel and would vary for your Channel. To learn more about creating POST URL in Slack refer to the [Sending Messages](https://api.slack.com/messaging/sending) and [*Sending Messages using Incoming Webhooks*](https://api.slack.com/messaging/webhooks) articles in Slack. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_4.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_4.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=fV5u40QZty6ftBad7tu0YHn3vEmHJbeVaHyjdqiL9j8%3D) ## Payload In this section, configure the fields in JSON format. These fields are displayed under the Setup Action page and you can load data from Dataset into these fields. Payload can be entered either in the **JSON** format or **x-www-form-urlencoded** format. In the following image, the Payload fields are added in JSON format. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_5.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_5.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=XGf4tKsYHHZtlmPcxWduMQ2RIxU%2B1xPJam%2FeNR8PT0M%3D) The API code *{"text":" A new company is created. Below are the details: \n *Company Name* :* *UndefinedNameError: reference to undefined name 'Name' (click for details)* ```plaintext Callstack:    at (gainsight_nxt/03Rules_Engine/Rules_Engine_(Bionic_Rules)/Tutorials/Post_Messages_to_Slack_with_Call_External_API_Action_Type), /content/body/div[3]/div[2]/p[4]/em/span[1], line 1, column 1 ``` *,\n *ARR*:* *UndefinedNameError: reference to undefined name 'ARR' (click for details)* ```plaintext Callstack:    at (gainsight_nxt/03Rules_Engine/Rules_Engine_(Bionic_Rules)/Tutorials/Post_Messages_to_Slack_with_Call_External_API_Action_Type), /content/body/div[3]/div[2]/p[4]/em/span[2], line 1, column 1 ``` *,\n *Industry*:* *UndefinedNameError: reference to undefined name 'Industry' (click for details)* ```plaintext Callstack:    at (gainsight_nxt/03Rules_Engine/Rules_Engine_(Bionic_Rules)/Tutorials/Post_Messages_to_Slack_with_Call_External_API_Action_Type), /content/body/div[3]/div[2]/p[4]/em/span[3], line 1, column 1 ``` *"}* creates three fields known as **Name**, **ARR**, **Industry**. These three fields are created under the Fields section. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_6.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_6.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=t4Ral%2BqAcYXiz6ezzRGJvGIavWu6TgXD0Zm0HAAQ0c4%3D) When you configure the **Call External API** action from the Rules Engine page, these three fields are displayed. You can ingest values into these fields from your Dataset and the same message is posted to Slack. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_7.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_7.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=fKpNeakA7mvozSwydvGpyUhRgQ0Hoekzf1lO2nZk12Q%3D) ## Headers Information In this section, you can configure the Key-value pairs. By default, the Content-Type: application/JSON value is present. Do not alter this value. Click + to create additional Key-value pairs. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_8.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_8.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=ir8r%2Bb80EAMwYVWtvWtUnvUZQa0dW8%2FnMedHptitvD0%3D) ## Fields In this section, configure the data type for the fields created in the payload section. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_9.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_9.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=h4%2FlxZ6LW6jO%2ByKBoczzzIO5dZwmRvYZ6fi15YFBhx8%3D) ## Advanced Configuration Information In this section, you can configure the maximum number of times the API should try to reconnect to Slack, in case a connection is not established. By default, this value is set to 3. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_10.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_10.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=etmnK6mw8uWlUqFXfCtLbaSuC40yvvtJmyJ5W3UwMzc%3D) Click **Create** to create the action. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_11.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_11.png?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=Dy%2FH4uuUfAgaIEjW5u7bCm05i9BIHpfMtxF6PelFnBc%3D) You can see that the new action is created under your connection. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_12.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_12.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=awk0B7qOkkSTWWxkq5Vls1yLwPVTDUC4oNSO77pe%2BVQ%3D) Now, Slack is the connection name (configured in first section), and Post to Slack is the Action name (configured in this section). These two fields would be used in Rules engine while configuring the Call External API action. You can test the action by using the Test option. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_13.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_13.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=CloSasL0nUReqzdATPNNSZB6Pyf4LlWCNpyfgrLQutc%3D) ## Configure Call External API Action This section explains how to leverage the Call External API action, by using the connection and action created above. To use the Call External API action Type: 1. Create a rule, and dataset, as required. 2. Navigate to the **Setup Action** screen. 3. Click **+ ACTION**. 4. Select the **Call External API** action type. 5. From the **External API** drop-down menu, select the action (Post to Slack in this example) created in the previous section. This action is present under the Connection name (Slack in this example). ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_14.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_14.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=wvoWbR0suZ7JdFy%2B5RiK8xQ7ZMdwQEIy6TkwE97De7M%3D) 6. The Name, ARR, and Industry fields are populated from the configurations performed. Map these fields with appropriate fields from your dataset. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_15.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_15.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=miPj4%2Fl1%2FLos%2FP3ZbrLUSsrUw4Hk4hsBAamMjfdb1qI%3D) 7. (Optional) You can also choose to insert custom values instead of mapping fields from the dataset. 8. Click **SAVE**. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_16.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_16.gif?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=2Q8y6pZavBItRIpkyNRTsf9WMQpJ4iFcjnvnYsuILXA%3D) 9. Execute the rule or schedule the execution of the rule. When this rule executes, the corresponding Slack channel displays the message, with the values configured in the rule. ![Post_Messages_to_Slack_with_Call_External_API_Action_Type_17.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Post_Messages_to_Slack_with_Call_External_API_Action_Type_17.png?sv=2026-02-06&spr=https&st=2026-11-24T18%3A24%3A22Z&se=2026-11-24T19%3A24%3A22Z&sr=b&sp=r&sig=Xq9hrF8zwHr2s1moUZign5Dzq4xtpU5qBCboA7GM44Q%3D)