Duplicated Strava activities

Hello everyone,

I created a workflow to record each Strava activity on a Google Sheet and on Google Calendar.
Everything went well for the first activities.
Recently, the workflow has been activated several times (at 5-minute intervals) for the same activity and therefore duplicates the activity in Google Sheet and Google Calendar.
I assume, unless you tell me otherwise, that the problem is with Strava.
While waiting for Strava to fix the problem, I’d like to create a rule in my workflow to avoid duplications.
I’m imagining putting in some intermediate code for the Google Sheet registration that will check if the output (via its ID) is already in the Google Sheet.
But how do I do this for Google Calendar?
Or is there a solution upstream of wokrflow to avoid these duplications?
thanks for your help

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

There is likely a better way to do this, but you could insert an ID as a field or part of a field (e.g. description) in the Google calendar event too. The brute force way of finding the events would be to use the ‘get many’ option and then try to match the specified field from the results

The better way ? For the original worflow or for the duplicate ?
I’d like to know the better way

Can you help me please?

Sorry, that was poorly worded. What I meant was, someone with more experience may of a better way of doing it, but something that would work is:

  • When the workflow is triggered, use the Google Calendar ‘Get many’ option to return a list of the upcoming events
  • Loop through the events to check the description doesn’t include the matching strava id
  • If there are no matches, create the event (and add the ID to the description).

Does that help?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.