Screen SMS campaign numbers for high-risk lines with Twilio, Sheets, and Slack

Go to Workflow
0 views
Built by Kevin Yu Kevin Yu
Created on July 22, 2026

Description

Quick overview
This workflow manually screens campaign phone numbers from Google Sheets using Twilio Lookup Line Type Intelligence, separates safe mobile numbers from risky or invalid ones into different tabs, and posts a run summary to Slack.

How it works
Starts when you run the workflow manually.
Reads all rows from the “Pending Campaign” tab in Google Sheets and processes them one number at a time.
Calls Twilio Lookup v2 for each phone number to retrieve validity, country code, and Line Type Intelligence details.
Classifies each number as safe only if the lookup succeeds and the number is a valid mobile in an allowed country, otherwise marking it for quarantine with a reason.
Appends safe numbers to the “Safe To Send” Google Sheets tab and quarantined numbers to the “Quarantine” tab.
Builds a summary of totals and quarantine breakdowns and posts the results to a selected Slack channel.

Setup
Add Twilio credentials (Account SID/Auth Token) and enable Line Type Intelligence for Twilio Lookup in your Twilio console.
Add a Google Sheets OAuth2 credential and select your spreadsheet, ensuring it contains the “Pending Campaign”, “Safe To Send”, and “Quarantine” tabs with matching columns.
Add a Slack credential and set the target channel for the screening summary message.
(Optional) Update the allowed country codes and line types in the classification code to match your campaign requirements.

Requirements
A Twilio account (Account SID and Auth Token) with Line Type Intelligence enabled on Lookup. This is a billable Lookup add-on, not the free basic lookup.
A Google account with a spreadsheet that has the Pending Campaign, Safe To Send, and Quarantine tabs.
A Slack workspace, a channel, and a Slack app credential.

Customization
Swap the manual trigger for a Schedule trigger to screen on a timer, or a Webhook to screen on demand from another workflow.
Add more Lookup data packages, such as caller name or SIM-swap signals, for stricter screening (each adds cost).
Replace the safe-or-quarantine split with a numeric risk score, or add a third bucket for borderline cases.
Wire the Safe To Send tab straight into your sending workflow so it only ever reads numbers that passed.

Additional info
The point is to gate a list before it reaches your sender, since landlines, VoIP, and premium-rate lines are what SMS pumping fraud is built on, and catching them up front saves both the send cost and the failure-rate hit. Safe and quarantined numbers go to separate tabs rather than one tab with a status column, so the downstream sender reads a clean list without filtering. Basic Lookup validation is free, but Line Type Intelligence bills per lookup at around $0.008 each, so screening a large list is a real cost to budget for. The allow rules live in a Code node you can read, with no AI involved.

Nodes Used (4)

Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest
Slack
n8n-nodes-base.slack