Skip to main content

Get Channel Messages

danger

This action has been deprecated and will no longer be available in new workflows.

Returns a descending (from newest to oldest) list of messages by channel name (channel ID works as well but is not the recommended method).

note

This action is only available when using Bot for Slack connection method. For more details, refer to Using Bot for Slack.

If the channel is private, the Blink application must be added to the channel to retrieve messages from it.

Parameters

ParameterDescription
ChannelChannel name (or ID) to fetch history for.
EndEnd of time range of messages to include in results (exclusive).
LimitThe maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.
Return All PagesAutomatically fetch all resources, page by page.
StartStart of time range of messages to include in results (exclusive).

Example Output

{
"ok": true,
"latest": "1668527820.000000",
"oldest": "1668527520.000000",
"messages": [
{
"type": "message",
"text": "",
"files": [
{
"id": "F04AUC29XRC",
"created": 1668527744,
"timestamp": 1668527744,
"name": "Example file.txt",
"title": "Example file",
"mimetype": "text/plain",
"filetype": "text",
"pretty_type": "Plain Text",
"user": "U02P2RBCW6R",
"user_team": "T01NVABR4UW",
"editable": true,
"size": 8,
"mode": "snippet",
"is_external": false,
"external_type": "",
"is_public": true,
"public_url_shared": false,
"display_as_bot": false,
"username": "",
"url_private": "https://files.slack.com/files-pri/T01NVABR4UW-F04AUC29XRC/example_file.txt",
"url_private_download": "https://files.slack.com/files-pri/T01NVABR4UW-F04AUC29XRC/download/example_file.txt",
"permalink": "https://blinkopsworkspace.slack.com/files/U02P2RBCW6R/F04AUC29XRC/example_file.txt",
"permalink_public": "https://slack-files.com/T01NVABR4UW-F04AUC29XRC-6f39723b19",
"edit_link": "https://blinkopsworkspace.slack.com/files/U02P2RBCW6R/F04AUC29XRC/example_file.txt/edit",
"preview": "ddsbdgnf",
"preview_highlight": "<div class=\"CodeMirror cm-s-default CodeMirrorServer\" oncopy=\"if(event.clipboardData){event.clipboardData.setData('text/plain',window.getSelection().toString().replace(/\\u200b/g,''));event.preventDefault();event.stopPropagation();}\">\n<div class=\"CodeMirror-code\">\n<div><pre>ddsbdgnf</pre></div>\n</div>\n</div>\n",
"lines": 1,
"lines_more": 0,
"preview_is_truncated": false,
"is_starred": false,
"has_rich_preview": false,
"file_access": "visible"
}
],
"upload": true,
"user": "U02P2RBCW6R",
"display_as_bot": false,
"ts": "1668527744.922359"
},
{
"type": "message",
"text": "",
"files": [
{
"id": "F04AUC1T50W",
"created": 1668527741,
"timestamp": 1668527741,
"name": "Example file.txt",
"title": "Example file",
"mimetype": "text/plain",
"filetype": "text",
"pretty_type": "Plain Text",
"user": "U02P2RBCW6R",
"user_team": "T01NVABR4UW",
"editable": true,
"size": 8,
"mode": "snippet",
"is_external": false,
"external_type": "",
"is_public": true,
"public_url_shared": false,
"display_as_bot": false,
"username": "",
"url_private": "https://files.slack.com/files-pri/T01NVABR4UW-F04AUC1T50W/example_file.txt",
"url_private_download": "https://files.slack.com/files-pri/T01NVABR4UW-F04AUC1T50W/download/example_file.txt",
"permalink": "https://blinkopsworkspace.slack.com/files/U02P2RBCW6R/F04AUC1T50W/example_file.txt",
"permalink_public": "https://slack-files.com/T01NVABR4UW-F04AUC1T50W-7a7289fd7d",
"edit_link": "https://blinkopsworkspace.slack.com/files/U02P2RBCW6R/F04AUC1T50W/example_file.txt/edit",
"preview": "ddsbdgnf",
"preview_highlight": "<div class=\"CodeMirror cm-s-default CodeMirrorServer\" oncopy=\"if(event.clipboardData){event.clipboardData.setData('text/plain',window.getSelection().toString().replace(/\\u200b/g,''));event.preventDefault();event.stopPropagation();}\">\n<div class=\"CodeMirror-code\">\n<div><pre>ddsbdgnf</pre></div>\n</div>\n</div>\n",
"lines": 1,
"lines_more": 0,
"preview_is_truncated": false,
"is_starred": false,
"has_rich_preview": false,
"file_access": "visible"
}
],
"upload": true,
"user": "U02P2RBCW6R",
"display_as_bot": false,
"ts": "1668527741.450179"
}
],
"has_more": false,
"pin_count": 0,
"channel_actions_ts": null,
"channel_actions_count": 0
}

Workflow Library Example

Get Channel Messages with Slack and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop