Automated GitHub Actions workflow that checks Jamf Pro computers for missing site assignments and sends notifications to Slack, Microsoft Teams, and/or Email.
- Fetches all computers from Jamf Pro using v3 API
- Retrieves hardware serial numbers from inventory
- Identifies computers without site assignments
- Sorts results by managed status (managed first, then unmanaged)
- Sends notifications to multiple platforms:
- Slack (with Block Kit formatting)
- Microsoft Teams (with markdown tables)
- Email (with HTML formatting)
- Automatic token management and refresh
- Runs on schedule or manually
- Uses OAuth2 for secure Jamf Pro authentication
- Log in to Jamf Pro
- Go to Settings → System → API Roles and Clients
- Click New under API Clients
- Configure the client:
- Display Name:
GitHub Site Checker - Enabled: Checked
- Privileges: Add the following permissions:
- Jamf Pro Server Objects → Computers → Read
- Jamf Pro Server Objects → Computer Inventory Collection → Read
- Display Name:
- Click Save
- Important: Copy the Client ID and Client Secret immediately (you won't see the secret again!)
- Go to https://api.slack.com/apps
- Click Create New App → From scratch
- Name it "Jamf Site Checker" and select your workspace
- Click Incoming Webhooks in the left sidebar
- Toggle Activate Incoming Webhooks to On
- Click Add New Webhook to Workspace
- Select the channel where you want notifications
- Copy the webhook URL (starts with
https://hooks.slack.com/services/...)
- In Teams, go to the channel where you want notifications
- Click ••• (More options) → Connectors (or Workflows in newer Teams)
- Search for Incoming Webhook
- Click Add or Configure
- Give it a name like "Jamf Site Alerts"
- Upload an icon (optional)
- Click Create
- Copy the webhook URL
- Enable 2-factor authentication on your Google account
- Go to https://myaccount.google.com/apppasswords
- Create an app password for "Mail"
- Note the 16-character password
- You'll use these settings:
- SMTP Server:
smtp.gmail.com - SMTP Port:
587 - SMTP Username: Your Gmail address
- SMTP Password: The app password you created
- SMTP Server:
Go to your repository → Settings → Secrets and variables → Actions
Click New repository secret and add the following:
| Secret Name | Example Value | Description |
|---|---|---|
JAMF_URL |
https://yourcompany.jamfcloud.com |
Your Jamf Pro URL (no trailing slash) |
JAMF_CLIENT_ID |
abc123def456... |
API Client ID from Jamf Pro |
JAMF_CLIENT_SECRET |
xyz789... |
API Client Secret from Jamf Pro |
| Secret Name | Example Value | Description |
|---|---|---|
SLACK_WEBHOOK_URL |
https://hooks.slack.com/services/T00/B00/XXX |
Slack incoming webhook URL |
| Secret Name | Example Value | Description |
|---|---|---|
TEAMS_WEBHOOK_URL |
https://outlook.office.com/webhook/... |
Teams incoming webhook URL |
| Secret Name | Example Value | Description |
|---|---|---|
NOTIFICATION_EMAIL |
admin@company.com |
Recipient email address |
SMTP_SERVER |
smtp.gmail.com |
SMTP server address |
SMTP_PORT |
587 |
SMTP port (usually 587 for TLS) |
SMTP_USERNAME |
notifications@company.com |
SMTP authentication username |
SMTP_PASSWORD |
your-app-password |
SMTP authentication password |
SENDER_EMAIL |
jamf-alerts@company.com |
From email address (optional) |
Note: You can configure one, two, or all three notification methods. The script will automatically detect which webhooks are configured and send to all available platforms.
The workflow runs automatically:
- 9 AM CST (3 PM UTC) - Monday through Friday
- 3 PM CST (9 PM UTC) - Monday through Friday
- Go to your repository on GitHub
- Click the Actions tab
- Select Check Jamf Computers for Missing Sites
- Click Run workflow (dropdown on the right)
- Select branch:
main - Click Run workflow (button)
Edit .github/workflows/check-jamf-sites.yml:
on:
schedule:
# 9 AM CST = 3 PM UTC (Monday-Friday)
- cron: '0 15 * * 1-5'
# 3 PM CST = 9 PM UTC (Monday-Friday)
- cron: '0 21 * * 1-5'
workflow_dispatch: