Add Switchboard opt outs to Google Sheets each day
Keeps a running suppression list. Each day this Zap exports yesterday's Switchboard opt outs and adds them as Google Sheets rows.
Workflow preview:
Overview
Instead of manually exporting opt outs from your Switchboard Organization(s), use this Zap template to automatically append yesterday's opt outs to an existing Google Sheet, which you can then use for suppressions in other tools.
What you'll need
- A Switchboard API Key with access to the organization whose opt outs you want to export
- A Google account with edit access to the destination spreadsheet
- A destination Google Sheet with the right headers. Make a copy of this template sheet and point the Zap at your copy.
How it works
- Schedule by Zapier triggers the Zap once a day. 2-3. Formatter builds yesterday's and today's dates in YYYY-MM-DD.
- Switchboard starts an Export Opt Outs job for that date range.
- Delay waits two minutes for the export to finish.
- Switchboard polls the job until it reports COMPLETED and returns a download link.
- Code by Zapier downloads the CSV and turns each row into a record.
- Google Sheets appends one row per opt out.
A note on the date range
Switchboard's Ending Date is exclusive: it stops at midnight of the date you give it. Yesterday to today therefore covers exactly yesterday, with no gaps and no overlap between runs. If you widen the window to include today, consecutive runs will cover the same hours twice and you will get duplicate rows.
If the sheet stays empty
Most often there simply were no opt outs in that window, which is normal for a quiet day. Check the Find Job step's output to confirm the export completed, then look at the Code step. If it returned nothing, the CSV had no data rows and the Google Sheets step was correctly skipped.
Optional changes
- Adjust the time of day in step 1.
- Point step 8 at your own spreadsheet and worksheet.
- The van_id column is left unmapped. Map it in step 8 if your export includes NGPVAN IDs.