Skip to content

Instantly share code, notes, and snippets.

@maguay
Created July 17, 2025 10:30
Show Gist options
  • Select an option

  • Save maguay/f2ad605eae462efdadb9a9f96757bece to your computer and use it in GitHub Desktop.

Select an option

Save maguay/f2ad605eae462efdadb9a9f96757bece to your computer and use it in GitHub Desktop.
# A Bash script to fetch the most recent Slack thread from a channel.
# Copy everything from line 7 on, add in your Slack token and channel ID, then run in Terminal.
# See https://buttondown.com/blog/api-powered-email-newsletter for more details.
-----
SLACK_TOKEN="your-bot-token"
CHANNEL_ID="your_channel_ID"
curl -s -H "Authorization: Bearer $SLACK_TOKEN" \
"https://slack.com/api/conversations.history?channel=$CHANNEL_ID&limit=1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment