Actions7
- Event Actions
- Route Actions
- Sync Actions
- Trip Actions
Overview
The Sync - Sync operation in this node synchronizes changes from the Ride service API since a specified datetime. It allows users to fetch updated data for selected asset types (Routes and/or Trips) that have changed after the given timestamp.
This operation is beneficial when you want to keep your local data or workflows up-to-date with the latest changes from the Ride platform without fetching all data repeatedly. For example, you can use it to:
- Periodically sync new or updated routes and trips since the last synchronization.
- Automate data pipelines that react only to recent changes.
- Reduce API calls and data processing by limiting synchronization to relevant assets and timeframes.
A practical example: You set the "Since Datetime" to 2024-01-01T00:00:00Z and select both "Routes" and "Trips" as asset types. The node will then return all route and trip changes made since January 1st, 2024.
Properties
| Name | Meaning |
|---|---|
| Since Datetime | ISO8601 datetime string specifying the starting point to sync changes from (e.g., 2024-01-01T00:00:00Z). Only changes after this datetime are returned. |
| Asset Types | Types of assets to synchronize. Options: Routes, Trips. You can select one or both asset types to include in the sync. |
Output
The output JSON structure contains the synchronized data from the Ride API endpoint /api/v1/sync.json filtered by the provided parameters. The exact structure depends on the API response but generally includes updated information about the selected asset types (routes and/or trips) since the specified datetime.
- The output JSON typically includes arrays or objects representing the changed routes and trips.
- No binary data output is produced by this operation.
Example snippet of output JSON might look like:
{
"routes": [ /* array of updated route objects */ ],
"trips": [ /* array of updated trip objects */ ],
"since": "2024-01-01T00:00:00Z"
}
Dependencies
- Requires an authenticated connection to the Ride service API using an API key credential configured in n8n.
- The node uses HTTP requests with authentication to communicate with the Ride API at
https://ridewithgps.com. - No additional external services or environment variables are required specifically for the Sync operation.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrectly formatted "Since Datetime" values may result in API errors or no data returned.
- Selecting no asset types or invalid asset type values could lead to empty results or errors.
Error messages:
"Unknown sync operation: ..."ā indicates an unsupported operation was requested; ensure "sync" is selected as the operation.- HTTP errors related to authentication or network issues ā verify API key validity and network connectivity.
- If the API returns errors due to date format, confirm the "Since Datetime" is a valid ISO8601 string.
Resolution tips:
- Double-check API credentials and permissions.
- Use ISO8601 format for datetime inputs.
- Select at least one asset type to synchronize.
Links and References
- Ride With GPS API Documentation (general reference): https://ridewithgps.com/developers/api-documentation
- ISO8601 Date Format Reference: https://en.wikipedia.org/wiki/ISO_8601