When done, you'll be able to do something like this:
IMPORTANT:
Start by following steps 1-7 here but use the Google Photos API instead.
To read photos from your photo album you should use the https://www.googleapis.com/auth/photoslibrary.readonly scope in step 5.
STEP 1 - MAKE API HTTP REQUEST
- Add an HTTP Request action
- Set the Method to POST and URL to https://photoslibrary.googleapis.com/v1/mediaItems:search as seen here.
- Set the request body to something like the following JSON:
You can make Google generate this JSON for you in this page. Basically make sure to include the content categories you need in the JSON above.Code (Text):{
"filters": {
"contentFilter": {
"includedContentCategories": [
"LANDSCAPES",
"CITYSCAPES",
"LANDMARKS",
"GARDENS",
"FLOWERS"
]
},
"mediaTypeFilter": {
"mediaTypes": [
"PHOTO"
]
}
},
"pageSize": 100
}
- Accept the action and go back to the action list
STEP 2 - READ RESULT IMAGES
This will make AutoTools get back an array of images from the result and put them in the %baseurl() array.
- Add an AutoTools JSON Read action to the task
- Set the Json field to %http_data
- Set the Fields to %baseurl()
STEP 3 - GET RANDOM IMAGE
This will make AutoTools pick a random value from the array and output it in the %randomurl variable
- Add an AutoTools Text action
- Set the Text to %baseurl()
- Set the Random Variable field to randomurl
STEP 4 - SET WALLPAPER FROM URL
You have to include the maximum width (2048) and height (1024) in the url. You can use any numbers you want but these seem to be enough for phone wallpapers
- Add an AutoTools Image action
- Set the Wallpaper field to %randomurl=w2048-h1024
Done! Now every time you run the task a new random wallpaper from your search will be set!
If you want you can create a profile that fires every 2 hours for example and runs this task so that the wallpaper is changed every 2 hours!
Set Wallpaper From Your Google Photos Library
Learn how to get an image based on certain criteria and set it as a wallpaper