Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Request URL to consume slack events

Anil_Umachigi
Level 2
Level 2

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 

 

 

1 Accepted Solution
duypnguyen
Correct answer by
Employee
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
Anil_Umachigi
Level 2
Level 2

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) 

duypnguyen
Correct answer by
Employee
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

Anil_Umachigi
Level 2
Level 2
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.
duypnguyen
Employee
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.
Anil_Umachigi
Level 2
Level 2
@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
duypnguyen
Employee
Employee
@Anil_Umachigi, It's great that you are now unblocked! Please let us know if you have further questions.