Create your own integration on Zapier: [ Ссылка ]
***
In this video we’re going to build an integration using the Zapier Platform. Feel free to follow along and build the integration yourself—you can always pause the video along the way if you need to.
By the end of the video, we’ll have built an integration that can trigger a Zap when a new repository is created in Github.
*Requirements*
To follow along, you’ll need a Zapier account and a Github account, so if you don’t have those already, you’ll want to pause the video and set those up.
*Creating the integration*
To get started, go to zapier.com/platform, and click My Integrations. From here, click Start a Zapier Integration.
Fill out the name, description, and other required fields, and when you’re ready, click the blue Create button at the bottom.
*Authentication*
First, we’re going to set up Authentication, which will allow us to connect our Github account to Zapier using basic authentication. Zapier supports several types of authentication—for example, your API might use OAuth 2, but we're using basic authentication in this demo because it’s quick and simple to set up.
I’ll go ahead and select Basic Auth from the dropdown.
To set up authentication, we need to choose a test endpoint. Typically, an API will have an endpoint that returns the authenticated user’s information, like /me or /user. For Github, that endpoint is [ Ссылка ], so let’s type that in this field here.
Now, click Save & Continue.
We’ll want to test this to make sure we have everything set up correctly. Click Connect an Account—this is where you will enter your Github username and personal access token, which you can get by going to github.com/settings/tokens.
You should now see your account under step two, as shown here.
Now, click Save & Finish.
*Adding a Trigger*
Now we’re going to add a trigger that will poll Github for new repos.
From the sidebar on the left, click “Triggers”. Then click “Add Trigger”.
Fill out the rest of the fields: [I’m going to set the key to ________]
Click Save and Continue when you’re ready to move on.
In the “API Configuration” tab, set this URL as the API endpoint: [ Ссылка ]. Then click Save API Request & Continue.
Click Test Your Request to run a test call to that endpoint. You should see the response data under the Response Tab here. In this case, it’s an array of objects representing all the repos in my account. Click Finish Testing & Continue.
You’ll then be asked to define some sample data. Sample data will be used in the Zap editor if the user doesn’t test the trigger when they set up their Zap. I’d like to use the response we got when we tested it just a moment ago, so I’ll click here. Now, click Save Output & Finish.
And this all you need to do to create an integration with a basic trigger. Let’s test it out!
Go to Zapier.com and click “Create a Zap!”
Now, I’ll search for my integration and select it from the dropdown. The only trigger will be automatically selected, so I can now click Save and Continue. Zapier will poll Github for repos so we have some sample data to work with.
I can now do whatever I’d like when a new repository is created. For example, if I have a Google Sheets spreadsheet with all of my repos I can add a new row to that spreadsheet whenever a new repo is created. Zapier connects with over 1,500 apps, so the possibilities are nearly endless.
![](https://i.ytimg.com/vi/lNnuPg_sSpw/maxresdefault.jpg)