# Reserve approved customer subdomains from Google Sheets

Create a CNAME for each approved customer request. Write the outcome back to the same row so your team can see when a name is already in use.

[Use template](https://dashboard.fasthook.io/workflow/new?templateKey=google-sheets-customer-subdomains-to-cloudflare-dns&templateName=Reserve+approved+customer+subdomains+from+Google+Sheets)

**Required accounts**

- Google Sheets
- Cloudflare DNS

## Reserve approved customer subdomains from Google Sheets

### 1. Trigger · New Row Added

**Google Sheets**. Emit an event each time rows are added to the bottom of a spreadsheet.

### 2. Action · Reserve the requested alias

**Cloudflare DNS**. Create a CNAME under the selected parent domain and report a conflict when the requested name is occupied.

### 3. Action · Write the outcome to the request row

**Google Sheets**. Call any Google Sheets API v4 operation with the connected account.

## Set up your workflow

1. **Prepare the approval tab** Create a tab named Approved with Hostname, Target, Approved and Result in columns A through D. Use fully qualified domain names and append completed rows with Yes in column C.
2. **Choose the allowed parent** Select the spreadsheet, the Approved tab, the Cloudflare zone and the parent domain for new customer names. Grant the Sheets connection write access for column D.
3. **Check both outcomes** Activate the workflow, allow its first poll to finish and append a new approved row. Repeat with an occupied name pointing elsewhere. Column D should show created or conflict, respectively.

## Related integrations

- [Google Sheets integrations](https://www.fasthook.io/apps/google-sheets/integrations)
- [Cloudflare DNS integrations](https://www.fasthook.io/apps/cloudflare-dns/integrations)
