First, connect YouTube Analytics in Services. Then open Actions → + → YouTube Analytics and choose Run a Report.
More about this action
For what the other reports don't cover — views by country, by device, by traffic source, month by month. Each row is keyed by the dimension and metric names chosen: rows[0].views. Revenue metrics need a Partner Program channel.
Open an input to choose its value. Keep a fixed value with Text, receive it from Shortcuts, ask when the action runs, or use an Earlier Step. Read how input sources work.
Metrics
RequiredList
One or more numbers to report.
A list of choice values. Use a comma-separated list.
In the action editor, open Output → Returned Value to choose fields for your shortcut. These are the response fields described by the app; a service may omit an optional field or return an empty list. JSON File contains the full response.
Returned field
Type
Meaning
rows
array
A row per value of Split By, keyed by the names chosen.
Permissions declared for this action:https://www.googleapis.com/auth/youtube.readonly, https://www.googleapis.com/auth/yt-analytics.readonly. The account’s own access rules also apply.