Skip to content

Releases: slackapi/java-slack-sdk

version 1.41.0

20 Aug 07:58
Compare
Choose a tag to compare

Announcements

Support for custom steps

Bolt for Java now supoports the way to build custom steps in Workflow Builder. Here is a quick example demonstrating how it works:

app.function("sample_function", (req, ctx) -> {
  app.executorService().submit(() -> {
    try {
      var userId = req.getEvent().getInputs().get("user_id").asString();
      var response = ctx.client().chatPostMessage(r -> r
        .channel(userId) // sending a DM
        .text("Hi! Thank you for submitting the request! We'll let you know once the processing completes.")
      );
      var outputs = new HashMap<String, Object>();
      outputs.put("channel_id", response.getChannel());
      outputs.put("ts", response.getTs());
      ctx.complete(outputs);
    } catch (Exception e) {
      ctx.logger.error(e.getMessage(), e);
      try {
        ctx.fail("Failed to handle 'sample_function' custom step execution (error: " + e.getMessage() + ")");
      } catch (Exception ex) {
        ctx.logger.error(e.getMessage(), e);
      }
    }
  });
  return ctx.ack();
});

The App Manifest for the custom step would be something like this:

"functions": {
    "sample_function": {
        "title": "Send a request",
        "description": "Send some request to the backend",
        "input_parameters": {
            "user_id": {
                "type": "slack#/types/user_id",
                "title": "User",
                "description": "Who to send it",
                "is_required": true,
                "hint": "Select a user in the workspace",
                "name": "user_id"
            }
        },
        "output_parameters": {
            "channel_id": {
                "type": "slack#/types/channel_id",
                "title": "DM ID",
                "description": "The DM ID",
                "is_required": true,
                "name": "channel_id"
            },
            "ts": {
                "type": "string",
                "title": "Message timestamp",
                "description": "Sent message timestamp",
                "is_required": true,
                "name": "ts"
            }
        }
    }
}

Please refer to https://api.slack.com/automation/functions/custom-bolt for more details!

Changes

  • [bolt] #1241 Add custom function support - Thanks @seratch
  • [bolt][slack-app-backend] #1351 #1343 block_suggestion response does not support description in an option - Thanks @ESteanes @seratch
  • [slack-api-client] #1346 Fix a bug where filename & title getting improperly defaulted in filesUploadV2 - Thanks @Cheos137
  • [slack-api-client] Add missing properties in web API responses - Thanks @seratch

version 1.40.3

16 Jul 23:35
Compare
Choose a tag to compare

Changes

  • [slack-api-client] #1337 Fix #1336 missing and invalid properties in rich text block elements - Thanks @seratch @Falit
  • [slack-api-client] Add new properties to Web API responses - Thanks @seratch
  • [bolt] Add missing properties in app_mention event payload - Thanks @seratch

version 1.40.2

03 Jul 01:53
Compare
Choose a tag to compare

Changes

  • [slack-api-client] #1330 Add conversations.externalInvitePermissions.set API support - Thanks @seratch
  • [slack-api-client] #1331 Add team.externalTeams.disconnect API - Thanks @seratch
  • [bolt] #1332 Add a few missing event data types - Thanks @seratch
  • [slack-api-client] Add new properties to Web API responses - Thanks @seratch

version 1.40.1

19 Jun 03:12
Compare
Choose a tag to compare

Changes

  • [slack-api-client] #1327 Add team.externalTeams.list API support - Thanks @seratch
  • [slack-api-client] Add new properties to Web API responses - Thanks @seratch

version 1.40.0

13 Jun 06:11
Compare
Choose a tag to compare

Changes

  • [slack-api-client] #1323 Add canvas APIs and users.discoverableContacts.lookup API - Thanks @filmaj @seratch
  • [all] #1319 Add deprecation warnings to Steps from Apps components - Thanks @seratch
  • [slack-api-client] Add new properties to Web API responses - Thanks @seratch
  • [documents] Mark "Steps from Apps" as deprecated - Thanks @seratch

version 1.39.3

27 May 05:57
Compare
Choose a tag to compare

Changes

  • [slack-api-client] #1316 Fix #1314 files.upload v2 method does not upload multiple files with full metadata - Thanks @oppokui @seratch

version 1.39.2

14 May 07:06
Compare
Choose a tag to compare

Changes

  • [slack-api-client] #1312 Fix #1311 entity.message is missing in Audit Logs API response - Thanks @seratch

version 1.39.1

10 May 02:49
Compare
Choose a tag to compare

Changes

  • [slack-api-client] #1298 Mark files.upload / rtm.connect as deprecated - Thanks @seratch
  • [slack-api-client] #1310 Fix #1308 repsonse_metadata is missing in admin.initeRequests.list/*.list response classes - Thanks @Dunkhell @seratch
  • [slack-api-client] Add new properties to Web API responses - Thanks @seratch

Test improvements:


version 1.39.0

29 Mar 02:40
Compare
Choose a tag to compare

Changes

  • [slack-api-client] Add support for micronaut 4 - Thanks @hrothwell
  • [slack-api-client] Many property addition to Web API response types - Thanks @seratch

version 1.38.3

14 Mar 02:26
Compare
Choose a tag to compare

Changes

  • [slack-api-client] Add new properties to Web API responses - Thanks @seratch