Sitecore Connect - Integrate Github with Google Calendar

This is a beginner-level post to start with Sitecore Connect wherein the fictitious use case here is:

Once a Github issue is created in a particular Github repo, the issue will be automatically added by Sitecore Connect recipe to Google calendar at 5 pm on the same day for discussion about the issue!

On a side note, I also bumped upon other platforms offering the same type of integration:

Zapier - Integrate GitHub with Google Calendar to automate your work

Unito - Integrate GitHub with Google Calendar to automate your work

IFTTT - Integrate Github with Google Calendar

n8n - Integrate Github with Google Calendar

Out of all the above, only n8n seems to have some details about how-to actually integrate the two. So, as a faithful Sitecore Community member, I thought why not cover this simple integration and feature in the search results. Hence, this blog post. 

First of all, there are two important terms with respect to Sitecore Connect:

Connection: Since Sitecore Connect is a no or low-code platform, it can connect to different SAAS platforms through an user account in the concerned platform. 

Recipe: The connections are utilised to get and process data (cooking) as part of sending from a source to a target application.

Sitecore Connect Entities:

Sitecore Connect Process Life-cycle:

Pre-requisite:

Must have access to Sitecore Connect product in your organization Sitecore portal.


1. First of all, create a Sitecore Connect project:


2. Next, create folders for storing connections and recipes:


3. Before creating a connection, in the Github account that you wish to connect, create personal access token in https://github.com/settings/tokens and ensure to select scope before clicking generate token button:


If scope isn't selected above, while setting up Github connection in Sitecore Connect, you would get a 404 error.

4. Now, setup Sitecore Connect connection to Github and provide the above personal token:



5. Also, since a new Github issue will be added to Google Calendar, connect to a Google Calendar account and provide consent for Sitecore Connect:


6. If everything is fine, your project must have the new connections under the specified project and they must be in connected state:


One way to maintain security with connections is disconnect the connection(s) when not in use as well as stop the recipe(s) as such when not in use.

7. In the above page, the Create button allows to create not only a connection but also create recipes and this is how a recipe is created:



8. Since there are multiple ways to trigger the recipe, in my case, i used the simple "Trigger from an app" option since i want the processing to happen as soon as a new github issue is created in the concerned repo.



9. Now, I setup the target as follows and I added a formula so that a calendar event will be automatically created at 5 pm Melbourne time:



Note that I set the name of the event to the issue title although many fields from the Github repo are exposed:


10. You can test the recipe by creating an issue in the concerned github repo and the recipe will be fired ad-hoc or will automatically fire in an interval of 4 minutes:



11. Once you save the recipe, the recipe needs to be active so that it fires automatically and in case it needs to be edited, the recipe needs to be stopped:


12. Job trigger details:


13. In case if you want to delete a recipe, the concerned connection(s) must be disconnected first:


14. Note that a recipe can only be started after testing is stopped and vice-versa:


15. Inbuilt-dashboard with execution details:


There is also an activity audit tab to view any changes to recipe/connections and by who.

End-result:

Comments

Popular Posts