# Tailscale

> Manage your Tailscale network: approve, rename, tag and remove devices, turn on subnet routes, manage users, invites and auth keys, and set DNS. Start a workflow when a device joins, waits for approval, goes offline or its key is about to expire.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/tailscale

## Actions

### Approve or revoke device

Approve a device that is waiting to join your tailnet, or revoke a device's approval so it loses access. Only matters when device approval is turned on.

**Inputs**

- Device (`device_id`, text, required): The device. Pick one, or give its ID (nodeId) from an earlier step.
- Decision (`decision`, text, required): Approve lets the device in; revoke shuts it out. One of: `approve`, `revoke` (Revoke approval).

**Outputs**

- `device` (object): The device

**Example output**

```json
{
  "device": {
    "addresses": [
      "100.87.74.78",
      "fd7a:115c:a1e0:ac82:4843:ca90:697d:c36e"
    ],
    "advertisedRoutes": [
      "10.0.0.0/16"
    ],
    "authorized": true,
    "blocksIncomingConnections": false,
    "clientVersion": "v1.80.0",
    "connectedToControl": false,
    "created": "2026-10-01T05:23:30Z",
    "enabledRoutes": [
      "10.0.0.0/16"
    ],
    "expires": "2027-03-30T04:44:05Z",
    "hostname": "pangolin",
    "id": "92960230385",
    "isEphemeral": false,
    "isExternal": false,
    "keyExpiryDisabled": false,
    "lastSeen": "2026-11-05T09:12:00Z",
    "name": "pangolin.tailfe8c.ts.net",
    "nodeId": "n292kg92CNTRL",
    "os": "linux",
    "sshEnabled": false,
    "tags": [
      "tag:server"
    ],
    "updateAvailable": false,
    "user": "amelie@example.com"
  }
}
```

### Change user role

Give a user another role, such as Admin or Member. The token's own user can't change their own role.

**Inputs**

- User (`tailscale_user_id`, text, required): The Tailscale user. Pick one, or give their ID from an earlier step.
- Role (`role`, text, required): The user's new role. One of: `member`, `admin`, `it-admin` (IT admin), `network-admin` (Network admin), `billing-admin` (Billing admin), `auditor`.

**Outputs**

- `user` (object): The user

**Example output**

```json
{
  "user": {
    "created": "2026-01-01T05:23:30Z",
    "currentlyConnected": true,
    "deviceCount": 2,
    "displayName": "Amelie Pangolin",
    "id": "uscwcTtzzo11DEVEL",
    "lastSeen": "2026-11-05T09:12:00Z",
    "loginName": "amelie@example.com",
    "profilePicUrl": "",
    "role": "admin",
    "status": "active",
    "tailnetId": "example.com",
    "type": "member"
  }
}
```

### Create auth key

Create an auth key that adds devices to your tailnet without anyone signing in on them, such as servers or build agents. The key is in the result once only, as 'secret'.

**Inputs**

- Description (`description`, text): What the key is for, up to 50 letters, digits, spaces and dashes.
- Reusable (`reusable`, true/false): Let the key add more than one device.
- Ephemeral (`ephemeral`, true/false): Remove devices added with the key automatically once they go offline.
- Pre-approved (`preauthorized`, true/false): Devices added with the key need no approval, even when device approval is on.
- Tags (`tags`, list): Tags every device added with the key gets.
- Expires after (days) (`expiry_days`, number): How long the key works, 1 to 90 days. Defaults to 90. From 1 to 90.

**Outputs**

- `key` (object): The new key's details
- `secret` (text): The key itself (tskey-auth-...), shown only once

**Example output**

```json
{
  "key": {
    "capabilities": {
      "devices": {
        "create": {
          "ephemeral": true,
          "preauthorized": true,
          "reusable": false,
          "tags": [
            "tag:ci"
          ]
        }
      }
    },
    "created": "2026-11-05T09:00:00Z",
    "description": "Lodol build agents",
    "expires": "2026-11-12T09:00:00Z",
    "expirySeconds": 604800,
    "id": "k123456CNTRL",
    "invalid": false,
    "keyType": "auth",
    "revoked": "",
    "scopes": [],
    "tags": [],
    "userId": "uscwcTtzzo11DEVEL"
  },
  "secret": "tskey-auth-kXXXXXCNTRL-XXXXXXXX"
}
```

### Expire device key

Expire a device's key now. The device is disconnected until someone signs in on it again.

**Inputs**

- Device (`device_id`, text, required): The device. Pick one, or give its ID (nodeId) from an earlier step.

**Outputs**

- `device_id` (text): The device
- `expired` (true/false): Always true once done

**Example output**

```json
{
  "device_id": "n292kg92CNTRL",
  "expired": true
}
```

### Get device

Get one device with every detail: its addresses, tags, routes, key expiry and when it was last online.

**Inputs**

- Device (`device_id`, text, required): The device. Pick one, or give its ID (nodeId) from an earlier step.

**Outputs**

- `device` (object): The device

**Example output**

```json
{
  "device": {
    "addresses": [
      "100.87.74.78",
      "fd7a:115c:a1e0:ac82:4843:ca90:697d:c36e"
    ],
    "advertisedRoutes": [
      "10.0.0.0/16"
    ],
    "authorized": true,
    "blocksIncomingConnections": false,
    "clientVersion": "v1.80.0",
    "connectedToControl": false,
    "created": "2026-10-01T05:23:30Z",
    "enabledRoutes": [
      "10.0.0.0/16"
    ],
    "expires": "2027-03-30T04:44:05Z",
    "hostname": "pangolin",
    "id": "92960230385",
    "isEphemeral": false,
    "isExternal": false,
    "keyExpiryDisabled": false,
    "lastSeen": "2026-11-05T09:12:00Z",
    "name": "pangolin.tailfe8c.ts.net",
    "nodeId": "n292kg92CNTRL",
    "os": "linux",
    "sshEnabled": false,
    "tags": [
      "tag:server"
    ],
    "updateAvailable": false,
    "user": "amelie@example.com"
  }
}
```

### Get DNS settings

Get your tailnet's nameservers, search domains and whether MagicDNS is on.

**Inputs**: None.

**Outputs**

- `magic_dns` (true/false): Whether MagicDNS is on
- `nameservers` (list): The global nameservers
- `search_paths` (list): The search domains

**Example output**

```json
{
  "magic_dns": true,
  "nameservers": [
    "1.1.1.1"
  ],
  "search_paths": [
    "corp.example.com"
  ]
}
```

### Get policy file

Get your tailnet policy file: its access rules, groups, tag owners and tests.

**Inputs**: None.

**Outputs**

- `etag` (text): Identifies this version; it changes with every edit
- `policy` (object): The policy file (acls, groups, tagOwners, tests)

**Example output**

```json
{
  "etag": "\"e0b2816b418\"",
  "policy": {
    "acls": [
      {
        "action": "accept",
        "dst": [
          "*:*"
        ],
        "src": [
          "*"
        ]
      }
    ],
    "tagOwners": {
      "tag:server": [
        "autogroup:admin"
      ]
    }
  }
}
```

### Invite user

Invite someone to join your tailnet with a role. Tailscale emails the invite when an address is given; the result also has a link to share.

**Inputs**

- Email (`email`, text): Who to email the invite to. Leave empty to only get a link, which anyone who has it can use.
- Role (`role`, text): The role they get when they join. Defaults to Member. One of: `member`, `admin`, `it-admin` (IT admin), `network-admin` (Network admin), `billing-admin` (Billing admin), `auditor`. Default: `member`.

**Outputs**

- `invite` (object): The invite

**Example output**

```json
{
  "invite": {
    "email": "jo@example.com",
    "id": "29214",
    "inviteUrl": "https://login.tailscale.com/uinv/abc123",
    "inviterId": 34567,
    "lastEmailSentAt": "2026-11-05T16:23:26Z",
    "role": "member",
    "tailnetId": 12345
  }
}
```

### List devices

List the devices in your tailnet, with their owner, addresses, tags, approval and when each was last online.

**Inputs**

- Tag (`tag`, text): Only devices with this tag, such as tag:server.
- Approval (`approval`, text): Only approved devices, or only those waiting. One of: `approved` (Approved only), `pending` (Waiting for approval only).
- Include every detail (`include_details`, true/false): Also return each device's subnet routes, posture and client details.

**Outputs**

- `count` (number): How many
- `devices` (list): The devices

**Example output**

```json
{
  "count": 1,
  "devices": [
    {
      "addresses": [
        "100.87.74.78",
        "fd7a:115c:a1e0:ac82:4843:ca90:697d:c36e"
      ],
      "advertisedRoutes": [
        "10.0.0.0/16"
      ],
      "authorized": true,
      "blocksIncomingConnections": false,
      "clientVersion": "v1.80.0",
      "connectedToControl": false,
      "created": "2026-10-01T05:23:30Z",
      "enabledRoutes": [
        "10.0.0.0/16"
      ],
      "expires": "2027-03-30T04:44:05Z",
      "hostname": "pangolin",
      "id": "92960230385",
      "isEphemeral": false,
      "isExternal": false,
      "keyExpiryDisabled": false,
      "lastSeen": "2026-11-05T09:12:00Z",
      "name": "pangolin.tailfe8c.ts.net",
      "nodeId": "n292kg92CNTRL",
      "os": "linux",
      "sshEnabled": false,
      "tags": [
        "tag:server"
      ],
      "updateAvailable": false,
      "user": "amelie@example.com"
    }
  ]
}
```

### List keys

List active auth keys and API access tokens, with what each is for and when it expires.

**Inputs**

- Everyone's keys (`include_all`, true/false): Include every key in the tailnet, not only the token owner's own.

**Outputs**

- `count` (number): How many
- `keys` (list): The keys

**Example output**

```json
{
  "count": 1,
  "keys": [
    {
      "capabilities": {
        "devices": {
          "create": {
            "ephemeral": true,
            "preauthorized": true,
            "reusable": false,
            "tags": [
              "tag:ci"
            ]
          }
        }
      },
      "created": "2026-11-05T09:00:00Z",
      "description": "Lodol build agents",
      "expires": "2026-11-12T09:00:00Z",
      "expirySeconds": 604800,
      "id": "k123456CNTRL",
      "invalid": false,
      "keyType": "auth",
      "revoked": "",
      "scopes": [],
      "tags": [],
      "userId": "uscwcTtzzo11DEVEL"
    }
  ]
}
```

### List users

List the people in your tailnet with their role, status, device count and when they were last seen.

**Inputs**

- Who (`user_type`, text): Members, people devices are shared with, or both. Defaults to members. One of: `member` (Members (default)), `shared` (People devices are shared with), `all` (Both). Default: `member`.
- Role (`role`, text): Only people with this role. Defaults to any role. One of: `all` (Any role (default)), `owner`, `admin`, `it-admin` (IT admin), `network-admin` (Network admin), `billing-admin` (Billing admin), `auditor`, `member`. Default: `all`.

**Outputs**

