Google Drive

Estimated reading: 2 minutes

Overview

AFI uploads files and creates folders in Google Drive from WordPress form submissions. Use it to archive form attachments, generate per-submission folders, or organise uploaded contracts and screenshots into Drive automatically.

Supported actions

  • Upload File — uploads a file from a WordPress form attachment URL or arbitrary URL into a target folder.
  • Create Folder — creates a folder, optionally under a parent folder.

Authentication

  1. Go to Google Cloud Console and create or reuse a project.
  2. Enable the Google Drive API.
  3. Configure the OAuth consent screen and create an OAuth Client ID (Web Application).
  4. Add the redirect URI shown on AFI’s Google Drive settings tab.
  5. In AFI go to Settings > Google Drive, paste the Client ID and Client Secret, click Connect, and approve the OAuth prompt.

How to create the integration

  1. In WordPress admin, go to AFI > New Integration.
  2. Pick your Sender (Contact Form 7, WPForms, WooCommerce, etc.) and the form / event to listen on.
  3. Pick Google Drive as the Receiver, then pick the Task you want to run.
  4. Map sender fields onto Google Drive’s fields. File URL (publicly fetchable) + destination folder are required for uploads.
  5. Optional: add Conditional Logic so the action only fires on matching submissions.
  6. Save and run a test submission. Check AFI > Log if anything looks off.

Notes & caveats

  • File source must be public or behind a fetchable URL. AFI re-fetches from the URL on submission — private form-upload links work as long as WP’s upload directory is accessible.
  • Folder permissions: the OAuth-granting user owns uploaded files. Share the destination folder with the user explicitly or it’ll show up in My Drive.
  • Shared Drives (Team Drives): supply the shared-drive ID if uploading there; My Drive is the default otherwise.

Related