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.
Intent Actions
Section titled “Intent Actions”ZestSSH registers a broadcast receiver for five intent actions:
| Intent Action | Purpose |
|---|---|
com.affluentlabs.zestssh.CONNECT | Verify a connection is reachable |
com.affluentlabs.zestssh.EXECUTE | Run a shell command |
com.affluentlabs.zestssh.SNIPPET | Run a saved snippet |
com.affluentlabs.zestssh.BATCH | Run a command on multiple servers |
com.affluentlabs.zestssh.WORKFLOW | Trigger a saved workflow |
Setting Up in Tasker
Section titled “Setting Up in Tasker”- Open Tasker and create a new Task (or add an action to an existing one).
- Add action: System > Send Intent.
- Set the Action field to one of the intent actions above.
- Set Target to Broadcast Receiver.
- Add the required extras in the Extra fields (one per line,
key=valueformat).
Intent Extras
Section titled “Intent Extras”EXECUTE
Section titled “EXECUTE”| Extra | Required | Description |
|---|---|---|
key | Yes | Your automation API key |
connection_id | Yes | Connection label or UUID |
command | Yes | The shell command to run |
timeout | No | Timeout in seconds (default: 30) |
grep | No | Filter output to lines matching this pattern |
head | No | Return only the first N lines |
tail | No | Return only the last N lines |
callback | No | HTTPS webhook URL to POST results to |
SNIPPET
Section titled “SNIPPET”| Extra | Required | Description |
|---|---|---|
key | Yes | Your automation API key |
connection_id | Yes | Connection label or UUID |
snippet_name | Yes | Name of the saved snippet |
var_VARNAME | No | Variable 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.
| Extra | Required | Description |
|---|---|---|
key | Yes | Your automation API key |
connection_ids | Yes | Comma-separated connection labels or UUIDs |
command | Yes | The shell command to run on all connections |
parallel | No | true (default) or false |
timeout | No | Timeout in seconds (default: 30) |
grep | No | Filter output to matching lines |
head | No | First N lines |
tail | No | Last N lines |
callback | No | HTTPS webhook URL |
WORKFLOW
Section titled “WORKFLOW”| Extra | Required | Description |
|---|---|---|
key | Yes | Your automation API key |
workflow_name | Yes* | Name of the saved workflow (case-insensitive) |
workflow_id | Yes* | UUID of the workflow |
*Provide either workflow_name or workflow_id (or both).
CONNECT
Section titled “CONNECT”| Extra | Required | Description |
|---|---|---|
key | Yes | Your automation API key |
connection_id | Yes | Connection label or UUID |
Result Return
Section titled “Result Return”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 (0for success,1for 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.
Examples
Section titled “Examples”Check server uptime on schedule
Section titled “Check server uptime on schedule”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=15Deploy with git pull
Section titled “Deploy with git pull”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=60Check disk usage across multiple servers
Section titled “Check disk usage across multiple servers”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=trueRun a snippet with a variable
Section titled “Run a snippet with a variable”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-proxyTrigger a deployment workflow
Section titled “Trigger a deployment workflow”Task: Full Deploy Action: Send Intent Action: com.affluentlabs.zestssh.WORKFLOW Target: Broadcast Receiver Extra: key=YOUR_API_KEY Extra: workflow_name=Deploy ProductionADB Testing
Section titled “ADB Testing”You can test intents from a computer using ADB by opening the deep link URL directly:
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.
Using the Automation Wizard
Section titled “Using the Automation Wizard”Rather than constructing intents manually, use the built-in Automation Wizard:
- Navigate to Settings > Automation > Automation Wizard.
- Choose your action type (Execute, Snippet, Batch, Connect, Workflow).
- Select the connection(s) and configure the command or snippet.
- Optionally set output filters and a webhook URL.
- 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
grepfilter 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.