Importing & Exporting with Google Sheets
Pro PlusEvents Manager I/O - GoogleRequires an Events Manager Pro Plus license. Compare plans
A Google Sheet works with Events Manager I/O the way a CSV or Excel file does, with one difference: I/O reads and writes the sheet directly in your Google account, so there is no file to download or upload. That makes a sheet a good shared source for a team: people edit the sheet, and a scheduled import carries their changes to your site.
Field mapping, date handling and the list of columns are the same as for other spreadsheets and are described in Spreadsheets. This page covers what is particular to Google Sheets.
Google OAuth credentials are uploaded and at least one Google account is connected. The sheet can be private. It only has to be one the connected account can open (and edit, for an export).
Point I/O at a sheet
In a Google Sheets import or export, the Import Source (or Export Source) has two parts: a menu of your connected accounts, and a text field for the sheet. The field accepts any of these:
| You enter | Which tab is used |
|---|---|
The sheet's full address, copied from your browser while the tab you want is open, for example https://docs.google.com/spreadsheets/d/1AbC.../edit#gid=12345678 | The tab named by gid in the address |
The spreadsheet's ID alone (the long part of the address after /d/) | The first tab |
The ID, a #, and a tab's number or name, for example 1AbC...#12345678 or 1AbC...#Events | That tab |
One import or export works with one tab. For several tabs, create one for each.
Import from a sheet
-
Make sure the first row of the tab holds column names, with one event per row below it.
-
Go to Events I/O then Import, click Add Import and choose Google Sheets.
-
Choose the account, enter the sheet as described above, set the other import settings and click Save and Preview.
-
On the Field Mapping tab, match the sheet's columns to event and location fields and click Save Field Mapping. See Map columns to fields.
-
Check the Preview & Import tab and import.
To have edits in the sheet reach your site without anyone opening wp-admin, give the import a Frequency and activate it. See Run an import on a schedule.
If the sheet will be imported more than once, add a column with a fixed ID for each row (a simple running number is enough, as long as it is never reused) and map it to Event Unique ID (Import Source). Then renaming or rescheduling an event in the sheet updates the event on your site. Without an ID column, a changed name or date looks like a new event and you get a duplicate.
If you add or rename columns later, open the import's Field Mapping tab and map the new columns, or they are ignored.
Export to a sheet
-
Create an empty tab for the export in a spreadsheet the connected account can edit.
-
Go to Events I/O then Export, click Add Export and choose Google Sheets.
-
Choose the account, enter the sheet, pick the Type and any filters, and click Save and Export.
-
Click Run Export in the notice.
The first run writes a header row followed by one row per event. The columns are the same as in a CSV or Excel export, listed in The columns in an export.
When you run the export again, the rows written earlier are updated with the events' current details, and events that are new since last time are added at the bottom. The export's History tab links each event to its row.
I/O remembers each event by the number of the row it was written to. If you sort the tab, or insert or delete rows above the data, the next run writes events over the wrong rows. To work with the data freely, reference it from a second tab and do your sorting and filtering there.
Values are written the way they would be if you typed them into the sheet, so Google formats dates and numbers according to the spreadsheet's locale.
Troubleshooting
"The Sheet URL or Sheet ID provided is not valid."
The text field doesn't contain something I/O recognizes as a sheet. Paste the whole address from your browser's address bar while the sheet is open.
"Invalid Sheet ID or name provided, we cannot find a Sheet with that ID or name in this spreadsheet."
The spreadsheet was found but the tab was not. The tab may have been deleted or renamed. Copy the address again with the right tab open.
"There was an error connecting to Google"
Google's own message follows. Most often the connected account doesn't have access to that spreadsheet (share it with the account), or the connection has expired (reconnect under Service Connections).