Setup Guide

Step-by-step guides for connecting your data source and setting up your account.

What you'll need

A Google account
A Last.fm account with some listening history
A free Last.fm API key — last.fm/api/account/create
1
Step 1
Copy the template sheet

Open the link below and click Make a copy. This saves a personal copy to your own Google Drive — your data stays private and only you can edit it.

2
Step 2
Fill in your details

In your copied sheet, click the Settings tab at the bottom. Fill in your Last.fm username and API key in column B.

Column AColumn B — fill these in
Last.fm Username: your_lastfm_username
Last.fm API Key: your_32_character_api_key
Data Tab Name: Full Raw Listening History (leave as-is)
Don't have an API key yet? Get one free in about 2 minutes at last.fm/api/account/create — the application name can be anything you like.
3
Step 3
The script is already included

When you made a copy in Step 1, Google showed a notice saying "The attached Apps Script file and functionality will also be copied" — that's the sync script. It came with the template, so there's nothing to add.

You can confirm it's there by going to:

Extensions Apps Script

You'll see the Last.fm sync code already loaded and ready. No changes needed — just close that tab and move on to Step 4.

4
Step 4
Start auto-sync

Go back to your sheet. You'll now see a Last.fm menu in the top menu bar, next to Help. Click it and select Start Auto-Update (90 min).

Last.fm Start Auto-Update (90 min)

That's it — your sheet will now automatically pull in new plays from Last.fm every 90 minutes. The 90-minute interval is intentional: some sources like Deezer can have a delay before scrobbles appear on Last.fm, so a longer window helps make sure nothing gets missed.

Seeing a "This app isn't verified" warning? This is completely normal for personal scripts. Google shows this for any script that isn't published to the Play Store. Click AdvancedGo to [app name] (unsafe)Allow. It is safe — the script only accesses your own sheet.
Don't want to wait? You can always pull your latest tracks manually at any time by clicking Last.fm → Fetch Latest Tracks — handy if you just finished a listening session and want your charts to update right away.
5
Step 5
Connect to dankcharts.fm

Now link your sheet to the site so your charts load from it. In dankcharts.fm, open Settings (the ⚙ icon), choose Google Sheets, and paste your sheet's URL.

Important: your sheet must be set to "Anyone with the link can view" so the site can read it.
In your sheet: Share → Anyone with the link → Viewer
6
Step 6
Enable manual play entry Optional

Want to add plays directly from dankcharts.fm using the + Add Play button? You'll need to deploy the script as a Web App first. Here's how:

1. Open the Apps Script editor

In your Google Sheet, go to:

Extensions Apps Script

2. Create a new deployment

In the Apps Script editor, click:

Deploy New deployment

3. Configure the deployment settings

A dialog will open. Set the following:

SettingValue
Type Web app
Execute as Me
Who has access Anyone

Click Deploy. You may be asked to authorize — follow the same steps as in Step 4 (Advanced → Go to [app name] (unsafe) → Allow). Once done, copy the Web App URL it gives you.

4. Paste the URL into dankcharts.fm

In dankcharts.fm, go to:

Settings ⚙ Enable auto-sync & manual play entry

Paste the URL into the Apps Script Web App URL field and save. The + Add Play button will now work.


Troubleshooting
The Last.fm menu doesn't appear in my sheet.
Close and reopen the sheet. The onOpen function runs when the sheet loads — if you had the sheet open right after making your copy, just refresh the page.
No data is being imported.
Check that your Last.fm username (B1) and API key (B2) in the Settings tab are correct and have no extra spaces. You can test by clicking Last.fm → Fetch Latest Tracks and then going to View → Logs in the Apps Script editor.
The site shows "No Google Sheet configured".
Make sure you've pasted the sheet URL in dankcharts.fm Settings and that the sheet is shared as "Anyone with the link can view".
Manual entry gives an error.
The Web App URL must be redeployed after any script change. In Apps Script: Deploy → Manage deployments → edit the existing deployment → Deploy.

🎧
Need help?

Can't get it working? Open a support ticket and we'll get back to you.

or email support@dankcharts.fm