Skip to content

brendanmurty/fitbit-obsidian-templater-script

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Fitbit Activity in Obsidian

What is it?

This is a user script for the Templater Obsidian plugin. The script will connect to the fitbit API to fetch all your activity for a given day and format it as markdown.

If you like this script, please consider buying me a coffee.

How do I use this?

  1. Download the script here.
  2. Put the script in your templater script directory.
  3. Edit the DIR variable in the script to point to a folder of your choice relative to the obsidian vault root folder (the default folder is misc). If this folder does not yet exist it will be created when the user script is being run for the first time. The file "fibit.json" will be created inside it.
  4. Create a templater template with the following content: <% tp.user.fitbit(tp.file.creation_date()) %>
  5. Run the templater script (by inserting the template to an existing file) to create the "fitbit.json" file. The error message is expected behavior and can be ignored.
  6. Go to tiim.ch/fitbit-oauth2-token/ and follow the instructions to get your fitbit authentication code.
  7. Edit the file "fibit.json" with a text editor and replace its content with the JSON document given in the step above.
  8. Run the templater script again, the file "fitbit.json" will be updated and your activities of the day will be inserted to the note.

Example of data returned from the script

Fitness

🕰 Start Time:: 16:40 🤸‍♂️ Sport:: Fitness 📏 Time:: 37 ⏱️ Distance:: 💓 Heartrate:: 110 ✨ Motivation::

<enter the fitness plan here>

About

Insert your Fitbit activities into a obsidian note every day.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%