Import Samsara Data
Use the Generic REST connection and a REST Request step to import Samsara data. This keeps the API token in a reusable connection and uses the same generic cursor-paging controls available for any API that returns a continuation cursor.
Before You Begin
Section titled “Before You Begin”In Samsara, create an API token with only the read scopes and tag access the import needs. Samsara shows the token only when you create it, so copy it before leaving the page. See Samsara API authentication.
Choose the host that matches your Samsara dashboard:
| Samsara dashboard | Host or IP Address |
|---|---|
| US or legacy Canada cloud | api.samsara.com |
| EU / UK | api.eu.samsara.com |
| Canada cloud | api.ca.samsara.com |
Create the Connection
Section titled “Create the Connection”- Open Connections and create a Generic REST connection named
Samsara. - Enter the matching host from the table above.
- On Authentication, select Bearer Token and paste the Samsara API token. Do not add an
Authorizationheader yourself. - Save the connection.
Import Vehicles
Section titled “Import Vehicles”This first import confirms the connection and provides a recipe you can reuse for other modern Samsara list endpoints.
- Add a REST Request step and select the
Samsaraconnection. - Set Endpoint Source to Manual, Method to
GET, and Endpoint to/fleet/vehicles. - Select a Target Table, such as
samsara_vehicles. - On Query Parameters, add
limitwith the value512. - In Request, set the following values:
| Field | Value |
|---|---|
| Row Format | Object |
| Streaming Mode | Cursor Paging |
| Items Path (JSON format) | ["data"] |
| Mode Params (JSON format) | {"cursor": "after"} |
| Mode Paths (JSON format) | {"has_more": ["pagination", "hasNextPage"], "cursor": ["pagination", "endCursor"]} |
- Select Test Paging. PlaidCloud fetches only enough pages for the preview, so you can verify the result before a full run.
- Save and run the step.
Copy these values exactly when configuring a modern Samsara list endpoint:
{"cursor": "after"}{"has_more": ["pagination", "hasNextPage"], "cursor": ["pagination", "endCursor"]}When Samsara returns hasNextPage: true, PlaidCloud sends the returned endCursor as the next request’s after parameter. It continues even when a page is empty, because Samsara can have later pages with data. See Samsara pagination.
Run Efficiently
Section titled “Run Efficiently”- Use one REST Request step for each list endpoint. Cursor values are opaque and must be sent exactly as returned.
- Set
limit=512when the endpoint supportslimit; 512 is Samsara’s documented maximum. - Avoid one-request-per-row fan-out for a list endpoint. Use it only for genuinely independent detail requests, and keep its request rate within the endpoint’s limit.
/feedendpoints are incremental rather than full snapshots. Persist the last successful cursor and schedule the workflow more often than Samsara’s 30-day cursor-expiry window.
Troubleshoot
Section titled “Troubleshoot”| Problem | What to check |
|---|---|
401 or 403 |
Confirm the regional host, token, tag access, and endpoint read scope. |
| No rows | Confirm this is a list endpoint and Items Path is ["data"]. |
| Paging stops too soon | Use the modern endpoint in Samsara’s current API reference. Legacy /v1/ endpoints can use different pagination fields. |
429 |
Reduce the request rate for independent fan-out calls. The REST Request step respects Samsara’s Retry-After response when it retries a safe read request. |