Three ways to get your listening history in. Pick the one you started with and follow it end to end.
Open the template and click Make a copy. It lands in your own Drive — private to you.
In your copy, open the Settings tab at the bottom and fill in column B.
Get one free in about two minutes at last.fm/api/account/create. The application name can be anything.
It came with the template — nothing to add. To see it:
Close that tab and carry on.
Paste this into Extensions → Apps Script, replacing everything there. Save with Ctrl+S, then redeploy if you set up a Web App in Step 6.
Back in your sheet, a Last.fm menu now sits next to Help.
New plays arrive every 90 minutes from now on. Want them immediately? Last.fm → Fetch Latest Tracks.
Some services — Deezer especially — lag before their scrobbles reach Last.fm. A wider window means nothing gets missed.
Only needed for the + Add Play button. Deploy the script as a Web App:
Hit Deploy, authorise it the same way as in Step 4, and copy the Web App URL. Then paste it into:
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.
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.
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".
The Web App URL must be redeployed after any script change. In Apps Script: Deploy → Manage deployments → edit the existing deployment → Deploy.
Can't get it working? Open a support ticket and we'll get back to you.
or email support@dankcharts.fm