iOS Shortcuts for GitHub Actions and Apps Script: DIY vs a Dedicated App
Disclosure: I build Pocket Actions, one of the options below. Platform details come from Apple and GitHub documentation (linked) as of the last-checked date. Anything I couldn't confirm is marked unconfirmed.
The short answer
If you have one or two workflows and you're comfortable reading API docs, an iOS Shortcut is enough — it's free, and you can bind it to the Action button or Back Tap for a true one-tap trigger. A dedicated app starts to pay off when you have many workflows, workflows with inputs, Google Apps Script as well as GitHub, or you'd rather not paste a token into a shortcut.
The rest of this post shows how to build the Shortcut, then compares it honestly with GitHub Mobile and Pocket Actions.
What Shortcuts can do
Apple's Shortcuts User Guide lists the ways to run a shortcut: from the app, Siri, Control Center, the Action button, Back Tap, Home Screen widgets and icons, and Search. It also documents web API actions (such as Get Contents of URL) and JSON handling. In other words, a shortcut can be a button that sends an HTTP request.
Building a "run workflow" shortcut
GitHub's supported way to start a workflow from outside is the create a workflow dispatch event endpoint (REST docs):
POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches- Body:
ref(branch or tag, required) and optionalinputs(up to 25) - The workflow must declare
on: workflow_dispatch, and the file must exist on the default branch (events docs) - Auth: a classic PAT needs the
reposcope; a fine-grained PAT needs Actions: write (permissions table)
In Shortcuts:
- Add Get Contents of URL with the endpoint above.
- Set Method to POST. Add headers
Authorization: Bearer <token>andAccept: application/vnd.github+json. - Set Request Body to JSON with
refand aninputsdictionary. - For values that change, put Ask for Input first and pass the variables in.
The trade-off: the token lives inside the shortcut. Be careful when you share the shortcut or sync it. (How Shortcuts handles secrets on share/sync is unconfirmed here — check before sharing.)
Calling an Apps Script web app
Deploy the script as a web app and call its doGet/doPost URL with Get Contents of URL. That's simpler than the GitHub call. Two cautions: if the web app is accessible to anyone, anyone with the URL can run it, so treat the URL like a password; and Apps Script has limits such as 6 minutes per execution (quotas).
A complete GitHub Actions shortcut, action by action
The four steps above are the outline. Here's a full build you can follow on the phone, including a menu, a typed input and a readable result.
The workflow it will run
# .github/workflows/check.yml
name: Check
on:
workflow_dispatch:
inputs:
mode:
description: "quick or full"
type: choice
options: [quick, full]
default: quick
note:
description: "Free text"
type: string
required: false
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./check.sh "${{ inputs.mode }}" "${{ inputs.note }}"
Before building the shortcut, test the call once from a computer. A working curl request is much easier to copy than to debug inside Shortcuts:
curl -i -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/OWNER/REPO/actions/workflows/check.yml/dispatches \
-d '{"ref":"main","inputs":{"mode":"quick","note":"from curl"}}'
You want a 2xx status. Per GitHub's current REST docs, a successful workflow dispatch returns 200 with workflow_run_id, run_url and html_url (docs). Whether older API versions still return an empty 204 is unconfirmed, so treat any 2xx as success. Anything 4xx has a message in the body; see the table further down.
The shortcut
- Choose from Menu, prompt "Mode", items
quickandfull. Under each item, add a Text action containing the item name. After End Menu, the menu's output is that text. - Set Variable → name
mode, value = Menu Result. - Ask for Input → type Text, prompt "Note (optional)". Turn off "Allow Multiple Lines" if you want a one-line field.
- Set Variable →
note= Provided Input. - Dictionary → add key
mode(Text) = variablemode, keynote(Text) = variablenote. - Set Variable →
inputs= Dictionary. - Get Contents of URL:
- URL:
https://api.github.com/repos/OWNER/REPO/actions/workflows/check.yml/dispatches - Method: POST
- Headers:
Accept=application/vnd.github+json;Authorization=Bearerfollowed by your token - Request Body: JSON, with
ref(Text) =mainandinputs(Dictionary) = variableinputs
- URL:
- Get Dictionary Value → key
html_urlfrom Contents of URL. - If Dictionary Value has any value → Open URLs (Dictionary Value) to jump to the run. Otherwise → Show Result (Contents of URL), which shows GitHub's
messageon failure (or nothing, in the unconfirmed case of an empty 204 success). - Name the shortcut, pick an icon, and use Add to Home Screen (share sheet → Add to Home Screen).
Seeing the run afterwards
Step 9 opens the run page in Safari or GitHub Mobile, where you can watch logs. If you ever get an empty 204 instead (unconfirmed for current API versions), add a Wait (5 seconds) and a second Get Contents of URL:
GET https://api.github.com/repos/OWNER/REPO/actions/workflows/check.yml/runs?per_page=1
with the same headers, then read workflow_runs → item 1 → html_url (List workflow runs). If two runs start at almost the same moment, "the latest" might be the other one, so treat this fallback as a convenience, not proof.
A complete Apps Script shortcut
The script
function doGet(e) {
const p = e.parameter;
if (p.key !== PropertiesService.getScriptProperties().getProperty('SHARED_KEY')) {
return ContentService.createTextOutput(JSON.stringify({ ok: false, error: 'forbidden' }))
.setMimeType(ContentService.MimeType.JSON);
}
// your actual work here
SpreadsheetApp.openById('SHEET_ID').getSheetByName('log')
.appendRow([new Date(), p.task || 'default']);
return ContentService.createTextOutput(JSON.stringify({ ok: true, task: p.task }))
.setMimeType(ContentService.MimeType.JSON);
}
Deploy it: Deploy → New deployment → Web app, set "Execute as" and "Who has access", and copy the URL ending in /exec (web apps guide). Store SHARED_KEY in Project Settings → Script Properties.
The key check matters because "Anyone" access means anyone with the URL can run the script. A query-string secret isn't strong security (it can end up in logs and history), but it stops someone who only has the bare URL.
The shortcut
- Text →
https://script.google.com/macros/s/DEPLOYMENT_ID/exec?task=backup&key=YOUR_KEY - Get Contents of URL → Text (method GET).
- Get Dictionary from Input, then Get Dictionary Value for
ok. - If
okis1/true → Show Notification "Done". Otherwise → Show Result with the whole response.
Unlike some apps, a shortcut can read your script's JSON reply, so it can tell you whether the script reported a problem.
When it breaks: the usual causes
Scroll sideways to see the whole table
| What you see | Cause | Fix |
|---|---|---|
{"message":"Not Found"} | Token can't access the repo, or the path or file name is wrong. GitHub uses 404 for private resources you can't see (troubleshooting) | Check owner, repo and check.yml spelling, and the token's repository access |
{"message":"Bad credentials"} | Token expired or mistyped; missing Bearer prefix | Re-paste the token; keep the space after Bearer |
Workflow does not have 'workflow_dispatch' trigger | The YAML on ref lacks the trigger | Merge the workflow to that branch |
Unexpected inputs provided | A key in inputs isn't declared in the YAML | Make Dictionary keys match the YAML exactly |
| Booleans or numbers rejected | Shortcuts sent a Number/Boolean type | Use Text values in the Dictionary |
| Apps Script returns HTML instead of JSON | Web app requires sign-in, or an error page came back | Check "Who has access"; open the URL in Safari to read the error |
| Script edits have no effect | /exec serves the deployed version | Manage deployments → Edit → Version: New version (deployments) |
(Exact error message wording isn't documented; treat the quoted text as typical, unconfirmed.)
Maintenance: the hidden cost of DIY
Building the first shortcut takes a while. Keeping several working is the bigger cost:
- New input in the workflow → edit the menu, the dictionary and maybe the If logic in the shortcut.
- Token rotation → update every shortcut that embeds the token. A shared Text shortcut called by the others (with Run Shortcut) helps, but it's still manual.
- Renamed workflow file → update every URL.
- New Apps Script deployment → the
/execURL changes only if you create a new deployment instead of a new version of the existing one, so use new versions to keep the URL stable.
A dedicated app reads the workflow's inputs each time, so a new input shows up without rebuilding anything. That's the main thing you get for installing an app instead of using Shortcuts.
The dedicated-app route
Several iPhone apps can start a workflow_dispatch run (full list: GitHub Actions iPhone apps compared). Two worth comparing here:
- GitHub Mobile has run
workflow_dispatchworkflows from the Workflow view since July 2024 (changelog). Sign in, no token, logs included. No Apps Script. - Pocket Actions runs GitHub Actions workflows and Apps Script web apps in 1–3 taps, builds an input form from your workflow's
inputs, and keeps the PAT only in the device's secure storage.
Comparison
Scroll sideways to see the whole table
| iOS Shortcuts | GitHub Mobile | Pocket Actions | |
|---|---|---|---|
| Cost | Built in | Free | 5 runs/day, 17/week free; $2.99/mo or $49.99 lifetime |
| Run GitHub Actions | Yes, if you build the request | Yes, with inputs | Yes, form auto-generated |
| Run Apps Script | Yes, via web app URL | No | Yes |
| Taps | 1 (Action button, Back Tap, widget) | Repo → Actions → workflow → Run | 1–3 |
| Branch | Any — you set ref | Selectable | Always main |
| Inputs | Build prompts yourself | Form in app | Form auto-generated |
| Token storage | Inside the shortcut | None (GitHub sign-in) | Device secure storage only |
| Results / logs | Possible with extra API calls you build | Yes | No — confirms the request was accepted |
| Apps Script errors | You can check the response yourself | — | Shows success even if the script throws |
| Android | — | Yes | No (closed testing) |
Pros and cons
iOS Shortcuts — free and endlessly flexible; you can set any branch and even poll for run status. But you read the API docs, rebuild for every new workflow, hand-make input prompts, and keep a token in the shortcut. Suits one or two workflows and people who like tinkering.
GitHub Mobile — free, official, no token handling, logs and failure notifications. But it takes several screens to reach a workflow, and it doesn't touch Apps Script. A good fit if you want one app for everything GitHub.
Pocket Actions — one place for GitHub Actions and Apps Script, 1–3 taps, input forms built for you, no server and no Pocket Actions account. Honest downsides:
- runs always target
main; - Apps Script calls show "success" once accepted, even if your script errors — check the GAS execution log;
- no run results or logs in the app;
- iOS only (Android is in closed testing);
- the free tier is 5 runs a day / 17 a week;
- it's not no-code — you write the workflow or script (many people have AI write it).
Getting more out of a DIY shortcut
If you go the Shortcuts route, you get some launch options that no app button can match. Apple documents these ways to run a shortcut (Shortcuts User Guide):
- Siri: say the shortcut's name. Prompts such as Ask for Input are read out and can be answered by voice.
- Home Screen widget: a grid of shortcuts, each one tap.
- Action button (on models that have one) or Back Tap (Settings → Accessibility → Touch → Back Tap).
- Personal automations: run a shortcut at a time of day, when you arrive somewhere, or when you connect to a particular Wi-Fi network. Whether a given automation can run without asking for confirmation depends on the trigger type and iOS version (unconfirmed for each case here).
Combine them carefully. A Back Tap that starts a production deploy is a pocket accident waiting to happen, so keep risky workflows behind a confirmation. Add a Choose from Menu with "Run" and "Cancel", or gate the workflow itself with an environment that needs approval.
Which should you use?
- One or two workflows, comfortable with APIs: Shortcuts, bound to the Action button.
- GitHub only, want logs: GitHub Mobile.
- GitHub and Apps Script, or many workflows with inputs: Pocket Actions — and check results in GitHub Mobile or the GAS log.
A real example
I use Pocket Actions to run an automation that has AI evaluate stocks I'm curious about, only when I need it.
Try it
See whether it saves you building shortcuts — free for up to 5 runs a day.
View Pocket Actions on the App Store
FAQ
Can an iOS Shortcut trigger a GitHub Actions workflow?
Yes. POST to the workflow dispatch endpoint with a token, ref, and inputs using Get Contents of URL.
Which token should I put in a shortcut? GitHub recommends fine-grained PATs. Workflow dispatch needs Actions: write. Limit it to the repositories you need and set an expiration.
Can Shortcuts run Google Apps Script? Yes, by calling a deployed web app URL. If it's open to anyone, protect the URL.
Can Pocket Actions run a workflow on another branch?
No. Runs always use main.
Does Pocket Actions show Apps Script errors? No. It shows success once the call is accepted. Check the Apps Script execution log.
Related
- How to Trigger GitHub Actions from Your iPhone: 7 Options Compared
- How to Run Google Apps Script from Your Phone
- Run Your Automations from iPhone: Shortcuts vs Zapier, Make, IFTTT, n8n
- Pocket Actions changelog
Last checked: 2026-11-01 (Apple Shortcuts User Guide, GitHub Docs and Changelog, Apps Script docs).
