Troubleshoot Action with Google Cloud Function

Knowledge Drop

Last tested: Jun 25, 2020
 

Problem

The user is trying to set up an action that update(write-back) data on BigQuery from Looks per this doc. However, they are getting this error: The form was not accepted.

  • Go to the trigger page of the action in cloud function - the URL should be there. If you click this what does you see when that browser pops up. It might be that your action is not accessible by looker
  • If you see this: Error: Forbidden Your client does not have permission to get URL /Looker_action_test from this server

SOLUTION:

  • You might need to add the cloud functions invoke permission. You can test this by going to the cloud functions page, ticking the box beside their action and then info panel on the right hand side click to add members and select all_users, then the role cloud functions > cloud functions invoker This will make it public, but it will help us test if this is the issue

Screenshot 2020-06-15 at 14.27.50.png

  • In case this is the issue you will either need to keep it public or manually grant the permissions so that users can invoke this

Note: it mentions in the article at the end "Right now, this function is open to the internet, so anyone with your Cloud Function URL can write data to your BigQuery instance. Consider adding in some checks/validation that the request is coming from Looker." So you could use the user_attributes in their action to help prevent non-looker users from writing to bigquery by adding a check in the script for the value of the user_attribute you select

This content is subject to limited support.                

Version history
Last update:
‎07-07-2021 01:15 PM
Updated by: