Skip to content

🌐 Slack related connectors and automation logics

License

Notifications You must be signed in to change notification settings

API-AutoFlow/Slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

Integration with slack can be used to send alerts to users and channels to notify when certain events are triggered.

API AutoFlow Version:

Configuration config.json was created using AutoFlow version 0.2.5

Need help?

Is you have questions about this example, feel free to post your question on the community "<a href=https://www.interactor.com/support/forum" target="_blank">Ask Questions" website.

Step 1. Create flow

  • Create an HTTP Server
  • Create an endpoint
    • NOTE: under properties the method must be POST
  • From the right panel, press Action tab -> communication, Drag and drop HTTP-Request to the end of the flow
  • From the right panel, press Action tab -> data, Drag and drop Set to the end of the flow

Image

Step 2. Setup Slack request body

Slack takes in HTTP request body as below

{
    "text": "Message content"
}

Use Data/Set action to create the object.

Step 3. Slack API Call

Communication/HTTP-request

Properties:

  • url: NOTE: Paste the slack webhook
  • Method: POST
  • Body: Contents of what is being posted to slack. NOTE: May need to specify the content type as application json. { “Content-Type”: “Application/JSON” }
  • Header: blank
  • Query: blank
  • Timeout: Default

Output:

  • Output-location: Drag and drop the response body from right data panel Image

Step 4. Test and Send Messages to your workspace

Using Talent API Tester:

Select Method Post and Paste your slack http server. NOTE: Yours may differ Image

or use Postman Image

In the HTTP Request Header, insert the message you want to send. For example

Hello World!

Configuring Slack api webhook

For Additional help on sending messages Slack webhooks: https://api.slack.com/messaging/webhooks

  • Navigate to api.slack.com
  • Once logged in click on Your Apps on the right end of the navigation bar
  • Select Create New App
    • Create the application name and select which workspace this app will belong too
  • Select basic information underneath the settings. Select add features and functionality. From here you can add additional functionality but for this example we just are using incoming webhooks.
  • After selecting and activating incoming webhooks. Scroll to the bottom and select add new webhook to workspace. Select which channel to post to and allow.
  • Copy JUST the URL from the sample. NOTE: Your webhook will be unique
  • Paste the slack webhook on the url line under properties from the communication/http-request action Image