Migrating Community Metrics to Orbit using n8n 📈
Tags: automation, spreadsheets, metrics, community
Published: 2020-12-21 09:24:08

---
title: Migrating Community Metrics to Orbit using n8n 📈
published: true
date: 2020-12-18 16:04:36 UTC
tags: automation,spreadsheets,metrics,community
canonical_url: https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n
---

It has been more than two years since I have been involved in the community as an organizer. My journey started as a [GitHub Campus Expert](https://education.github.com/experts). My love for privacy and the open internet helped me become a Mozilla Representative, and I am now an [Auth0 Ambassador](https://auth0.com/ambassador-program/) too. This journey is teaching me new skills and pushes me to do better. This is the aim I have for the community as well. Every member should get the opportunity to grow, showcase their skills, and achieve their goals.

![](https://cdn-images-1.medium.com/max/1024/1*X0lQK1vlnr7CXKUDKRdSnw.png)<figcaption>Migrating Community Metrics to Orbit using n8n</figcaption>

To know what everyone was up to, I started keeping records of the activities of the community members using Google Sheets. But with an ever-growing community, it became difficult. Every time a community member contributed, I manually added these records to a Google Sheet. The members of the community are very active, and it became difficult to keep up with the pace. Structuring data in Google Sheets for community metrics was also a painful task. The biggest challenge was making sense of these metrics. So I started using Orbit and connected my Google Sheets to it using [n8n](https://n8n.io) to transfer data automatically.

### **What is Orbit?**

The [Orbit model](https://github.com/orbit-love/orbit-model) is a framework for building communities. [Orbit](https://orbit.love/) makes it easy for community leaders and Developer Relations (DevRel) Leadership to easily keep track of the DevRel metrics and quantify the business impact.

I started at [n8n](https://n8n.io/) as a Developer Advocate Intern and was excited to learn that we use Orbit for DevRel metrics. I had read about Orbit and was eager to know more about it. I explored Orbit for a while and ended up creating an n8n workflow that moved the metrics from Google Sheets to Orbit.

Like me, if you too manage DevRel metrics in Google Sheets (or Airtable), follow along the article to learn how you can move these metrics to Orbit using n8n.

{% youtube fNRYd3aStDI %}

### **Prerequisites**

#### **Orbit account**

You can request access to Orbit by filling a form on their [website](https://orbit.love/). Once you have access to Orbit, create a workspace for your community.

#### **Google account**

I used Google Sheets to keep a record of the metrics in this [spreadsheet](https://docs.google.com/spreadsheets/d/1GiR5glinWBUJ-pw3w8LpcuwyOXst2z5nnFSak8DQrMQ/edit?usp=sharing). You will need a Google account to create a Google Sheet. Sign in to your Google account and open this [sheet](https://docs.google.com/spreadsheets/d/1GiR5glinWBUJ-pw3w8LpcuwyOXst2z5nnFSak8DQrMQ/edit?usp=sharing). Click on the **_File_** and select ‘Make a Copy’ from the dropdown list to copy the sheet in your account.

**Note:** If you change the name of the columns or the name of the sheet, make sure to make the changes in the n8n workflow accordingly.

#### **n8n**

We will connect Google Sheets to Orbit using n8n. Follow the instructions mentioned in the [documentation](https://docs.n8n.io/getting-started/quickstart.html#quickstart) to install and spin-up an n8n instance on your machine. You can also sign-up for [n8n.cloud](https://n8n.cloud/) to get access to our hosted service (in beta).

### **Quickstart**

If you don’t want to get into the details and have a bit of experience with n8n, you can follow the quick-start instructions below to get to the endgame. If something is unclear or you want to learn more about how it works, feel free to dig deeper into the sections that follow.

Access your n8n instance, and copy and paste the workflow from the [workflow](https://n8n.io/workflows/829) page. Configure the credentials for the following nodes:

**Google Sheets node** : [configure the OAuth credentials](https://docs.n8n.io/credentials/google/#using-oauth) and make sure you enter the correct Sheet ID in the **_Sheet ID_**  field.

- **Get Members** : This Google Sheet node fetches the data from the Members sheet. If your sheet has a different name, modify the **_Range_** field accordingly. If you’re using the Google Sheet shared earlier, enter the following range: Members!A:F.
- **Get Activities** : We fetch the activities of our members from the Activities sheet. If you are using a different name for your sheet, modify the **_Range_** field accordingly. For the spreadsheet I shared earlier, enter the following range: Activities!A:D.

**Orbit node** : [configure the credentials](https://docs.n8n.io/credentials/orbit/#orbit) and select your workspace from the **_Workspace_** field.

Save and execute the workflow.

![](https://cdn-images-1.medium.com/max/1024/0*7OgrdvP_nbB0_OdX)<figcaption>The final workflow in n8n</figcaption>

### **Moving data from Google Sheets to Orbit automatically**

Our workflow will fetch the data of our community members and their activities from a Google Sheet and add the information in our Orbit workspace automatically. The workflow uses the following nodes:

1. Get Members ([Google Sheets node](https://docs.n8n.io/nodes/n8n-nodes-base.googleSheets/#google-sheets))
2. Add Members ([Orbit node](https://docs.n8n.io/nodes/n8n-nodes-base.orbit/#orbit))
3. Get Activities (Google Sheets node)
4. Get all members (Orbit node)
5. [Merge](https://docs.n8n.io/nodes/n8n-nodes-base.merge/#merge)
6. Add Activities (Orbit node)

#### **1. Get Members (Google Sheets node)**

We are storing our members’ information like their name, GitHub username, Twitter handle, etc. in a Google Sheet. We will use the Google Sheet node to fetch this information.

The following image shows the Members sheet in my Google Sheet.

![Storing members’ information in Google Sheet](https://cdn-images-1.medium.com/max/1024/0*RgbtItWePZ6O13mS)<figcaption>Storing members’ information in Google Sheet</figcaption>

Follow the instructions mentioned in the [documentation](https://docs.n8n.io/credentials/google/#prerequisites) to configure the credentials for the Google Sheets node. Enter your Sheet ID in the **_Sheet ID_** field and enter a range in the **_Range_** field. If you’re using the Google Sheet shared earlier, enter the following range: Members!A:F.

Rename the node to **Get Members** and click on **_Execute Node_** to run the node.

The following image shows the output of the Get Members node.

![Fetching members’ data using Google Sheets node](https://cdn-images-1.medium.com/max/1024/0*JvabJNqLiL33A7Rv)<figcaption>Fetching members’ data using Google Sheets node</figcaption>

#### **2. Add Members (Orbit node)**

We will use the members’ data that we received from the previous node and pass it on to the Orbit node. To configure the credentials of the Orbit node, follow the instructions mentioned in the [documentation](https://docs.n8n.io/credentials/orbit/#orbit).

Select the ‘Upsert’ operation and your workspace in the Orbit node. We are using the GitHub identity to add the members. Select ‘GitHub’ from the **_Source_** dropdown list and ‘Username’ from the **_Search By_** dropdown list. In the username parameter of the node, use the following expression: `{{$json["GitHub"]}}`.

In our Google Sheet, we also have information like Location, Tags, Name, and T-shirt size. We will add this information to Orbit as well. You can add this information by selecting them from the **_Add Field_** dropdown list. Enter the following expression in the Expression Editor of the respective fields.

- **Location** : `{{$json["Location"]}}`
- **Name** : `{{$json["Name"]}}`
- **Tags to Add** : `{{$json["Tags']}}`
- **T-Shirt** : `{{$json["T-Shirt Size"]}}`

Rename the node to **Add Members** and click on **_Execute Node_** to run the node.

The following image shows the output of the Add Members node.

![Adding members to Orbit](https://cdn-images-1.medium.com/max/1024/0*XkGkTUKEbAY_LyaB)<figcaption>Adding members to Orbit</figcaption>

#### **3. Get Activities (Google Sheets node)**

Keeping only the data of the community members is not that useful. We also need to keep records of their activities. This record helps us understand the contributions the community members make, the type of content they are involved with, and other critical insights.

The following image shows the Activities sheet in my Google Sheet.

![Storing members’ activities in Google Sheet](https://cdn-images-1.medium.com/max/1024/0*HqrwSNK7YMGnBfqY)<figcaption>Storing members’ activities in Google Sheet</figcaption>

We will get the records of the activities of our community members from the Google sheet and add them to Orbit.

Select the credentials that we used in the Get Members node. Our Google Sheet uses the members’ GitHub username to associate them with their activities. We will use the ‘Lookup’ operation to get this information. Enter the following in the expression editor for the **_Sheet ID_** parameter: `{{$node["Get Members"].parameter["sheetId"]}}`. Enter the range for our Google Sheet in the **_Range_** field. If you’re using the Google Sheet shared earlier, enter the following range: Activities!A:D.

Enter ‘GitHub Username’ in the **_Lookup Column_** field. If you are using a different column name, enter that instead.

In the **_Lookup Value_** field, we pass the GitHub username of all our members that we got from the Get Members node. Enter the following expression in the Lookup Value field: `{{$node["Get Members"].json["GitHub"]}}`. Toggle **_Return All Match_** to true. This will check for the activities of all the members and return all their activities if it exists.

Rename the node to **Get Activities** and click on **_Execute Node_** to run the node.

The following image shows the output from the Get Activities node.

![Getting members’ activities using the Google Sheet node](https://cdn-images-1.medium.com/max/1024/0*z7GcVUihyn7KscFq)<figcaption>Getting members’ activities using the Google Sheet node</figcaption>

#### **4. Get all members (Orbit node)**

To add the activities that we got from the previous node, we need the ID of the members that were generated by Orbit. This node will get the ID of the members along with other information.

Create a new Orbit node and select the credentials that we used in the Add Members node. Select ‘Get All’ from the **_Operation_** dropdown list. Select your workspace and toggle **_Return All_** to true.

Rename the node to Get all members and click on **_Execute Node_** to run the node.

**_NOTE:_** Depending on the amount of data we have, the Orbit node might take some time to add the new members to the workspace.

The following image shows the output from the Get all members node.

![Getting all members using the Orbit node](https://cdn-images-1.medium.com/max/1024/0*La22TOQg--fO4Xs2)<figcaption>Getting all members using the Orbit node</figcaption>

#### **5. Merge information Google Sheets and Orbit**

We now have all the activities of our members from Google Sheet and their member ID from Orbit. We need to merge this information to map the activities to their respective member IDs.

We are using the Merge node to merge this information. Connect one input of the node with the **_Get Activities_** node and the other input with the **_Get all members_**  node.

Select ‘Merge By Key’ from the **_Mode_** dropdown list. This option will merge the information using the GitHub username as the key. Enter ‘GitHub Username’ in the **_Property Input 1_** field and ‘attributes.slug’ in the **_Property Input 2_**  field.

Click on **_Execute Node_** to run the node.

The following image shows the output from the Merge node.

![Merging data from Google Sheets and Orbit](https://cdn-images-1.medium.com/max/1024/0*dnhrI6tes8oK9FDn)<figcaption>Merging data from Google Sheets and Orbit</figcaption>

#### **6. Add Activities (Orbit node)**

The Merge node returns all the necessary data that we need. Using the Add Activities node, we will add the activities of our community members to Orbit.

In our new Orbit node, select the credentials that we used for the Get all members node. Select ‘Activity’ from the **_Resource_** dropdown list and ‘Create’ from the **_Operation_** dropdown list.

In the expression editor for the **_Member ID_** field, enter the following expression: `{{$json["id"]}}`. Enter the following expression in the expression editor of the **_Title_** field: `{{$json["Title"]}}`.

We will also add a description and a link (if they exist) for the activities. Add the **_Description_** and **_Link_** fields from the **_Add Field_** dropdown list. Enter the following expression in the Expression Editor of the respective fields.

- **Description** : `{{$json["Description"}}`
- **Link** : `{{$json["Activity Link"]}}`

Rename the node to **Add Activities** and click on **_Execute Node_** to run the node.

The following image shows the output from the Add Activities node.

![Adding activities using the Orbit node](https://cdn-images-1.medium.com/max/1024/0*UEmR8kTRarWgvbcR)<figcaption>Adding activities using the Orbit node</figcaption>

### **What’s next?**

The current workflow shows how we can migrate our data from Google Sheet to Orbit. But we might be using Airtable or a CRM tool to manage these records. We can migrate these records to Orbit using n8n in less than 10 mins.

We can build another workflow using the [Cron](https://docs.n8n.io/nodes/n8n-nodes-base.cron/#cron) node and the Orbit node to get the information about members with the highest activity in a month. Appreciate their contributions in the community using the Mattermost node or the Slack node (or whatever your community uses), and tweet about their work using the Twitter node.

I previously wrote an [article](https://medium.com/n8n-io/giving-kudos-to-contributors-with-github-slack-and-n8n-b3f5f4a653a6) on how you can use the Slash command in Slack and integrate it with n8n to get community members’ information and give a shout-out to them. We can combine these workflows. Use the Orbit node to get the data (email, address, t-shirt size) of the members, the [Shopify](https://docs.n8n.io/nodes/n8n-nodes-base.shopify/#shopify) node to place an order for swags. If you use [Printfection](https://www.printfection.com/), you can use the [HTTP Request](https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/#http-request) node to place the order on Printfection. Let us recognize the contributions of the community!

### **Summary**

Community metrics are yet not well defined and is a challenge for a lot of us. But the Orbit model streamlines these metrics and gives us a more efficient output. With this workflow, we now have our community metrics in our Orbit workspace. Orbit displays the data more sensibly and helps us understand the metrics. We can now make sense of these metrics and plan future activities for our community more efficiently.

I’d love to hear about how you extend the workflow using n8n and manage your communities! If you run into any issues while following the tutorial, feel free to reach out to me on [Twitter](https://twitter.com/harshil1712) or ask for help on our [forum](https://community.n8n.io) 🧡

* * *

> This [post](https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n) originally appeared on the n8n.io [blog](https://n8n.io/blog/).