Skip to content

[Feature] Google Drive as files source/destination #1617

Backlog

Description

@341-Bishop

Problem

I totally understand, respect and LOVE the privacy-first, own-your-data and self-host-all-the-things approach [that's how I found HealthLog ;)], so this might sound a little bit off-track, but there are some benefits that come with cloud services.

while playing with exports/imports [mainly the Health Connect stuff] I've noticed that there is a one-time import option, and also a semi-scheduled import integration ["semi", because of the one and only schedule = fetching every six hours, which is fine by the way] that asks for a WebDAV folder address. this fits into the own-your-data mindset, but in some scenarios leads to additional PoFs [Points of Failure] just to accomplish "a simple file share": if I want to use the mentioned integration automatically, I need to:

  1. set up a daily [/weekly/monthly] backup in Health Connect [that's fine, it is needed anyway] to Google Drive
  2. set up some file sync for the folder from Google Drive [can be built into step 3, as Nextcloud can probably do it]
  3. set up WebDAV or Nextcloud to expose the folder
  4. set up the import integration in HealthLog

steps 2 and 3 are potential PoFs, and also - they create additional service(s) to install and maintain, which is not always ideal.

Proposed solution

an additional section in integrations, called "File sources" maybe? [just for the future option to add other "modules" = sources, like Dropbox, Mega, SMB, NFS] with Google Drive as an option there.

then, after choosing what's best: a Service Account OR OAuth credentials created in Google Cloud for the Google Drive API [probably similar stuff as the existing connection with Google Health].

with that "global" setting set up, there can be a "Source" selector option wherever it would fit, where the user can choose "Google Drive" [or others] as a source for some import/export options: in this feature request's case, the Health Connect scheduled import could use this source to connect directly to the user's Google Drive and download the needed file without additional third-party services or any other actions from the user.

Alternatives considered

WebDAV/Nextcloud - as mentioned earlier - additional points of failure, additional services to install, maintain, etc.

manual download - relies on user actions, which itself is a PoF ;)

Affected surface

Other, Web (PWA)

Additional context

there are probably even more ways to skin a cat and move the data from Health Connect to HealthLog, as there always are, but I guess those require too much tinkering, will introduce even more PoFs, and for sure will take MUCH more time to set up and manage/maintain ;)

also: probably a little bit of remodelling in the integrations department could be considered - "Sources" as file/directory sources [e.g. Google Drive, Dropbox, SMB, NFS, etc.], and "Integrations" as direct integrations with services [like Garmin, Strava, Nightscout & others]. that would open up a new possibility: every time a direct connection to a file or folder is needed, the user would be able to choose a pre-configured source, and then just provide the file/folder name and that's all. one "global" place for access configuration, and the whole app can benefit from that.

DISCLAIMER: I guess this idea/feature request touches a kinda delicate area of menu/options remodeling, so I know that even if the feature itself [Google Drive] is doable, the whole rebuild/refactor isn't going to be a piece of cake. I have a few insights on this matter, and I am trying to gather all my thoughts into one comprehensive comment so I can share them - unfortunately I am not a programmer of any sort, so all I can do is point out this or that and test things, which I would be happy to do. so if you're interested, I'll write down my suggestions about rearranging the menu and options just to make them clearer for everyday users :)

Pre-flight checks

  • I confirmed this is not a duplicate of an existing feature request.
  • I'm proposing a feature, not asking a usage question (those go to Discussions or the docs).

