Source: https://developers.tokportal.com/use-cases/no-code/n8n-us-account-preview/
Markdown: https://developers.tokportal.com/use-cases/no-code/n8n-us-account-preview.md

# Preview a US TikTok account order with n8n

An app, SaaS team or agency outside the US can evaluate one account for its US launch before placing an order. This recipe reads available markets, reads your workspace's costs, simulates an `account_only` order and stops at the quote. It does not add video slots or warming options.

**You can also use the web app.** Start with the [US launch guide for teams abroad](https://www.tokportal.com/learn/us-launch-from-abroad?utm_source=developers_tokportal\&utm_medium=docs\&utm_campaign=growth_us_launch_202609\&utm_content=n8n_preview_guide), [create a TokPortal account](https://app.tokportal.com/auth/signup?utm_source=developers_tokportal\&utm_medium=docs\&utm_campaign=growth_us_launch_202609\&utm_content=n8n_preview_signup), or [open the order form](https://app.tokportal.com/bundles/create?utm_source=developers_tokportal\&utm_medium=docs\&utm_campaign=growth_us_launch_202609\&utm_content=n8n_preview_order) if you already have one. The web path needs neither n8n nor MCP. Review the current terms and amount before confirming an order; a target country does not guarantee views or reach.

## Import the manual preview

[Download the n8n preview workflow](https://developers.tokportal.com/workflows/us-account-preview.n8n.json), then choose **Import from File** in n8n. It uses built-in HTTP Request and Code nodes, so the TokPortal community node and an AI agent are not prerequisites.

Create or select an n8n **Header Auth** credential with header name `X-API-Key` and your TokPortal key as its value. Select that same credential in **Read markets**, **Read workspace costs** and **Simulate one account**. Keep the key in n8n Credentials, never in the workflow JSON. Keys are managed in the [Developer Portal](https://app.tokportal.com/developer/api-keys?utm_source=developers_tokportal\&utm_medium=docs\&utm_campaign=growth_us_launch_202609\&utm_content=n8n_preview_key).

The key needs both read and write access, or full access: a simulated `POST` still passes the normal write-permission checks. An environment label such as `test` does not enable simulation. A read-only key can inspect markets and costs, but its preview can return `403`; stop there and use an appropriately authorized key. Never remove the dry-run header to work around an error.

Press **Execute workflow** manually. The imported workflow is inactive and contains no schedule or webhook trigger.

| Step                          | What runs                                                         | What to inspect                                                                                                                                                      |
| ----------------------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Read markets                  | `GET /countries`                                                  | `body.data` lists markets for new accounts. `videos_only_countries` is a separate list for existing accounts.                                                        |
| Confirm US availability       | Local Code node                                                   | Stops if `USA` is absent from `body.data`. It does not pick another country.                                                                                         |
| Read workspace costs          | `GET /credit-costs`                                               | Current workspace pricing and recurring-account terms. This is not a hardcoded price estimate.                                                                       |
| Simulate one account          | `POST /bundles` with the fixed header `X-TokPortal-Dry-Run: true` | One TikTok `account_only` order in `USA`, with no warming add-on.                                                                                                    |
| Verify preview and show quote | Local Code node                                                   | Requires the response header, `dry_run: true`, `credits_charged: 0`, a numeric `credits_would_charge`, and a synthetic bundle ID. Stops after displaying the result. |

The response must contain `data.bundle_id`; it is not a top-level `id`. A synthetic ID starts with `00000000-0000-4000-8000-` and represents nothing created. The quote is for the simulated request at that moment, not a reservation or a delivery confirmation. See [Sandbox](https://developers.tokportal.com/sandbox) for the full contract.

## Read the result before deciding to buy

`credits_would_charge` is your server-calculated quote, including any effective workspace allowance. `credits_charged` must be zero. The preview performs the API's normal validation and pricing but stops before writes: no order, credit debit, manager assignment, upload, publication or notification is created. Normal authentication and rate limits still apply.

The final Code node validates the response; the **fixed request header** is what makes the call a simulation. Keep it on every write. If the HTTP node returns an error, inspect its status and `X-TokPortal-Dry-Run` response header. Error bodies do not necessarily contain `dry_run`. Stop on authentication, permission, unavailable-market or validation errors; there is no fallback to a live request.

**To order after reviewing the result**, open the [web order form](https://app.tokportal.com/bundles/create?utm_source=developers_tokportal\&utm_medium=docs\&utm_campaign=growth_us_launch_202609\&utm_content=n8n_preview_after_quote). Select the account-only option, TikTok and the available US market, then review today's amount and terms before confirming. A real bundle creation charges credits immediately; publication is a later step. The preview workflow has no live switch and does not place the order for you. Never reuse a synthetic ID in a live request or another operational workflow.

For the same evaluation in a terminal, use [the US account preview guide](https://developers.tokportal.com/use-cases/platform-guides/post-us-tiktok-from-abroad). For a video on an account already delivered, use [MP4 configuration preview](https://developers.tokportal.com/use-cases/no-code/mp4-delivered-account-preview).

## Reuse the existing operational templates later

The [eight existing TokPortal n8n templates](https://github.com/tokportal/n8n-nodes-tokportal/tree/main/templates) cover operational work after a purchase decision. They are not substitutes for this preview:

- [Sheet rows to bundles](https://github.com/tokportal/n8n-nodes-tokportal/blob/main/templates/01-google-sheet-to-tokportal-bundles.json) creates and publishes real bundles, then writes back to Sheets.
- [Faceless channel factory](https://github.com/tokportal/n8n-nodes-tokportal/blob/main/templates/02-faceless-channel-factory.json) has a daily schedule and configures/publishes slots on an existing bundle.
- [Video URL to upload and schedule](https://github.com/tokportal/n8n-nodes-tokportal/blob/main/templates/06-ai-video-url-to-tokportal-upload-schedule.json) receives a webhook, uploads media and enables `auto_publish`.
- [Credits guard](https://github.com/tokportal/n8n-nodes-tokportal/blob/main/templates/08-credits-balance-guard.json) runs on a schedule and can send Slack messages. Its estimated runway is not the account-order quote returned by this simulation.

Keep those workflows inactive while reviewing their credentials, triggers and real actions. Choose one only when its specific operational work is wanted. The [community-node guide](https://developers.tokportal.com/use-cases/no-code/n8n-tiktok-automation) documents those capabilities.
