Slack to Google Sheets: Log Channel Messages Free (Apps Script)
Slack to Google Sheets, free: log new channel messages with a Slack app and an Apps Script web app. Covers the free-plan and quota limits to know.
Yes. A Slack app can send each new channel message to a Google Apps Script web app, and the script adds one row per message to a Google Sheet. The setup costs nothing on Slack's free plan, as long as the workspace stays within the plan's limit of 10 third-party or custom app installations.
Quick answer: Create a Slack app that subscribes to channel messages, then point it at an Apps Script web app that writes each message to a sheet. Free? Yes, on Slack's free plan. Last checked: 26 October 2026.
What do you need before you start?
- A Slack workspace where you can install an app. The free plan allows up to 10 third-party or custom app installations, so count the apps you already have.
- A Google account. Apps Script quotas differ for consumer accounts (such as gmail.com) and Google Workspace accounts. The limits table below shows both.
- A Google Sheet with a tab named
Slack Log. Put these headers in row 1: Time, Channel, User, Message, Event ID. - Channel access. Slack sends events only for channels the app can see, so you add the app to each channel you want logged.
How do you log Slack channel messages to Google Sheets? (Method 1: Events API and Apps Script)
Slack's Events API delivers events either through Socket Mode or to a public HTTP endpoint that your app listens on. This method uses the HTTP option, and the Apps Script web app is that endpoint. Google says a script can be published as a web app if it has a doGet or doPost function that returns an HtmlOutput or TextOutput object (Google's web app guide).
- Open your Google Sheet and type the five headers from the list above into row 1.
- Open the sheet's script editor through Extensions > Apps Script. Delete the sample code and paste the script below.
- Replace
PASTE_YOUR_SHEET_ID_HEREwith your sheet's ID. It is the text between/d/and/editin the sheet's URL. - Click Deploy > New deployment, choose Web app, set Execute as to Me, and set Who has access to Anyone, even anonymous. Deploy, then copy the web app URL.
- Go to the Slack developer dashboard and create a new Slack app.
- Turn on Event Subscriptions and paste the web app URL into the Request URL field. Slack sends a verification request, and the script answers it.
- Subscribe to the
message.channelsbot event and add the OAuth scope that event needs. Install the app to your workspace. - Invite the app to each channel you want logged.
- Post a test message in a logged channel. A new row should appear with the time, channel ID, user ID, message text and event ID.
Verify this step (step 4): the menu and dialog names may differ. Also confirm in Google's
doPostreference thate.postData.contentsholds the raw request body.Verify this step (step 7): the menu may differ. Confirm the scope name for
message.channelson the Events API page.
const SHEET_ID = 'PASTE_YOUR_SHEET_ID_HERE';
const SHEET_NAME = 'Slack Log';
function doPost(e) {
const body = JSON.parse(e.postData.contents);
// Slack's Request URL check: echo the challenge back.
if (body.type === 'url_verification') {
return ContentService.createTextOutput(body.challenge);
}
// Keep plain channel messages. Skip bot posts, edits and joins.
const event = body.event || {};
if (event.type !== 'message' || event.subtype || event.bot_id) {
return ContentService.createTextOutput('ignored');
}
const sheet = SpreadsheetApp.openById(SHEET_ID).getSheetByName(SHEET_NAME);
// Skip an event ID that is already logged, so a repeat delivery adds no row.
const ids = sheet
.getRange(2, 5, Math.max(sheet.getLastRow() - 1, 1), 1)
.getValues()
.flat();
if (ids.includes(body.event_id)) {
return ContentService.createTextOutput('duplicate');
}
sheet.appendRow([
new Date(Number(event.ts.split('.')[0]) * 1000),
event.channel,
event.user,
event.text,
body.event_id,
]);
return ContentService.createTextOutput('ok');
}
The script logs Slack's channel and user IDs, not names. The Slack free plan keeps 90 days of history, so the sheet becomes your record from the day the script starts.
Which Slack and Google limits affect this setup?
Slack's free plan limits how much history you can see and how many apps you can install. Google's quotas cap daily use of Apps Script. Google's quotas page was last updated on 3 September 2026.
| Google Apps Script limit | Consumer account | Google Workspace account |
|---|---|---|
| URL Fetch calls per day (quotas page) | 20,000 | 100,000 |
| Total trigger runtime per day (quotas page) | 90 minutes | 6 hours |
Quotas are per user and reset 24 hours after the first request. Google states that all quotas are subject to change at any time without notice. This script makes no UrlFetchApp calls and uses no time-based trigger, so those rows do not apply to it as written. They apply once you add an outside API call or a scheduled job.
| Slack free plan item (Slack) | Limit |
|---|---|
| Message and file history | The most recent 90 days |
| Data older than one year | Permanently deleted |
| Third-party or custom app installations | 10 |
Slack's own page states that all data in a free workspace older than one year will be deleted. Rows logged from setup onward stay in your sheet after Slack stops showing the original messages.
What's free and what costs money?
| Part of the setup | Free? | Limit to know | Last checked |
|---|---|---|---|
| Slack custom app on the free plan | Yes | 10 third-party or custom app installations; 90 days of message history | 26 October 2026 |
| Apps Script on a consumer Google account | Yes, within quotas | 20,000 URL Fetch calls and 90 minutes of trigger runtime per day | Quotas page, 3 September 2026 |
| Apps Script on a Google Workspace account | Needs a Google Workspace account | 100,000 URL Fetch calls and 6 hours of trigger runtime per day | Quotas page, 3 September 2026 |
Paid Slack plans are outside the free-plan limits above. Check Slack's pricing page for current prices, because this guide does not quote them.
What can go wrong, and how do you fix it?
- Slack says the Request URL could not be verified. Check that you pasted the web app URL from the deployment dialog, not the script editor URL, and that access is set to Anyone, even anonymous.
- Rows appear twice. The script skips any event ID already in column E. If duplicates remain, check that column E still holds the Event ID values and that no one has renamed or moved the column.
- Messages from one channel are missing. The app is not added to that channel. Invite it, then post a new test message. Messages sent before setup are not recovered by this script.
- The script stops with a quota error. Google says a script can throw an exception and stop when a quota is exceeded. Check the executions log, reduce the work done per message, or move to a Google Workspace account, which has higher limits.
- The script cannot find the sheet tab. The tab name must match
SHEET_NAMEexactly. Rename the tab toSlack Log, or changeSHEET_NAMEto match your tab. - You cannot install the app on the free plan. You have reached the limit of 10 third-party or custom app installations. Remove an app you no longer use, then install this one.
Is this allowed?
- Your sheet holds message text. The setup reads only channels where you add the app and stores the text in your sheet. Share the sheet only with people who should see those messages.
- Anyone with the URL can post to it. The deployment allows anonymous access, so treat the URL as a secret. Before you rely on this beyond a test, add a check that rejects requests not from Slack. The script above does not include one.
- Apps Script projects can act like OAuth apps. According to Synk.to, a script that reads Gmail or Drive is functionally an OAuth app, and it does not appear in a typical connected-apps list. Tell your IT team before you deploy one at work.
- Check Slack's developer terms before you share the app outside your own workspace.
Which setup should you choose?
| Setup | Cost | Limit that matters most | Best for |
|---|---|---|---|
| Apps Script web app on a consumer Google account | Free on Slack's free plan | 10 app installations and 90 days of Slack history; 20,000 URL Fetch calls and 90 minutes of trigger runtime if you add API or scheduled steps | One or two channels, or a personal or small-team log |
| Apps Script web app on a Google Workspace account | Needs a Google Workspace account | 100,000 URL Fetch calls and 6 hours of trigger runtime per day, if you add API or scheduled steps | Busy channels or company-wide logs |
| Google Sheets to Slack, the reverse direction | See the guide | See the guide | Posting sheet rows to Slack, covered in How to Send Slack Messages From Google Sheets |
If you want to send alerts from a sheet to a phone instead, the WhatsApp method is a separate setup with its own limits.
What's still unclear?
- Busy channels. This guide does not measure message volume. Run the setup on one channel for a day, then compare the sheet's row count with the channel's message count.
- Large sheets. The duplicate check reads the whole Event ID column on every message, so it slows as the sheet grows. For a long-running log, move older rows to a monthly tab or keep the seen IDs in a separate tab.
- The weakest point. The endpoint accepts any request that reaches it, as described in the section on rules above. The fix is a signature check, which this guide does not include.
- Quotas can change. Google states that quotas can change at any time without notice, so recheck the quotas page before you rely on a limit.
Frequently asked questions
Is logging Slack messages to Google Sheets free?
Yes, for a typical setup. The method runs on Slack's free plan, which allows up to 10 third-party or custom app installations, and on a consumer Google account, which has Apps Script daily quotas. Slack's free plan keeps only 90 days of message history, so the sheet keeps a copy of each message from the moment the script starts receiving it.
Will the sheet include messages from before I set up the script?
No. The script only receives events after the app is installed and added to the channel. Slack's free plan shows the most recent 90 days of message history, and data older than one year is deleted. Pulling older history uses a different Slack method with its own rate limits, which this guide does not cover.
Can anyone send fake messages to my sheet?
Anyone who knows the web app URL can send requests to it, because the deployment allows anonymous access. Treat the URL as a secret and never post it publicly. For production use, add a check that accepts only requests from Slack, since the script in this guide does not include one.
What happens when I hit a Google quota?
Google's quotas page says a script can throw an exception and stop when a service quota is exceeded. Quotas are per user and reset 24 hours after the first request. Open the Apps Script executions log to see the error, and use a Google Workspace account if you need the higher daily limits.
Does this also send Google Sheets rows back to Slack?
No. This guide covers only the Slack-to-Sheets direction. For sending sheet rows to Slack, read How to Send Slack Messages From Google Sheets, which covers that separate setup. Use both guides only if you need both directions, since each adds its own script and limits.
Sources
- Events API, Slack Developer Docs (2026-10-26)
- Feature limitations on the free version of Slack, Slack (2026-10-26)
- Web Apps, Google for Developers (2026-09-03)
- Apps Script quotas, Google for Developers (2026-09-03)
- Google Apps Script: the shadow IT audit, Synk.to Blog (2026-07-19)