# How to Export Tweets to Google Sheets Automatically in 2026 > Pull a search query or a user's tweets into a Google Sheet with Google Apps Script and a per-call data API, then auto-refresh on a time-driven trigger. Full runnable code, pagination, dedup, a no-code path, and the cost math. - **URL:** https://www.twitterapis.com/blogs/export-tweets-to-google-sheets - **Published:** 2026-07-09 - **Updated:** 2026-09-05 - **Author:** TwitterAPIs - **Tags:** Google Sheets, Apps Script, Automation, Tutorial, Twitter API, No-Code --- Almost everyone who wants tweets in a spreadsheet starts the same way: they type `=IMPORTDATA(...)` into a cell, point it at a Twitter URL, and wait for the rows to appear. They never do. The built-in import functions were designed for a plainer web of public CSV files and static HTML tables, and a modern tweet feed is neither. So the search shifts to add-ons, then to the official API and its developer-account paperwork, and somewhere in that maze the simple goal, a sheet that fills itself with tweets on a schedule, gets lost. This guide gives you the whole recipe instead: a short Google Apps Script that fetches tweets from a per-call data API, parses the JSON, writes clean rows, pages through the cursor, skips duplicates, and reruns itself every hour on a time-driven trigger. There is a no-code path here too, plus the cost math so you can size a sheet before you build it. > **TL;DR:** Google Sheets cannot pull tweets with `IMPORTDATA` or `IMPORTXML` because those functions cannot send an auth header and cannot read nested JSON. The working pattern is a Google Apps Script that calls a per-call data API with `UrlFetchApp`, parses the response, writes rows with `setValues`, and reruns on a `ScriptApp` time-driven trigger. You store one Bearer key in Script Properties, no developer account or OAuth app required. Reads run $0.0008 per call at about 20 tweets a call, so roughly $0.04 per 1,000 tweets, and a new account gets $0.50 in free credit to test with. The full script, including cursor pagination and id-based dedup, is below, with a no-code webhook alternative for teams who would rather not touch JavaScript. Start at [TwitterAPIs pricing](/pricing) once you know your volume. ![Three ways to move tweets into Google Sheets compared, built-in import formulas versus a Google Apps Script versus a no-code webhook, across auth, fields, refresh, ownership and cost](/blog/content/images/export-tweets-to-google-sheets-slot-02.svg) *Built-in formulas break on auth, Apps Script gives you the most control, a no-code webhook trades control for a shared UI* There are three honest routes from Twitter to a spreadsheet, and the rest of this guide walks the one that lasts. Before the code, it helps to understand exactly why the fastest-looking route, a formula in a cell, is a dead end, because that is where most of the wasted hours go. ## Why Google Sheets Cannot Pull Tweets on Its Own Google Sheets ships with four import functions, and every one of them fails on Twitter data for the same underlying reason: they were built for public, static, unauthenticated content, and a tweet API is none of those things. [`IMPORTDATA`](https://support.google.com/docs/answer/3093335) wants a CSV or TSV file at a URL and chokes on JSON. [`IMPORTXML`](https://support.google.com/docs/answer/3093342) wants server-rendered HTML it can address with an XPath, but the timeline is painted by JavaScript after the page loads, so the element it reaches for is empty. `IMPORTHTML` reads a `` or `