Activity

  1. added
    enhancement
    on Nov 27, 2026
  2. pejotigrek commented on Nov 27, 2026

    @pejotigrek

    ..and I just noticed I sent the comment above from a second logged-in github account in my browser [a test account for some AI stuff].. but as there's no option to change that - I won't close/reopen this as "me" I just keep answering from the proper one :) forgive me for this little mess 😳

  3. MBombeck commented on Nov 27, 2026

    @MBombeck
    Owner

    Thanks @341-Bishop, that's a fair point about the extra moving parts.

    I'd rather not build Google Drive in directly. It needs each server to register its own Google app, and it sends file metadata to Google, which cuts against how HealthLog is meant to run.

    The lighter path today is one small rclone container that serves your Drive folder over WebDAV. HealthLog's existing WebDAV source picks it up every six hours. I'll add a short guide for that to the docs. A plain "folder on this server" source is on my list as a simpler option for later.

    Refs #1617

  4. pejotigrek commented on Nov 27, 2026

    @pejotigrek

    I'd rather not build Google Drive in directly. It needs each server to register its own Google app, and it sends file metadata to Google, which cuts against how HealthLog is meant to run.

    hm, don't get me wrong, but looking at the idea again now - doesn't the Google Health integration work in a similar way? correct me if I'm mistaken, but you could just add another scope to the OAuth client so the very same credentials could be used with Google Drive - getting two birds with one stone, so to speak.

    the user's file [Health Connect export] is already on Google Drive - so HealthLog just asks the Drive API for a file listing & downloads the latest one - it doesn't send anything new to Google.

    The lighter path today is one small rclone container that serves your Drive folder over WebDAV. HealthLog's existing WebDAV source picks it up every six hours. I'll add a short guide for that to the docs. A plain "folder on this server" source is on my list as a simpler option for later.

    this still adds another PoF [even if small] to the equation, and requires Google OAuth / Cloud API anyway - it just moves it from HealthLog to rclone.

    like I wrote above [from the wrong account, again - sorry about that], I totally support the privacy-first idea, but HealthLog is already connecting to Google's API when/if the Google Health integration is configured.

  5. MBombeck commented on Dec 1, 2026

    @MBombeck
    Owner

    @pejotigrek that's a fair challenge, and you're right that HealthLog already talks to Google when Google Health is connected. The difference is the kind of access. Health data comes in through a scope made for exactly that. Reading a file that someone else (Health Connect's backup) put into your Drive needs Google's broad read access to Drive, which Google treats as a restricted permission: every server would have to register for it in its own Google project, and once a project leaves test mode, Google asks for a security review. I don't want to hand every self-hoster that hurdle, or hold a token that can read their whole Drive.

    So the plan stays: a short guide for rclone serving the Drive folder over WebDAV, which needs the same Google client you'd create for Google Health and nothing else, and a plain "folder on this server" source, so anything that already syncs a folder to the server (rclone, Syncthing, Nextcloud) works without WebDAV in between. If the guide turns out more fiddly than I think, tell me and I'll look again.

    Refs #1617

  6. pejotigrek commented on Dec 1, 2026

    @pejotigrek

    thank you @MBombeck for commenting - and just allow me to clear up a few things about Google Cloud here - the proposed rclone setup actually hits the exact same rules, AFAIK:

    1. leaving Testing mode ("In production") does NOT trigger a security review for a personal/self-hosted project. the app simply stays unverified [capped at 100 users, with a one-time "Advanced -> Go to..." warning], and tokens stop expiring every 7 days. [by the way, the Google Health API is also a restricted scope, so it works the exact same way! I'd even say the Health API is arguably more sensitive]
    2. rclone uses that exact same Google client and the exact same broad drive / drive.readonly scope anyway, so it still holds a whole-Drive token on the very same server.
    3. if someone doesn't want to grant access to their whole Drive, a Google Service Account solves that completely - it only sees the single folder you explicitly share with it, with no OAuth consent screen or 7-day expiry at all.
    4. as mentioned before, you still have to create a client id/client secret when configuring Google Health, so there is no major extra configuration besides enabling the Drive API and adding an additional scope.

    that said, I totally get not wanting to maintain Drive integration code/support inside HealthLog itself when rclone looks like it can bridge it to WebDAV - BUT just wanted to point out that the Google Cloud side isn't actually a security-review blocker, and since Google Cloud is already used for the Health API anyway, there's no need to introduce a third-party app just for syncing files when you can handle it with a direct connection - this is IMHO an unnecessary complication and an extra PoF.

    I know it might be impossible to convince you to change the plan, but I still want to give it a shot - especially since, to the best of my knowledge, the issues you pointed out already exist anyway, so we wouldn't really be adding anything new :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions