Guide

How to Connect Facebook Ads Reporting to Google Sheets Automatically

By Jonas Viray 6 min read

Quick answer

Use the Facebook Marketing API (part of the Graph API) to read your ad account's insights on a schedule, transform the data, and append or update rows in Google Sheets. An automation tool like n8n handles the schedule, the API call, the Sheets update and an optional Slack summary without anyone exporting reports by hand.

What you'll need

  • Access to the Facebook ad account (and Business Manager admin rights, or someone who has them)
  • A Meta developer app, used to generate an access token for the Marketing API
  • A Google account with the destination spreadsheet
  • An automation tool; this guide uses n8n, but the same flow works in Make or custom code

Step-by-step

  1. 1Get an access token. In your Meta app, generate a token with the ads_read permission. For ongoing reporting, use a long-lived token, ideally for a Business Manager system user, so it doesn't expire after a few hours.
  2. 2Decide the metrics and breakdown. Typical fields are campaign name, spend, impressions, clicks, CTR, CPC, results and cost per result, broken down by day or campaign.
  3. 3Create a schedule trigger. In n8n, add a Schedule Trigger node, for example every morning, or hourly for live dashboards.
  4. 4Call the Insights endpoint. Use an HTTP Request node to call the ad account's insights endpoint with your chosen fields, date range (such as yesterday or the last 7 days) and level (campaign, ad set or ad).
  5. 5Transform the response. Flatten nested values, convert currency and percentages to plain numbers, and add the report date so every row is traceable.
  6. 6Write to Google Sheets. Use the Google Sheets node to append new rows, or update rows keyed by date and campaign so reruns don't create duplicates.
  7. 7Add a summary (optional). Post a short Slack message with yesterday's spend and top campaigns, linking to the sheet.
  8. 8Handle errors. Route failures to an alert channel so an expired token or API change is noticed the same day.

Common pitfalls

  • Expiring tokens: short-lived user tokens stop working quickly. Use a long-lived or system-user token and alert on authentication errors.
  • Attribution windows: recent days' results can still change as conversions come in, so re-pull the last few days rather than only yesterday.
  • Duplicates: appending blindly on every run duplicates data. Upsert by a unique key such as date plus campaign ID.
  • Rate limits: large accounts or frequent runs can hit API limits. Request only the fields you need and avoid running more often than necessary.

Why automate it

Manual exports are slow and easy to get wrong, and they're only as fresh as the last person who ran them. An automated pipeline keeps numbers current, removes copy-paste errors and frees the team to act on the data instead of assembling it. I built this kind of pipeline for the Facebook Ads Data Live Report automation.

FAQ

Can I do this without code?

Mostly. n8n or Make handle the schedule and Sheets steps visually. The API request needs the right endpoint and fields, which is the part a developer typically sets up once.

Can the report go to a dashboard instead of Google Sheets?

Yes. The same data can feed a database behind a custom dashboard, or tools like Looker Studio reading from the sheet.

Real examples from my work

Want this built for your business?

See my workflow automation and api & system integrations service, or send a message with what you need.

Get in touch

More guides

All guides