Source
yaml
id: google_sheet_to_airtable_sync
namespace: company.team
description: >
Syncs new or updated article pitch submissions from Google Sheets into
Airtable for editorial review assignment, using the title, author, and URL
captured in each row.
tasks:
- id: log_sheet_changes
type: io.kestra.plugin.core.log.Log
# Quick format check to confirm the trigger payload shape.
message: "Detected Google Sheet modifications: {{ trigger.modifications | json }}"
- id: create_airtable_record
type: io.kestra.plugin.airtable.records.Create
apiKey: "{{ secret('AIRTABLE_API_KEY') }}"
baseId: "{{ secret('AIRTABLE_BASE_ID') }}"
tableId: "Editorial Pitches"
typecast: true
# Expression paths here assume includeDetails:true exposes title/author/url at trigger.modifications[*].
# Adjust to match the actual trigger JSON shape from your sheet diff.
fields:
Title: "{{ trigger.modifications[0].title }}"
Author: "{{ trigger.modifications[0].author }}"
URL: "{{ trigger.modifications[0].url }}"
runIf: "{{ trigger.count > 0 }}"
triggers:
- id: watch_google_sheet
type: io.kestra.plugin.googleworkspace.sheets.SheetModifiedTrigger
interval: PT1H # Poll every 1 hour
spreadsheetId: "{{ secret('GOOGLE_SHEET_ID') }}" # Replace with your Google Sheet ID
serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT_JSON') }}" # Service account JSON key
on: CREATE_OR_UPDATE # Trigger on new revisions or updates
includeDetails: true # Fetch full sheet content to compute detailed diff
description: "Poll hourly for new or updated pitch rows to sync into Airtable."
sheetName: "Pitches" # Optional: Filter by specific sheet name
range: "A1:Z100" # Optional: Filter by specific range
stopAfter:
# Stop polling once the flow fails or is killed to avoid repeated retries.
- FAILED
- KILLED
About this blueprint
Business
Polls a Google Sheet that captures article pitches from a submission form, logs the detected changes, and creates records in the Airtable "Editorial Pitches" table for assignment and review. Runs hourly by default, relying on a Google service account and Airtable API key to map title, author, and URL fields from the sheet into Airtable.
More Related Blueprints