Fetch Plugin Content

Retrieve parsed plugin JSON data for your own templates.

No matter how many customizations we add to native plugins, there will always be a good reason to change them. Instead of cluttering our interface and adding complexity for other users, TRMNL offers a "data only" mode for native plugins.

For more context on this feature, go here. For live examples, go here.

How it works

First, set up + hide an instance of the plugin you want to re-build yourself. This instructs TRMNL to sync and parse data on your behalf.

  1. Connect a native plugin, for example the Weather, Stock Prices, or any Calendar

  2. Note the plugin's integer ID in the URL (/plugin_settings/<id-here>)

  3. Navigate to Playlists and "hide" the native plugin that was automatically added by clicking the eyeball icon. This is important because only plugins on a live playlist will be refreshed. By hiding this native plugin, your Data Mode plugin (below) will always have fresh data.

Next, build a Private Plugin.

  1. Navigate to Plugins > Private Plugin, select "Polling" as the Strategy

  2. Input https://usetrmnl.com/api/plugin_settings/<id-here>/data as the Polling URL

  3. Input authorization=bearer <your-user-api-key> as the Polling Header*

*Find or generate a User API Key on your Account tab

Click save, then enter the Markup Editor.

Private Plugin > Edit Markup

Parsed data will appear inside a data node of the "Merge Variables" dropdown. You may need to click "Force Refresh" from the private plugin settings view to ensure data has been fetched.

Example - Google Calendar "data mode"

Markup Quickstart

If you only want to make small changes to the TRMNL native design, you can steal that markup here:

In the raw/GitHub option, note that native plugins leverage the ERB templating language, so markup <% variable %> references will need to be replaced with Liquid {{ variable }} and so forth.

In the /demo option, click the plugin you're rebuilding and all layouts will appear with sample data. If you've connected a plugin natively, your latest cached JSON will be embedded instead of demo data.

Another tip on the /demo option is to add ?data=true to the URL, for example https://usetrmnl.com/plugins/google_calendar?data=true to see how TRMNL combines your own JSON data with our native ERB markup. If you have multiple instances that you'd like to check out, also append &plugin_setting_id=<id-here> to render a specific plugin instance on the demo page.

Last updated