🚀 Executive Summary

TL;DR: TickTick lacks a public API for automated data export, necessitating creative backup solutions. This guide outlines three methods: a brittle headless browser script, a more robust reverse-engineered API approach, and an event-driven IFTTT/Zapier integration for continuous data logging.

🎯 Key Takeaways

  • Headless browsers (e.g., Puppeteer, Selenium) can automate manual backup processes by simulating UI interactions, but are highly susceptible to breakage from minor UI changes.
  • Reverse-engineering the web application’s internal API calls provides a more stable and efficient method for automated backups, allowing direct interaction with backend endpoints.
  • Authentication for reverse-engineered API calls requires careful management of session cookies or tokens, which expire and necessitate a mechanism to refresh them, ideally using a secrets manager.

anyone able to help me with a way to automate a structured back up for Tick Tick?

Struggling with the lack of a proper backup API for your TickTick data? This guide offers three practical, real-world solutions for automating structured backups, moving from quick-and-dirty scripts to more robust, permanent fixes.

Your Data, Your Problem: A DevOps Approach to Automating TickTick Backups

I remember the day we almost lost the master deployment checklist for the `prod-auth-v2` rollout. It wasn’t in Git, not in Confluence. It was in a third-party project management tool, just like TickTick, that one of our PMs swore by. The tool had a brief outage, and for two terrifying hours, our entire launch plan vanished. We got it back, but it was a harsh reminder: if it’s not backed up under your control, it’s not really yours. That’s why when I saw a junior engineer on Reddit asking how to automate TickTick backups, it hit a nerve. It’s a classic DevOps problem hiding in a productivity app.

The “Why”: The API Blind Spot

Let’s get straight to the root cause. The problem isn’t you; it’s the architecture of many modern SaaS tools. TickTick is fantastic for user-facing features, but it lacks what we in the infrastructure world consider a fundamental: a public, scriptable API for data export. They offer a manual, point-and-click backup feature that spits out a ZIP file. That’s great for a casual user, but for anyone who wants reliable, automated, and structured data protection, it’s a non-starter. You can’t stick a `curl` command in a cron job if there’s no endpoint to hit.

So, we have to get creative. When the front door is locked, you start checking the windows. Here are three ways to tackle this, from the quick fix to the “let’s build it right” approach.

Solution 1: The “Cron & Scrape” Quick Fix

This is the hacky, brittle, but fast solution. If you just need something working by the end of the day, this is it. The idea is to automate the exact steps you take in a web browser using a headless browser tool like Puppeteer (for Node.js) or Selenium (for Python). You write a script that launches a browser, navigates to TickTick, enters your credentials, clicks the “Backup” button, and downloads the file.

Here’s a conceptual look at what a Puppeteer script might involve:


// This is pseudo-code to illustrate the logic
const puppeteer = require('puppeteer');

async function getTickTickBackup() {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  
  // 1. Go to the login page
  await page.goto('https://ticktick.com/signin');
  
  // 2. Fill in credentials and log in
  await page.type('#emailOrPhone', 'YOUR_USERNAME');
  await page.type('#password-a', 'YOUR_PASSWORD');
  await page.click('.button__3e2d');
  
  // 3. Navigate to the backup settings page
  await page.waitForNavigation();
  await page.goto('https://ticktick.com/webapp/#settings/backup');
  
  // 4. Click the "Generate Backup" button
  // Note: Selector will change if the UI is updated!
  await page.click('.backup-button-selector'); 
  
  // ...add logic to wait for and save the download...
  
  await browser.close();
}

getTickTickBackup();
Pros Cons
  • Relatively quick to implement.
  • Mimics user behavior, so it’s conceptually simple.
  • Extremely Brittle: The smallest UI change by TickTick (like renaming a CSS class) will break your script.
  • Resource-heavy; you’re running a full browser.
  • Handling logins with 2FA can be a nightmare.

Solution 2: The “Reverse-Engineered API” Permanent Fix

Alright, this is how we’d solve it for a real production system. Instead of simulating clicks, we’re going to act like the application itself. The TickTick web app is just a front-end making API calls to their back-end. Our job is to find the exact API call responsible for generating the backup and replicate it in our script.

