My Problem:-
I want my Workout Logs from Peloton to find it's way into my Google Fit records. I've yet to find a pre-existing integration, the closest I've seen is a sync from Peloton > Stravia > Google Fit, however this only works for rides and I do floor work too and I'm keen not to have a middle man in my data.
Both Peloton and Google Fit have API access.
My Objective:-
I have started to pull together a C# library that can get the current data from Peloton, however I want to avoid duplicate entries being posted to Google Fit. What would be a good design for this approach. I have considered a Timer Function that exports all results from yesterday and posts to Google Fit but this seems a bit fragile and has 24hrs lag. My next thought was a Timer Function that runs frequently and uses some sort of state stored in a Blob to know what the last posted workout was, however I wondered if this would have issues if the function invocations overlapped?
Furthermore, I assume the correct approach would be different functions, one for the detection from Peloton and one for the Write to Google Fit, if I do this would durable functions be better/easier or should I use an intermediary queue?