FlowmageDocs

List messages

BetaReads dataVersion 2

Reads the recent messages of a Slack channel.

Settings

SettingWhat it is
ConnectionRequiredThe Slack connection the step signs in with.
ChannelRequiredIf your Slack app was installed from a listing rather than built in your own workspace, Slack caps this method at one call a minute and 15 messages.
From (message timestamp)Only messages after this ts. Leave empty for the most recent ones.
Until (message timestamp)text
Include the messages at those timestampstrue/false
Messages per call1 to 999.
Fetch every pageFollows Slack's page cursor, and refuses past 5,000 messages rather than answering a short list.
CursorPaste a previous run's Next cursor to read the page after it.
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `slack`)
channeltexta value from the vendor's own list
oldesttextits `{{ }}` must give a string
latesttextits `{{ }}` must give a string
inclusivetrue/false, by default false
limitnumber, by default 100
returnAlltrue/false, by default false
cursortext

Output

FieldType
messagesarray
messageCountMessages in this answernumber
hasMoreMore messages are waiting behind this pageboolean
nextCursorCursor for the next pagestring
Sample output, and the expression for each field
  • hasMorefalse
  • messageCount0
  • messages[]
  • nextCursor""

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "channel": "<channel>",
    "connection": "<connection id>",
    "cursor": "",
    "inclusive": false,
    "latest": "",
    "limit": 100,
    "oldest": "",
    "returnAll": false
  },
  "label": "List messages",
  "type": "slack.listMessages",
  "version": 2
}

Older versions

A flow that already has this version keeps running it. A new step always gets the newest.

Version 1
SettingWhat it is
ConnectionRequiredThe Slack connection the step signs in with.
ChannelRequiredIf your Slack app was installed from a listing rather than built in your own workspace, Slack caps this method at one call a minute and 15 messages.
From (message timestamp)Only messages after this ts. Leave empty for the most recent ones.
Until (message timestamp)text
Include the messages at those timestampstrue/false
Messages per call1 to 999.
Fetch every pageFollows Slack's page cursor, and refuses past 5,000 messages rather than answering a short list.
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `slack`)
channeltexta value from the vendor's own list
oldesttextits `{{ }}` must give a string
latesttextits `{{ }}` must give a string
inclusivetrue/false, by default false
limitnumber, by default 100
returnAlltrue/false, by default false