Skip to content

Tasker Integration

ZestSSH integrates with Tasker through Android broadcast intents. You can trigger SSH commands, snippets, batch operations, workflows, and connection checks from Tasker tasks, and receive the command output and exit code back in Tasker variables.

ZestSSH registers a broadcast receiver for five intent actions:

Intent ActionPurpose
com.affluentlabs.zestssh.CONNECTVerify a connection is reachable
com.affluentlabs.zestssh.EXECUTERun a shell command
com.affluentlabs.zestssh.SNIPPETRun a saved snippet
com.affluentlabs.zestssh.BATCHRun a command on multiple servers
com.affluentlabs.zestssh.WORKFLOWTrigger a saved workflow
  1. Open Tasker and create a new Task (or add an action to an existing one).
  2. Add action: System > Send Intent.
  3. Set the Action field to one of the intent actions above.
  4. Set Target to Broadcast Receiver.
  5. Add the required extras in the Extra fields (one per line, key=value format).
ExtraRequiredDescription
keyYesYour automation API key
connection_idYesConnection label or UUID
commandYesThe shell command to run
timeoutNoTimeout in seconds (default: 30)
grepNoFilter output to lines matching this pattern
headNoReturn only the first N lines
tailNoReturn only the last N lines
callbackNoHTTPS webhook URL to POST results to
ExtraRequiredDescription
keyYesYour automation API key
connection_idYesConnection label or UUID
snippet_nameYesName of the saved snippet
var_VARNAMENoVariable value (prefix var_ + variable name)

To pass snippet variables, prefix the variable name with var_. For example, if the snippet uses ${HOST}, add an extra var_HOST=example.com. The var_ prefix is stripped and the value replaces the {{HOST}} placeholder in the snippet command.

ExtraRequiredDescription
keyYesYour automation API key
connection_idsYesComma-separated connection labels or UUIDs
commandYesThe shell command to run on all connections
parallelNotrue (default) or false
timeoutNoTimeout in seconds (default: 30)
grepNoFilter output to matching lines
headNoFirst N lines
tailNoLast N lines
callbackNoHTTPS webhook URL
ExtraRequiredDescription
keyYesYour automation API key
workflow_nameYes*Name of the saved workflow (case-insensitive)
workflow_idYes*UUID of the workflow

*Provide either workflow_name or workflow_id (or both).

ExtraRequiredDescription
keyYesYour automation API key
connection_idYesConnection label or UUID

After ZestSSH processes the intent, it sends the result back to the calling app. In Tasker, you can read:

  • %stdout — the command output (or error message).
  • %exit_code — the exit code (0 for success, 1 for failure).

This enables Tasker to make conditional decisions based on the output. For example, you could trigger a notification only if %exit_code is non-zero, or parse %stdout to extract a value.

Task: Server Uptime Check
Action: Send Intent
Action: com.affluentlabs.zestssh.EXECUTE
Target: Broadcast Receiver
Extra: key=AbCdEfGhIjKlMnOpQrStUvWxYz0123456789AbCdEfGhIj
Extra: connection_id=production-web
Extra: command=uptime
Extra: timeout=15
Task: Deploy Staging
Action: Send Intent
Action: com.affluentlabs.zestssh.EXECUTE
Target: Broadcast Receiver
Extra: key=YOUR_API_KEY
Extra: connection_id=staging-server
Extra: command=cd /var/www/app && git pull origin develop
Extra: timeout=60
Task: Fleet Disk Check
Action: Send Intent
Action: com.affluentlabs.zestssh.BATCH
Target: Broadcast Receiver
Extra: key=YOUR_API_KEY
Extra: connection_ids=web1,web2,web3,db1
Extra: command=df -h / | tail -1
Extra: parallel=true
Task: Restart Docker Container
Action: Send Intent
Action: com.affluentlabs.zestssh.SNIPPET
Target: Broadcast Receiver
Extra: key=YOUR_API_KEY
Extra: connection_id=docker-host
Extra: snippet_name=Restart Container
Extra: var_DOCKER=nginx-proxy
Task: Full Deploy
Action: Send Intent
Action: com.affluentlabs.zestssh.WORKFLOW
Target: Broadcast Receiver
Extra: key=YOUR_API_KEY
Extra: workflow_name=Deploy Production

You can test intents from a computer using ADB by opening the deep link URL directly:

Terminal window
adb shell am start -a android.intent.action.VIEW \
-d "zestssh://execute?connection=prod-web&command=uptime&key=YOUR_API_KEY"

The Automation Wizard in ZestSSH generates ready-to-copy ADB commands for any automation you build.

Rather than constructing intents manually, use the built-in Automation Wizard:

  1. Navigate to Settings > Automation > Automation Wizard.
  2. Choose your action type (Execute, Snippet, Batch, Connect, Workflow).
  3. Select the connection(s) and configure the command or snippet.
  4. Optionally set output filters and a webhook URL.
  5. On the result screen, select an API key (or generate one) and copy the Tasker intent configuration.

The wizard generates the exact intent action and extras list ready to paste into Tasker.

  • Use Tasker profiles with time-based triggers to schedule regular health checks.
  • Combine with Tasker’s notification actions to get alerts when a command fails.
  • Use the grep filter to extract specific lines from verbose command output.
  • Set reasonable timeouts — Tasker may retry or mark the task as failed if ZestSSH does not respond in time.