The Process:

  1. Open TickTick in your browser and open the Developer Tools (F12). Go to the “Network” tab.
  2. Click the “Generate Backup” button in the UI.
  3. Watch the Network tab. You’ll see a new request fire off. It might be a POST request to an endpoint like /api/v1/backup/generate.
  4. Right-click that request and copy it as a cURL command. This gives you the endpoint, the method, the headers, and the authentication token/cookie.
  5. Now, you can take that cURL command and put it directly into a shell script running on a cron schedule on your server (let’s say `ci-runner-03`).

Your script would look something like this:


#!/bin/bash
# backup_ticktick.sh

# IMPORTANT: Your auth cookie will expire! You'll need a way to refresh it.
AUTH_COOKIE="your_long_session_cookie_copied_from_browser"
TIMESTAMP=$(date +"%Y-%m-%d")
OUTPUT_DIR="/mnt/backups/ticktick"
FILENAME="ticktick_backup_${TIMESTAMP}.zip"

curl -X POST 'https://api.ticktick.com/api/v1/backup/request' \
  -H "Cookie: t=${AUTH_COOKIE}" \
  -H "Content-Type: application/json" \
  --data-raw '{}' \
  -o "${OUTPUT_DIR}/${FILENAME}"

# Add logic here to check if the download was successful
echo "Backup saved to ${OUTPUT_DIR}/${FILENAME}"

Pro Tip: Authentication is the hard part. The session cookie you copy will eventually expire. A more robust solution involves scripting the login process itself to fetch a fresh cookie before making the backup API call. Never, ever hard-code credentials directly in a script. Use a secrets manager like HashiCorp Vault or AWS Secrets Manager.

Solution 3: The “IFTTT/Zapier” Sideways Approach

Sometimes, the best solution isn’t to brute-force the problem, but to come at it from a different angle. This isn’t a true point-in-time backup, but rather a continuous, event-driven log of your data. Many services like TickTick have integrations with automation platforms like IFTTT (If This Then That) or Zapier.

You can create an “applet” or “Zap” that says:

  • IF: A new task is created in TickTick.
  • THEN: Append a new row to a Google Sheet with the task details.

Or…

  • IF: A task is completed in TickTick.
  • THEN: Create a text file in a Dropbox folder with the task name and completion date.

This method doesn’t give you a perfect snapshot of your entire account at a specific time. You won’t get your tags, list structures, or custom filters. What you do get is a raw, real-time log of your activity that can be rebuilt or parsed if disaster strikes. It’s a different way of thinking about data resilience—not as a monolithic backup, but as a distributed, redundant event stream.

My final two cents? Start with Solution 2. It’s the most aligned with professional DevOps practices. It’s reliable, scriptable, and treats your personal data with the same respect we’d treat the config for `prod-db-01`. Your productivity system is your personal production environment; protect it accordingly.

Darian Vance - Lead Cloud Architect

Darian Vance

Lead Cloud Architect & DevOps Strategist

With over 12 years in system architecture and automation, Darian specializes in simplifying complex cloud infrastructures. An advocate for open-source solutions, he founded TechResolve to provide engineers with actionable, battle-tested troubleshooting guides and robust software alternatives.


🤖 Frequently Asked Questions

âť“ What are the primary methods for automating TickTick backups without an official API?

The primary methods include using headless browser automation (e.g., Puppeteer) to mimic manual UI actions, or reverse-engineering the web application’s internal API calls to directly trigger backup generation via cURL or similar tools.

âť“ How do the headless browser and reverse-engineered API solutions compare for TickTick backups?

The headless browser solution is quicker to implement but brittle, breaking with UI updates. The reverse-engineered API solution is more robust and efficient, treating the backup as a production system, but requires more technical expertise to identify endpoints and manage session authentication.

âť“ What is a common implementation pitfall when using reverse-engineered API calls for automated backups, and how is it solved?

A common pitfall is hard-coding session cookies, which eventually expire. The solution involves scripting the login process to fetch a fresh authentication cookie before making the backup API call and storing credentials securely using a secrets manager like HashiCorp Vault or AWS Secrets Manager.

Leave a Reply

Discover more from TechResolve - SaaS Troubleshooting & Software Alternatives

Subscribe now to keep reading and get access to the full archive.

Continue reading