Read before:
../conectores.md(state map) andfichas.md(index of sheets).
What it is#
Reads the Meta Ads (Facebook and Instagram) Insights report — one row per day — into three Bronze tables (campaigns, ad sets and ads).
Supported ingestion modes:
- Nós buscamos — We pull the data from your source.
Purpose#
Bring Meta Ads (Facebook and Instagram) data into your datalake and make it available to the Bronze/Silver/Gold layers, BI models and the natural-language question wizard.
When to use / when not to use#
Use when you need to consolidate this source into the datalake on a scheduled basis, with isolation per workspace.
Use it with your company's token: the connector reads the ad account with a system user token from your own Business Manager, with the ads_read permission. No app of ours needs approval.
Plan and permissions#
- Plan: core product (connectors are part of all plans; the limit is the number of sources of the plan).
- Access: requires an active workspace — with the subscription overdue, suspended or canceled, the run is blocked.
- Shutdown: the ingestion run can be temporarily disabled (maintenance or incident). When that happens, the screen indicates the feature is currently unavailable.
Prerequisites#
- Admin access to the Business Manager of the company that owns the ad account.
- The ad account ID, in the
act_…format (shown in Ads Manager, next to the account name).
How to generate the token (system user)#
- In Business Manager, open Business settings.
- Under Users → System users, use Add. Give it a name (e.g.
ingestia-read) and choose the Employee role — read access is enough. - With the system user selected, use Assign assets → Ad accounts, tick the account you want to read and grant View performance (no permission to manage campaigns).
- Still on the system user, use Generate new token. Pick your business app, tick the
ads_readpermission and, if the screen offers it, the Never expire validity. - Copy the token (it starts with
EAA…). It is shown only once. - In ingestia.io, under Dados → Conexões → Nova conexão → Meta Ads (Facebook e Instagram), paste the token into Token de acesso and fill Conta de anúncios with the
act_…. - Use Testar conexão. If you get Autenticação: Falhou, check that the ad account was assigned to the system user and that the token has
ads_read.
The token belongs to your company: to cut access, revoke it in Business Manager itself (or remove the system user). Replacing the token here does not revoke it there.
Credentials#
Authentication method: Access Token pasted by you. It is encrypted (AES-256-GCM) and never shown again, nor appears in logs or error messages.
Sensitive fields. They are encrypted (AES-256-GCM) and are never kept in the config of the connection, in the pipeline definition, in the export or in the DAG. By default the encrypted value is stored in the database; moving the credential of this connection to the external credential vault is an explicit choice, made per connection after saving — see ../../administracao/credenciais-e-rotacao.md.
- Access Token (
accessToken)
Secrets are never re-displayed and go through redaction in every error/log (raw token, URL-encoded and in JSON).
Form fields#
| Field | Label | Type | Required | Notes |
|---|---|---|---|---|
adAccountId | Ad account | text | yes | The ID appears in Ads Manager, in the format act_… |
level | Granularity | select | no | default: campaign; options: campaign / adset / ad |
datePreset | Data window | select | no | default: last_30d; options: last_7d / last_14d / last_30d / last_90d / this_month / last_month |
apiVersion | API version | text | no | default: v21.0; only change if Meta deprecates the current version. |
accessToken 🔒 | Access Token | password/secret | yes | secret (encrypted; external vault optional) |
Step-by-step#
- In the Dados → Conexões menu, use Nova conexão.
- Choose Meta Ads (Facebook e Instagram) in the catalog.
- Fill the form fields (see the table above).
- Use Testar conexão. The result is shown broken down into Conectividade, Autenticação and Listagem/leitura — each with OK, Failed, Not applicable or Not tested. A capability with no test of its own for this connector shows as Not applicable, and Not applicable never counts as success.
- Use Salvar conexão. Saving DOES NOT start any ingestion.
- On the connection card, use Montar extração (or go to Orquestração → Pipelines and use Conectar fonte). The pipeline points to the saved connection — the credential is not copied.
- In review, Publicar (agenda desligada) creates version 1 without running anything. Then, Ativar agenda and Executar agora are separate actions.
Example — connection test#
Example configuration (all values are fictitious; secrets appear masked):
# Exemplo sintético (valores fictícios — não são credenciais reais)
adAccountId = act_1234567890
level = campaign
datePreset = last_30d
apiVersion = v21.0
accessToken = •••••• (cifrado — nunca exibido)Expected result#
The Testar conexão returns the list of discovered tables/resources. After the first load, the rows appear in the Bronze layer of your workspace, ready for the pipeline.
Limits and costs#
- Pagination: hard cap per run (default 10,000 pages / 5,000,000 rows); anti-loop guard.
- SaaS load: default
batchSize5,000,maxRows200,000 per resource. - Estimated volume: ~0.5 GB/month (catalog estimate, not a measurement).
- Cost: the extraction itself is not charged by the platform; the Bronze load consumes datalake processing (billable).
Security#
- Scope by workspace: each customer reads and writes only to their own datalake (
<prefixo>_bronze/_silver/_gold); there is never leakage between workspaces. - Encrypted secrets: sensitive material is encrypted with AES-256-GCM before being written. The external credential vault is optional and enabled per connection; without it, the encrypted value remains in the database. Changing the value here DOES NOT revoke the credential at the source.
- Redaction: every error/log goes through secret redaction (raw, URL-encoded and in JSON).
- Production does not fake: a path that would fall into a mock triggers the production guard (explicit failure instead of simulating success).
Common errors#
- Credential rejected (401/403) — the provider did not accept the credential: expired, revoked or missing required permission. Reconnect the source (the source and history are preserved; do not recreate the source).
- Rate limit (429) — the provider asked to wait. The extraction respects
Retry-Afterand retries; if it repeats, wait and reduce the schedule frequency. - Resource not found — check the resource identifier (account, object, report) and the granted permissions.
- Pagination cursor stuck — the extraction stops when the API cursor does not advance (anti-loop guard). If it happens in consecutive runs, open a support ticket providing the connector and the resource.
- Empty records path — the response arrived without records in the expected place. Check the selected resource and filters (period, account, status) before assuming there is no data.
Troubleshooting#
- Use Testar conexão to isolate credential/network problems before scheduling.
- Monitor runs in the connector observability (error rate, p50/p95, freshness).
- A schema change at the source is signaled by schema drift (new column = info; removed column/type changed = attention).
Related#
../conectores.md— connector catalog by state../ingestao-incremental-backfill.md— full, incremental by watermark, backfill and checkpoint../pipeline-medalhao.md— Bronze/Silver/Gold layers and quality../agendamento-retry-dlq.md— scheduling, retry/backoff and DLQ../custo-limites-seguranca.md— cost, caps and workspace security
Last review: 2026-10-05. Connector sheet automatically generated from the product's connector catalog.