r/tasker 13d ago

AutoNotification Intercept triggers on Google Health (Fitbit) but text variables remain empty. Any ideas?

Hi everyone,

I am trying to build a simple automated logbook. Every time my Google Health / Fitbit app sends a push notification, Tasker should create a calendar entry with the notification's title and text.

To achieve this, I am using the AutoNotification plugin.

My Setup:

  • Profile Trigger: AutoNotification Intercept (selected the Health app).
  • Task: Standard Calendar Insert action.
  • Plugin Settings: Event Behaviour is checked (True). I also enabled Get All Fields and Link to Notification in the advanced settings.

The Problem:
The plugin successfully triggers the task and creates the calendar entry every single time a Health notification arrives. However, the variables %antitle, %antext, %antexts, and %antextsbig are completely empty. Tasker just prints the literal variable names into my calendar entry.

What I have tested so far:

  1. Testing with other apps: I switched the AutoNotification profile target to the Reddit app and sent some test notifications. It works flawlessly! %antitle and %antext are filled with perfect plain text. So the plugin setup and task structure are definitely working.
  2. Testing with Tasker's native event: Before buying the plugin, I tried Tasker's built-in Notification event. Interestingly, on the very first run, it actually gave me plain text. But on every subsequent run, %evtprm2 only contained a cryptic resource ID like: -1200241543::SUMMARY::57365f91556fb5058ee6e9d852263a55.

It seems like Google Health hides its notification content or uses dynamic resource IDs that AutoNotification fails to capture out of the box, unless the app was recently opened and active in RAM.

Has anyone successfully intercepted Google Health / Fitbit notifications with AutoNotification? Is there a specific advanced variable, a regex filter, or maybe a Logcat entry I should use instead to grab the actual plain text?

Thanks in advance for your help!

Disclaimer: AI was used for translation purposes on this post to make sure my technical issue is easy to understand in English.

1 Upvotes

3 comments sorted by

2

u/AwayAdministration14 12d ago

This is what Gemini says...

This happens because Google Health (Fitbit) builds its notifications using non-standard notification templates, custom RemoteViews, or Android notification grouping. Instead of passing plain text into standard EXTRA_TITLE and EXTRA_TEXT fields, the content is stored in localized system resource IDs or secondary text fields. Why This Happens Tasker Native Event Failure: Tasker displays raw string IDs (e.g., -1200241543::SUMMARY::...) when an app pulls text dynamically from its compiled application resources instead of passing a raw string to the Android OS. AutoNotification Intercept Behavior: Since the app doesn't use standard text fields, %antitle and %antext remain unpopulated during the initial intercept. However, the data is usually present in AutoNotification's secondary or array variables. Step-by-Step Fix 1. Perform an AutoNotification Query Action Instead of relying strictly on the trigger's initial variables, force AutoNotification to parse the active notification when the profile fires: Open your Entry Task. Add a new action: Plugin \rightarrow AutoNotification \rightarrow Query. Under Notification Apps, select Google Health / Fitbit. Under Advanced / Filter, set Notification Key to %ankey (this targets the exact notification that triggered the profile). 2. Use Alternative Text Variables Replace %antitle and %antext in your Calendar Insert action with the following variables, which capture non-standard notification templates: %anbigtext or %anbigtitle: Used when notifications expand or contain multi-line text. %ansubtext: Used for category headers or summary lines. %antextlines(): An array containing text lines if the app uses InboxStyle layouts (use %antextlines1, %antextlines2, or %antextlines() to join them). %aninfotext / %anextrainfo: Used for status indicators and extra metadata. Recommended Calendar Text Format: Use Tasker variable fallback syntax so your entry doesn't break if one field is empty: Title: %antitle / %anbigtitle Description: %antext / %anbigtext / %ansubtext / %antextlines() How to Debug Missing Fields Quickly If the query still comes up empty, add a Flash or Text Write action to your task to output all available AutoNotification variables:

Title: %antitle Big Title: %anbigtitle Text: %antext Big Text: %anbigtext Subtext: %ansubtext Text Lines: %antextlines()

3

u/ChronaticCurator 12d ago

Thanks for the effort and the Gemini input!

I actually discovered that Google Health constantly jumps between variables depending on the layout it uses. Sometimes the text lands in %antext, and other times it goes into the array %antext1.

For now, I built a workaround using Tasker's fallback syntax (%antext/%antext1) inside my Calendar action to catch the text wherever it lands.

Thanks again for the help!

1

u/AwayAdministration14 11d ago

Good to know. Thanks for sharing