Skip to content

Instantly share code, notes, and snippets.

@axel-sirota
Created June 28, 2023 18:58
Show Gist options
  • Save axel-sirota/132b62b02c514e863332a29372ab077c to your computer and use it in GitHub Desktop.
Save axel-sirota/132b62b02c514e863332a29372ab077c to your computer and use it in GitHub Desktop.
Mulesoft Author Talk

Login: ps_navy Pass: RD!jrLP9zg

  1. Show around anypoint , explain

  2. Go and create SQS (explain what it is, save the following attributes: )

Queue URL:
Queue: ARN:
AWS Client Key: AWS Secret Key:

  1. 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

  1. Go to Permissions. Set it to chat:write both. Now we need a redirect URL. Set it to https://localhost:8082/callback
  2. Go to the App and install it to the workspace. Add the App to the channel general
  3. 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

  1. 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.

  1. 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.

  1. Deploy and do the auth dance by hitting in the browser https://ocalhost:8082/authorize
  2. Accept that the Slack app can write
  3. Now post a messae to your SQS queue and see the magic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment