Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring Slack Conversation History into Airtable #16

Merged
merged 18 commits into from Apr 20, 2022

Conversation

marks
Copy link
Member

@marks marks commented Apr 8, 2022

This code example can be used to import messages from a Slack conversation (public or private channel, DM, or multi-party DM) into an Airtable table. You can also schedule this script to run on a recurring to keep your table in Airtable up to date with the new messages from Slack.

This code example is based on the generic airtable.js upsert example and uses airtable.js to interact with the Airtable REST API and @slack/web-api to interact with Slack's API.

  • 🗒️ Note - This example is more complicated than the generic examples as we first loop through all "parent" Slack messages to update-or-create them and then loop through all "threaded replies" so that we can properly associate them with the correct "parent" Slack message. This can be observed in index.js; look for // First, upsert all parent messages, and then upsert all threaded replies

TODO:

  • README with end-to-end instructions
  • Add support for threaded replies

@marks marks marked this pull request as ready for review April 19, 2022 22:23
Copy link

@SeanKeenan-at SeanKeenan-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just left a few nits

@marks marks merged commit c6ff360 into main Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants