# Connect n8n.

Source: https://adsuperpowers.ai/docs/setup/n8n

Read connected advertising accounts and campaign data in an n8n workflow.

Use this guide to add Ad Superpowers as a step in an n8n workflow. Start with a manual read, then use the result in your reporting workflow.

## Before you begin

You need an n8n instance with the built-in **MCP Client** node and an Ad Superpowers account with an active trial or paid subscription. [Create an account](https://adsuperpowers.ai/signup) if needed; see [pricing](https://adsuperpowers.ai/pricing) for current access and limits.

In the [dashboard](https://adsuperpowers.ai/dashboard), select the workspace you want to use and connect a platform in [Integrations](https://adsuperpowers.ai/dashboard/integrations). Create an API key in that workspace's [API Keys](https://adsuperpowers.ai/dashboard/api-keys). The example below uses a connected Google Ads account.

## 1. Add the client

Create a workflow with a **Manual Trigger**, then add the built-in **MCP Client** node. This node runs one selected tool as a workflow step. n8n has a separate **MCP Client Tool** node for AI Agents. See the [official node guide](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcpclient/).

## 2. Configure the connection

Set these fields in the MCP Client node:

| Field | Value |
| --- | --- |
| Server Transport | HTTP Streamable |
| MCP Endpoint URL | `https://mcp.adsuperpowers.ai/v1` |
| Authentication | Bearer Auth |
| Bearer Token in the credential | Your Ad Superpowers API key |

Save the key as an n8n credential. Enter only the key in **Bearer Token**; n8n adds the `Bearer` prefix. See [n8n's credential instructions](https://docs.n8n.io/integrations/builtin/credentials/httprequest/#using-bearer-auth).

## 3. Check an account and its data

1. In **Tool**, select `google_ads_list_accounts`. Keep the optional inputs at their defaults and run this node manually.
2. Confirm that the output contains your intended account. Copy its customer ID.
3. Add a second MCP Client node with the same connection and credential. Select `google_ads_run_gaql`, use **Manual** input, and set `customer_id` to that ID without dashes. For a manager-connected account, set `manager_id` to its returned manager ID when required.
4. Set `query` to the read query below and run the second node.

```sql
SELECT campaign.id, campaign.name, metrics.impressions, metrics.clicks
FROM campaign
WHERE segments.date DURING LAST_7_DAYS
LIMIT 5
```

The result should contain up to five campaign rows for that customer. Compare them with Google Ads for the [last seven days excluding today](https://developers.google.com/google-ads/api/docs/query/date-ranges); an empty result can mean no activity in that period. These tools do not change campaigns.

For another platform, use its account-list tool and a read tool from the [tool reference](https://adsuperpowers.ai/docs/tools). Confirm the account before requesting its data.

## If the connection fails

- **Only an SSE field appears:** check that you added the **MCP Client** node and that your n8n version supports HTTP Streamable. The `/v1` endpoint uses Streamable HTTP.
- **Authentication fails:** check the saved credential, ensure the key has not been revoked, and confirm trial or paid access in Ad Superpowers.
- **The tool or account is missing:** check the platform connection in the same Ad Superpowers workspace as the key, then reload the node's tool list. Continue with [connection troubleshooting](https://adsuperpowers.ai/docs/troubleshooting) if needed.

## Next steps

Once the manual result is correct, add your reporting destination and schedule. If you want an AI Agent to choose tools, follow n8n's [MCP Client Tool guide](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/) and select only the tools the workflow needs.