- `count` (number): How many
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "users": [
    {
      "created": "2026-01-01T05:23:30Z",
      "currentlyConnected": true,
      "deviceCount": 2,
      "displayName": "Amelie Pangolin",
      "id": "uscwcTtzzo11DEVEL",
      "lastSeen": "2026-11-05T09:12:00Z",
      "loginName": "amelie@example.com",
      "profilePicUrl": "",
      "role": "member",
      "status": "active",
      "tailnetId": "example.com",
      "type": "member"
    }
  ]
}
```

### Remove device

Remove a device from your tailnet. It has to be added again to reconnect.

**Inputs**

- Device (`device_id`, text, required): The device. Pick one, or give its ID (nodeId) from an earlier step.

**Outputs**

- `deleted` (true/false): Always true once done
- `device_id` (text): The device removed

**Example output**

```json
{
  "deleted": true,
  "device_id": "n292kg92CNTRL"
}
```

### Rename device

Give a device a new name in your tailnet. Its MagicDNS name changes at once, so links using the old name stop working.

**Inputs**

- Device (`device_id`, text, required): The device. Pick one, or give its ID (nodeId) from an earlier step.
- New name (`name`, text, required): Letters, digits and dashes, such as web-server-1.

**Outputs**

- `device` (object): The device

**Example output**

```json
{
  "device": {
    "addresses": [
      "100.87.74.78",
      "fd7a:115c:a1e0:ac82:4843:ca90:697d:c36e"
    ],
    "advertisedRoutes": [
      "10.0.0.0/16"
    ],
    "authorized": true,
    "blocksIncomingConnections": false,
    "clientVersion": "v1.80.0",
    "connectedToControl": false,
    "created": "2026-10-01T05:23:30Z",
    "enabledRoutes": [
      "10.0.0.0/16"
    ],
    "expires": "2027-03-30T04:44:05Z",
    "hostname": "web-server-1",
    "id": "92960230385",
    "isEphemeral": false,
    "isExternal": false,
    "keyExpiryDisabled": false,
    "lastSeen": "2026-11-05T09:12:00Z",
    "name": "pangolin.tailfe8c.ts.net",
    "nodeId": "n292kg92CNTRL",
    "os": "linux",
    "sshEnabled": false,
    "tags": [
      "tag:server"
    ],
    "updateAvailable": false,
    "user": "amelie@example.com"
  }
}
```

### Revoke key

Revoke an auth key or access token so it stops working. Devices already added with an auth key stay connected.

**Inputs**

- Key (`key_id`, text, required): The key. Pick one, or give its ID from an earlier step.

**Outputs**

- `deleted` (true/false): Always true once done
- `key_id` (text): The key revoked

**Example output**

```json
{
  "deleted": true,
  "key_id": "k123456CNTRL"
}
```

### Set device subnet routes

Turn on (or off) subnet routes a device offers, such as 192.168.1.0/24, or 0.0.0.0/0 and ::/0 to use it as an exit node. A route works only once the device offers it too.

**Inputs**

- Device (`device_id`, text, required): The device. Pick one, or give its ID (nodeId) from an earlier step.
- Routes (`routes`, list, required): Subnets such as 192.168.1.0/24, one per entry or separated by commas.
- How (`mode`, text): Add to the routes already set, remove from them, or replace them all. Defaults to add. One of: `add` (Add to the current list), `remove` (Remove from the current list), `replace` (Replace the whole list). Default: `add`.

**Outputs**

- `advertised_routes` (list): The routes the device offers
- `changed` (true/false): False if the list was already that way, so nothing was sent
- `enabled_routes` (list): The routes turned on now

**Example output**

```json
{
  "advertised_routes": [
    "10.0.0.0/16"
  ],
  "changed": true,
  "enabled_routes": [
    "10.0.0.0/16"
  ]
}
```

### Set device tags

Add tags to a device, remove them, or replace them all. A tagged device belongs to its tags rather than to a person, and the policy file decides what each tag can reach.

**Inputs**

- Device (`device_id`, text, required): The device. Pick one, or give its ID (nodeId) from an earlier step.
- Tags (`tags`, list, required): Tags such as tag:server. A tag must have an owner in the tailnet policy file before a device can carry it.
- How (`mode`, text): Add to the tags already set, remove from them, or replace them all. Defaults to add. One of: `add` (Add to the current list), `remove` (Remove from the current list), `replace` (Replace the whole list). Default: `add`.

**Outputs**

- `changed` (true/false): False if the list was already that way, so nothing was sent
- `device` (object): The device, as it is now
- `tags` (list): The device's tags now

**Example output**

```json
{
  "changed": true,
  "device": {
    "addresses": [
      "100.87.74.78",
      "fd7a:115c:a1e0:ac82:4843:ca90:697d:c36e"
    ],
    "advertisedRoutes": [
      "10.0.0.0/16"
    ],
    "authorized": true,
    "blocksIncomingConnections": false,
    "clientVersion": "v1.80.0",
    "connectedToControl": false,
    "created": "2026-10-01T05:23:30Z",
    "enabledRoutes": [
      "10.0.0.0/16"
    ],
    "expires": "2027-03-30T04:44:05Z",
    "hostname": "pangolin",
    "id": "92960230385",
    "isEphemeral": false,
    "isExternal": false,
    "keyExpiryDisabled": false,
    "lastSeen": "2026-11-05T09:12:00Z",
    "name": "pangolin.tailfe8c.ts.net",
    "nodeId": "n292kg92CNTRL",
    "os": "linux",
    "sshEnabled": false,
    "tags": [
      "tag:server"
    ],
    "updateAvailable": false,
    "user": "amelie@example.com"
  },
  "tags": [
    "tag:server"
  ]
}
```

### Set DNS nameservers

Add, remove or replace the nameservers every device in your tailnet uses. Removing them all turns MagicDNS off.

**Inputs**

- Nameservers (`nameservers`, list, required): IP addresses such as 1.1.1.1, one per entry or separated by commas.
- How (`mode`, text): Add to the nameservers already set, remove from them, or replace them all. Defaults to add. One of: `add` (Add to the current list), `remove` (Remove from the current list), `replace` (Replace the whole list). Default: `add`.

**Outputs**

- `changed` (true/false): False if the list was already that way, so nothing was sent
- `magic_dns` (true/false): Whether MagicDNS is on
- `nameservers` (list): The nameservers now

**Example output**

```json
{
  "changed": true,
  "magic_dns": true,
  "nameservers": [
    "1.1.1.1"
  ]
}
```

### Suspend or restore user

Suspend a user, so they and their devices lose access to the tailnet, or restore a suspended user.

**Inputs**

- User (`tailscale_user_id`, text, required): The Tailscale user. Pick one, or give their ID from an earlier step.
- Suspend or restore (`access`, text, required): Suspend cuts off access; restore gives it back. One of: `suspend`, `restore`.

**Outputs**

- `user` (object): The user

**Example output**

```json
{
  "user": {
    "created": "2026-01-01T05:23:30Z",
    "currentlyConnected": true,
    "deviceCount": 2,
    "displayName": "Amelie Pangolin",
    "id": "uscwcTtzzo11DEVEL",
    "lastSeen": "2026-11-05T09:12:00Z",
    "loginName": "amelie@example.com",
    "profilePicUrl": "",
    "role": "member",
    "status": "suspended",
    "tailnetId": "example.com",
    "type": "member"
  }
}
```

### Turn device key expiry off or on

Turn off a device's key expiry, so it never has to sign in again (for servers), or turn it back on.

**Inputs**

- Device (`device_id`, text, required): The device. Pick one, or give its ID (nodeId) from an earlier step.
- Turn key expiry off (`key_expiry_disabled`, true/false, required): On: the device's key never expires. Off: it expires on its original date again.

**Outputs**

- `device` (object): The device

**Example output**

```json
{
  "device": {
    "addresses": [
      "100.87.74.78",
      "fd7a:115c:a1e0:ac82:4843:ca90:697d:c36e"
    ],
    "advertisedRoutes": [
      "10.0.0.0/16"
    ],
    "authorized": true,
    "blocksIncomingConnections": false,
    "clientVersion": "v1.80.0",
    "connectedToControl": false,
    "created": "2026-10-01T05:23:30Z",
    "enabledRoutes": [
      "10.0.0.0/16"
    ],
    "expires": "2027-03-30T04:44:05Z",
    "hostname": "pangolin",
    "id": "92960230385",
    "isEphemeral": false,
    "isExternal": false,
    "keyExpiryDisabled": true,
    "lastSeen": "2026-11-05T09:12:00Z",
    "name": "pangolin.tailfe8c.ts.net",
    "nodeId": "n292kg92CNTRL",
    "os": "linux",
    "sshEnabled": false,
    "tags": [
      "tag:server"
    ],
    "updateAvailable": false,
    "user": "amelie@example.com"
  }
}
```

### Withdraw invite

Withdraw an invite nobody has accepted yet, so its link stops working.

**Inputs**

- Invite (`invite_id`, text, required): The invite. Pick one, or give its ID from 'Invite user'.

**Outputs**

- `deleted` (true/false): Always true once done
- `invite_id` (text): The invite withdrawn

**Example output**

```json
{
  "deleted": true,
  "invite_id": "29214"
}
```
