Expand my Community achievements bar.

SOLVED

Request URL to consume slack events

Avatar

Community Advisor and Adobe Champion

Hello there

I'm testing a use case where I could post some message on slack using adobe I/o headless app. 

I'm wondering what feature to use and how to set it up? to consume the events from slack 

 

"from slack help" 

Your app can subscribe to be notified of events in Slack (for example, when a user adds a reaction or creates a file) at a URL you choose 

I need to enter a requestURL in slack config, how do I generate this url within adobe I/o? 

any pointers would be great. 

 

anil 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

@Anil_Umachigi - do you work with your app using AIO CLI? If not, our recommendation is to go with it, and this documentation portal would be useful to get started: https://www.adobe.io/apis/experienceplatform/project-firefly/docs.html.

Specifically, what you need as a request URL for slack is a web action in I/O Runtime. More details at: https://github.com/AdobeDocs/adobeio-runtime/blob/master/guides/creating_actions.md#invoking-web-act....

From the action, you can make calls to any URL (such as slack post message) using HTTP client libraries such as node-fetch.

View solution in original post

6 Replies

Avatar

Community Advisor and Adobe Champion

Quick update, I was able to create the webhook (although would be great to get some pointers to documentation)

I can now find it under same runtime "namespace" under default package.

The headless app is under the same runtime, wondering how will the actions within the headless app use the incoming events to trigger the script (to post back on slack channel) 

Avatar

Correct answer by
Employee

@Anil_Umachigi - do you work with your app using AIO CLI? If not, our recommendation is to go with it, and this documentation portal would be useful to get started: https://www.adobe.io/apis/experienceplatform/project-firefly/docs.html.

Specifically, what you need as a request URL for slack is a web action in I/O Runtime. More details at: https://github.com/AdobeDocs/adobeio-runtime/blob/master/guides/creating_actions.md#invoking-web-act....

From the action, you can make calls to any URL (such as slack post message) using HTTP client libraries such as node-fetch.

Avatar

Community Advisor and Adobe Champion
Thank you @duypnguyen, yes I was able to use the CLI and create the web action in I/o runtime. That worked all fine. from the CLI I can post using curl and view the response. Wondering how are the events from slack consumed? do they show up in param arguments to then read and work upon further? Please bear with as I'm just getting started with this Thank you gain for all the YouTube videos and help articles.

Avatar

Employee
@Anil_Umachigi - great to hear that you found the articles and videos helpful! About slack events, once you configure the webhook URL as the web action URL from Runtime, slack would automatically send events to your action (invoking it). Each time results in an activation in Runtime. You can get the event payload from `params` in the action code.

Avatar

Community Advisor and Adobe Champion
@duypnguyen, thank you for all the help! I was able to get this going. This was my first time using the CLI. I was able to get up and running easily with headless and heedful apps using the aio generators. The CLI was a bit tricky but got a hang of it now. Looking forward to build some business friendly apps! Cheers Anil

Avatar

Employee
@Anil_Umachigi, It's great that you are now unblocked! Please let us know if you have further questions.