This Custom Action performs bulk actions on content, leveraging the Looker API and the System Activity model. It will enable you to select various actions (e.g. Favorite / Unfavorite, Copy / Move to Space, Archive / Restore from Trash, Run Scheduled Plan) on a list of content IDs. This may be handy when you want to:
- Archive all content that uses a specific model
- Move all content to a space that was created by a specific users
- Assign favorite content to a given user
- Rerun all scheduled plans that have failed
- Use any Explore to filter to a list of content IDs
- Send or schedule the data to Custom Action
- Select the action you want to execute and the content type (Dashboard, Look, or Schedule). Enter the column name which should be used as the content ID (e.g.
dashboard.id
orlook.id
orscheduled_plan.id
) and the variable ID if required.
This action was built using the Serverless framework. It was deployed as a Google Cloud Function, however any of providers listed here should work. Check the serverless.yml reference pages to know what parameters to tweak.
Before starting the steps below, ensure you have Serverless installed and Google Cloud credentials set up.
- Rename
serverless_example.yml
toserverless.yml
- Set the provider details:
region
- region to deploy function, e.g. europe-west1project
- the name of your google cloud projectcredentials
- the path to gcf json credentials file, e.g. ~/PATH/TO/GCF_CREDENTIALS.json
- Set the envirnment variables, refer to Looker SDK docs for guidance on SDK variables:
EXPECTED_LOOKER_SECRET_TOKEN
- can be any random string. This will be used as an auth token set in /admin/actionsACTION_NAME
- unique name for the action, e.g. looker-content-managerACTION_LABEL
- human-readable label to appear in Looker, e.g. Looker Content ManagerCALLBACK_URL_PREFIX
- specify before deploying, e.g. https://REGION_NAME-YOUR_PROJECT_NAME.cloudfunctions.netLOOKERSDK_API_VERSION
- use "3.1"LOOKERSDK_BASE_URL
- base url for Looker instance, e.g. https://MY_LOOKER.com:19999LOOKERSDK_CLIENT_ID
- API3 credentials client_idLOOKERSDK_CLIENT_SECRET
- API3 credentials client_secretLOOKERSDK_VERIFY_SSL
- set to false if testing against self-signed certs
- Run
serverless deploy
- In Looker
- Add the
action_list
endpoint to the /admin/actions page - Enter the expected secret token
- Enable the action
- Add the