Skip to content

Produce output file containing response from Slack API #98

Closed
@fenech

Description

@fenech

Hi, I'm using this resource to print messages to a Slack channel, but the messages can be very long, and I'd like to be able to post a summary as a main message, followed by the longer details in a reply thread.

To do that, I would need the ts in the response from Slack, and include it as the thread_ts parameter in the follow-up message.

I can think of a few ways to do this:

  1. roll everything into one put step, with extra parameters to specify the thread contents
  2. use a put step to post the first message, then a custom task to post the remainder
  3. use two consecutive puts, and add a parameter to specify the thread_ts

I think that #1 could introduce quite a lot of extra complexity in the resource, so I think #2 or #3 would be the preferred approach. However, in order to do that, the put step would need to produce some output that could be used in subsequent steps.

At the moment the resource outputs a timestamp which is the output of date, but perhaps this timestamp could instead be the ts from the result (if available)? Then the implicit get step after the put could be used to write some output files for use in later steps.

Happy to try and make a PR with some changes if we agree on an approach 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions