Add permission to Google Drive folder after order completed in WooCommerce

:bullseye: What is your goal?

When a customer purchases a specific digital product in WooCommerce (for example a Google Maps card), and the order status becomes paid/completed, I want Make to automatically:

Detect which product was purchased

Retrieve the customer’s email address

Add that email address as a viewer (read access) to a specific Google Drive folder linked to that product

Each product should grant access to its own corresponding Drive folder.

Could someone explain the best way to build this scenario step by step (including how to handle multiple products cleanly)?

:thinking: What is the problem?

Problem is missing the details which filters are needed for this.
I need step by step guidance how to finish this flow

:test_tube: What have you tried so far?

WooCommerce is connected via REST API
Google Drive is connected.
Module WooCommerce is added with status Completed
Iterator in between with Line Items

:link: Create public scenario page

https://eu1.make.com/public/shared-scenario/wJvHQAApvWu/integration-woo-commerce

Hi @Pim_Rozendaal Thank you for your sharing it—it looks good overall. I’ve made a few adjustments to improve scalability and maintainability:

  • Router Added: Each product now has its own path. You can easily duplicate a path and add filters for additional products in the future.

  • Dynamic Folder ID: If the folder ID is stored in the product metadata, use the Get Map function to retrieve it dynamically the Folder ID linked with that product.

  • Sharing Folder: Use the Google Drive Share module to grant the customer read-only access to the appropriate folder based on the purchased product.

I’ve attached the updated version of the scenario—you can use it as a template going forward.

Thank you!

Thanks! But I went bit further. I only got now the error 400 (failedPrecondition): Precondition check failed. on the Gmail module and I cant see why.

The order is taken from WooCommerce. The data is written in my spreadsheet.
But I dont see an email and no permissions are added.

This while all checkboxes are green when I do a run.

Anyone advise?