Skip to content
FlowWP logo
Menu

Connect Google Sheets

Create a Google service account, give FlowWP its key, and share each spreadsheet a workflow should write to.

Updated

FlowWP writes to Google Sheets through a service account: a Google account of its own, made for your site, that can open only the spreadsheets you share with it. You create it once in Google Cloud, give FlowWP its key, and share each spreadsheet a workflow should use. The same steps appear on the Connections page when you add a Google Sheets connection.

Google Sheets is part of FlowWP Pro. Add a row is on Personal and above; Find a row, Update a row and Add or update a row are on Business and above. See the Google Sheets integration for every step.

Set up the connection

  1. Go to console.cloud.google.com, signed in with your Google account, and choose a project at the top of the page, or create one. It costs nothing.
  2. Open APIs & Services → Library, search for Google Sheets API, and click Enable.
  3. Open IAM & Admin → Service Accounts and click Create service account. Give it a name such as FlowWP and click Done; it needs no roles.
  4. Click the new service account, open its Keys tab, and choose Add key → Create new key → JSON. A .json file downloads. If Google says key creation is disabled, your organisation’s policy blocks it: ask its admin, or use a project in a personal Google account.
  5. In WordPress, go to FlowWP → Connections → Google Sheets. Open the .json file in a text editor, copy everything in it, paste it into the box, and click Check and save.
  6. In each spreadsheet a workflow should use, click Share, add the service account’s email address (shown on the saved connection, with a Copy button) and choose Editor. A link anyone can view is not enough: it lets FlowWP read the sheet, not write to it.

The key is stored encrypted, like every connection, and is never shown again after you save it. See Connections for how connections are protected.

Using it in a workflow

  • Columns are named as in your sheet. Choose each column from the sheet’s header row and fill it with data from the workflow. A column the sheet doesn’t have is refused, and the error lists the ones it does have.
  • An empty tab needs no setting up. Point a step at an empty tab and the first row it adds writes the header row.
  • Updates only touch what you name. Updating a row changes only the columns you choose, so formulas and notes in the other columns stay as they are.
  • Form and order data is safe. A value that looks like a formula is written as text, so your sheet never runs what someone typed into a form.
  • Numbers stay numbers. Order totals add up whatever language your sheet is set to, and phone numbers keep their leading zero.
  • No duplicate rows. If Google is slow to answer, FlowWP doesn’t send the row again, so a timeout can’t add it twice.
  • Find, then branch. Find a row reports whether a row was found, so the steps after it can take different paths.

Start from a template

Three templates fill in the column names for you; on an empty tab, their first run writes the header row:

If it does not work

  • The step cannot write to the sheet. Check the spreadsheet is shared with the service account’s email address as Editor, not only through a view link.
  • A column is refused. The column name must match the sheet’s header row; the error lists the columns the sheet has.
  • Google will not create a key. Your organisation’s policy blocks key creation: ask its admin, or use a project in a personal Google account.