Starting in farmerswife version 6.7 you may optionally configure the Google Invites Connector to use your own google business domain.
This feature requires the use of a professional Google Account in order to configure the following steps, and it requires a "Super Admin" Google Permission level, in order to get access to the following areas within the Google environment.
This offers 2 primary benefits:
1. Invites will now show as being from your own organization instead of a generic domain.
2. Limits on the number of invites will most likely no longer be an issue since invites on the same domain (a.k.a. internal to your organization) no longer count against the limit and only invites sent from your own server will be counted against the cap, instead of across all farmerswife systems.
NOTE: This article is intended only for configuring the connector to use your own domain for generating invites, information on setting up the "default" Google Invites integration can be found here.
TABLE OF CONTENTS
IMPORTANT:
Before you get started, ensure your Google user has a "Super Admin" Google Permission level!
Section 1 - Configuring the Google Workspace
You need to generate 5 values to be placed inside of the farmerswife Google Invites Settings:
Calendar ID: Id of a calendar created within your workspace
Service ID: ID of service account associated with a project in your Google Workspace
User Email: User who created the calendar whose Calendar ID gets used in the above
RSA Private Key Password: Provided by Google when creating an RSA key
RSA Private Key: Provided by Google, then converted for use by your farmerswife system
1.1 - Creating Google Service ID
NOTE: This "Service ID" is labeled as the "Client ID" within your Google Workspace.
Go to https://console.cloud.google.com/
Create a Service Account (see and use the detailed how-to info here: https://developers.google.com/identity/protocols/oauth2/service-account):
Then in the Account DETAILS, make a note of the "Unique ID" of this Service Account; this is needed later:
1.2 Delegating domain-wide authority to the service account
As per the above screenshot on the "SHOW DOMAIN-WIDE DELEGATION" section at the bottom, use the option "SHOW ADVANCED SETTINGS" ... which can also be called "VIEW GOOGLE WORKSPACE ADMIN CONSOLE".
Or, you simply log in to the Google Admin Panel using this link https://admin.google.com/) and go to Security > API Controls:
Expand the "API controls" section and click on "MANAGE DOMAIN WIDE DELEGATION".
IMPORTANT: "Domain-wide delegation" is only available with "Super Admin" Google Admin level permissions:
Then on the "Domain-wide Delegation" page in the "API clients" section, click on the "Add new" option to get to the "Add a new client ID" window:
Then add your previusly created "Service Accounts > Unique ID" - in the below screen shot the field is called "Client ID" - the info which came from the previous above step at the bottom of "1.1 - Creating Google Service ID", where you did "make a note of the "Unique ID" of this Service Account"; copy the "Unique ID" into the "Client ID" field as per the below screen shot.
And add the following "OAuth Scope" parameters:
OAuth scopes:
https://www.googleapis.com/auth/calendar
(updated March 2024, before "auth/drive" was wrongly also listed)
Once this is complete, you need to go back to the Google Cloud Console (https://console.cloud.google.com/).
In your IAM & Admin > Service Accounts (back in here: https://console.cloud.google.com/ ), select Show-Domain-Wide-Delegation and check the box for "Enable Google Workspace Domain-Wide Delegation":
Permissions: Enable "Google Calendar API" modifying this URL: https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project={your_project_ID}
OR maybe an easier way to get this URL containing "your_project_ID" is actually to skip this step. When attempting to use the feature for the first time via fw Client app > Toolbox > Settings > Server Setup > , the resulting error text will contain the link with your Project ID.
you can also build the link by adding your Project ID onto the end.
1.3 - Creating an RSA Key
On your Manage Service Accounts Dashboard, use the three-dot menu on the right-hand side of your new Service account and use Manage keys:
Create a new Key being sure to select P12 and make a note of the RSA Key Password provided by Google since it will be not provided again:
... and then:
With this key, you then need to modify it to get a readable file so the contents can be put into the farmerswife-side settings.
You do this with the following command in a command-shell (cmd) on Windows or a Terminal window on macOS, and you need to have "openssl" installed.
(Older info, in process of being deprecated:
and change "your-downloaded-key.p12" to be the name of our downloaded file.
google-invites-pcks1.key may also be modified to create a different file name.)
Note: the password prompted for, is the RSA Key Password copied during the Key creation above.
Then run this command as mentioned above:
openssl pkcs12 -in "your-downloaded-key.p12" -nodes -nocerts | openssl rsa -out google-invites-pcks1.key
Once this is complete you will have a readable google-invites-pcks1.key file with your RSA Key Values:
1.4 - Creating a Calendar
Using an account in your Google Pro/Business Workspace, create a new Calendar e.g. called "farmerswife-YourCompanyShortnameGoogleInvites" and copy it's Calendar ID; this is where farmerswife will create all events for everyone using this functionality and then invite people to it. This is only internally used.
NOTE: Best practice is to use an account not associated with a farmerswife user, since invites sent to them do not generate an invite; so they will never receive an invite. The invites simply appear on the Calendar since the user is the owner.
Once created, the Calendar ID is available via:
Used "dedicated calendar-user" user account > Calendar app (https://calendar.google.com/calendar/) > My Calendars > "farmerswife-YourCompanyShortnameGoogleInvites" 3-dot menu > Settings and Sharing > at the bottom of the Calendars Settings in the section Integrate Calendar as in the below screen shot:
Section 2 - Configuring farmerswife
Within the farmerswife Client desktop app, go to: Toolbox > Settings > Server Setup.
Then at the bottom use, the Setup button under the Google Invites section. Paste in all the values from above into the appropriate fields and hit OK to save and exit.
Now when booking a user with Google Invites enabled in their Web Permission Profile => "Send Google Calendar Invites" setting enabled, this information gets used to create the invite email:
NOTE: All events will be visible on the Calendar whose ID you used for the "Google Invites" integration: