Postlad/Guides/Export ThingSpeak data to CSV and move the history to Postlad

Export ThingSpeak data to CSV and move the history to Postlad

ThingSpeak can export a channel's feed as CSV from its Data Import / Export tab. Postlad's importer recognises the created_at,entry_id,field1...field8 shape, preserves the timestamps, ignores the row-counter column and maps the numeric fields into a stream.

ThingSpeak CSV migration flowA ThingSpeak CSV is exported, previewed and mapped in Postlad before its timestamped readings are imported.feeds.csvcreated_atfield1…field8Previewcheck timestampsname fieldsPostlad
Nothing is committed until the preview and field mapping look right. Keep the original CSV as your source copy.

Before moving anything

Write down the channel's human field names and units. A standard ThingSpeak CSV contains machine headers such as field1 and field2; it does not necessarily carry the display label you remember from the dashboard.

Also record:

  • Which time zone you want in the export
  • Which fields are still meaningful
  • Whether status, latitude, longitude or elevation contain data you need elsewhere
  • The date range worth preserving
  • The device's current ThingSpeak update URL and API key, so you can change and roll back deliberately

Export first, then change the device. Keep the original CSV unchanged as your source copy.

Download the CSV from ThingSpeak

MathWorks' current documented route is:

  1. Sign in to ThingSpeak.
  2. Select Channels → My Channels.
  3. Open the channel.
  4. Select Data Import / Export.
  5. Choose the export time zone.
  6. Download the feed as CSV.

The exact filename is less important than its first row. A normal channel export resembles:

csv
created_at,entry_id,field1,field2,field3,status
2026-07-01 08:00:00 UTC,1,23.4,51.2,1008.6,bench
2026-07-01 08:00:15 UTC,2,23.5,51.0,1008.5,bench

Postlad imports numeric time-series fields. entry_id is a ThingSpeak row counter rather than a measurement, so it is deliberately left out. The current importer also does not turn status, latitude, longitude or elevation into numeric fields automatically.

Create the destination stream

Create a Postlad stream for the same device or location. Import into an empty stream when possible; that gives you a clean way to compare row counts and avoids combining two sources before you have checked the result.

Open the stream and choose bring history in from a CSV.

Preview and map the columns

Choose the downloaded CSV. The preview should identify it as a ThingSpeak channel export and propose:

CSV columnPostlad destination
created_atTimestamp
entry_idNot imported
field1f1
field2f2
......
field8f8

Postlad accepts up to 16 numeric fields, so a ThingSpeak channel fits without splitting. Check the preview values before continuing. A timestamp accidentally mapped as a measurement can produce a perfectly smooth but meaningless line.

Enter the human names and units you recorded earlier:

Postlad fieldExample nameExample unit
f1Temperature°C
f2Humidity%RH
f3PressurehPa

Choose Import this file only after the first eight preview rows look like your data.

What happens to old readings

Postlad stores imported history according to the destination plan's current retention window:

  • Readings from the newest 30 days on Free are kept at full detail.
  • Older accepted readings go directly into hourly minimum, maximum, average and last-value summaries.
  • Readings older than the Free plan's 12-month hourly window are refused rather than briefly accepted and then deleted.

This is why a six-month import does not create millions of old raw rows that the retention job immediately removes. The chart receives the same summary shape that live readings acquire as they age.

The Free plan has a separate lifetime import allowance of 2,000,000 readings. Imported rows do not consume the live-device monthly quota and are not paced through the device rate limiter. The current allowance is also shown on the import screen before you choose a file.

Large files

The browser keeps the file and sends it in slices. In the current implementation, each request accepts at most 8 MB and 10,000 rows; a 500,000-row channel therefore takes roughly 50 row-limited chunks plus finalisation work.

Keep the tab open until the completion screen appears. An abandoned import may keep its staging state for up to 24 hours, but the final UI must state whether and how it resumes before this guide can promise recovery.

Check the result before changing the device

After completion:

  1. Compare the imported first and last timestamps with the CSV.
  2. Open a 24-hour range and compare several exact readings.
  3. Open a 30-day or one-year range and confirm the shape and min/max envelope.
  4. Download a Postlad CSV for a small range and compare it with the source.
  5. Check the import receipt for accepted and skipped rows.

A skipped-row count of zero is easy to understand. A non-zero count needs an explanation before the old destination changes.

Do not import the same file twice. A second pass can count historical rows again and consumes more of the stream's lifetime import allowance.

Change the device endpoint

For a device already using ThingSpeak's GET format, the conceptual change is small:

text
Before: https://api.thingspeak.com/update?api_key=OLD_KEY&field1=23.4&field2=51.2
After:  http://api.postlad.com/u?k=YOUR_KEY&f1=23.4&f2=51.2

Three details matter:

  • api_key becomes k.
  • field1 becomes f1, through field16f16.
  • A successful Postlad write returns ok N; print and inspect it rather than discarding the response.

Update one device, watch several accepted points reach the imported stream, then leave the old service configured but inactive until you are satisfied with the result.

Time zones and timestamps

Choose UTC for the ThingSpeak export when you can. Explicit offsets and UTC timestamps are unambiguous. A date such as 2026-07-01 08:00:00 with no zone is interpreted as UTC by the current Postlad importer, which may shift a file you intended as local time.

Never “fix” timestamps by opening a large CSV in spreadsheet software and saving it casually. Spreadsheet applications can change date formats, decimal separators, leading zeros and line endings. Work on a copy and inspect the result as plain text.

Troubleshooting

Postlad does not recognise the file as ThingSpeak

Check that the header includes created_at and at least one field1field8 column. Some custom download scripts rename columns. A generic CSV can still be imported, but you must map its timestamp and numeric columns yourself.

Some rows are skipped

Common causes are missing timestamps, no numeric value in any mapped field, dates outside the plan's import window, or values that cannot be parsed as finite numbers. The completion report should count every skipped row rather than hiding it.

The oldest year is missing

Free hourly history extends to 12 months. Older rows are refused because they would fall outside the data that plan can display and retain. Narrow the export or choose a plan with a longer hourly window.

Field names came across as f1 and f2

The standard ThingSpeak CSV knows the columns as field1 and field2, not necessarily as the dashboard's human labels. Enter the names and units during preview or in stream settings afterwards.

Can I import status?

The current design imports numeric time-series fields. Postlad's device status value is latest-only and is not a historical field. Preserve important status history separately or convert a genuinely numeric status into one of the mapped fields before import.

FAQ

How do I export all data from ThingSpeak?

Open the channel's Data Import / Export tab, choose the time zone and download the CSV. Keep the untouched download as your archive before editing or importing it.

Does a ThingSpeak CSV include timestamps?

Yes. Standard channel exports include a created_at column. Postlad uses it as the measurement time rather than assigning the import time to every row.

Will importing history use my monthly quota?

The in-development importer uses a separate lifetime import allowance. On the current Free plan design that allowance is 2,000,000 readings; it does not consume the 100,000-reading live monthly quota.

Will old spikes survive the migration?

Within the retained window, old readings are folded into hourly minimum, maximum and average values. The chart draws the min/max envelope as well as the average, so a short spike is not represented by the average alone.

Should I delete the ThingSpeak channel after moving?

Not immediately. Keep the original CSV and old channel until you have compared timestamps, values and chart ranges. Data migration is one of the worst places to optimise for tidiness.

Create the destination stream

Create a free Postlad account and an empty destination stream. Wait for the importer screen to be marked live before following the migration steps in this draft.

Create your free account →

Sources and verification