Login: ps_navy Pass: RD!jrLP9zg
-
Show around anypoint , explain
-
Go and create SQS (explain what it is, save the following attributes: )
Queue URL:
Queue: ARN:
AWS Client Key:
AWS Secret Key:
- Go to api.slack.com and create and app from scratch. Pick Name and workspace. Save:
Client ID:
Client Secret:
Authorise URL: https://slack.com/oauth/v2/authorize
Access Token URL: https://slack.com/api/oauth.v2.access
Scope: chat:write
- Go to Permissions. Set it to chat:write both. Now we need a redirect URL. Set it to https://localhost:8082/callback
- Go to the App and install it to the workspace. Add the App to the channel general
- Enter the directory of src/main/resources off our app and create a TLS keystroke by running:
keytool -genkey -alias mule -keystore keystore.jks -keyalg RSA -storetype JKS
- Add the Slack connector, put necessary info, let’s create the HTTPS configuration.
Callback: /callback Authorize: /authorize External callback URL: https://localhost:8082/callback
On the HTTPS form set to HTTPS and port to 8082, go to TLS, put the info of the keystore generated.
- On the output of the Slack connector it expects a json of the folllowing way:
output application/json
---
{
channel:"general",
text: payload as String
}
You can replace the full payload by what you prefer.
- Deploy and do the auth dance by hitting in the browser https://ocalhost:8082/authorize
- Accept that the Slack app can write
- Now post a messae to your SQS queue and see the magic.