# Zapier + Github + OpenAI

In this guide, we'll show you how to integrate OpenAI, GitHub, and Underdog Protocol using Zapier. By doing so, you can automatically generate content using OpenAI's GPT-3, DALL·E, or Whisper, create a comment in a GitHub issue, find and update the issue, and update the NFT in Underdog Protocol.

<figure><img src="/files/YEMvhL2gElWKQCDEHvyY" alt=""><figcaption></figcaption></figure>

Step 1: Trigger When New Issue in GitHub The first step in this integration is to set up the trigger. In Zapier, select GitHub as the trigger app and choose "New Issue" as the trigger event. Then, follow the prompts to connect your GitHub account to Zapier and select the repository you want to track new issues.

<figure><img src="/files/g74Lbg5zNAC26MKOhKgC" alt=""><figcaption></figcaption></figure>

Step 2: Send Prompt in OpenAI (GPT-3, DALL·E, Whisper) Next, you'll need to send a prompt to OpenAI's GPT-3, DALL·E, or Whisper. In Zapier, select OpenAI as the action app and choose the appropriate action event based on the OpenAI model you want to use (e.g., "Generate GPT-3 Text").  You will want to use the Body as a way to identify the Problem to get help on from ChatGPT.&#x20;

<figure><img src="/files/SlTQn7iejBiNVMrIHSSF" alt=""><figcaption></figcaption></figure>

Step 3: Create Comment in GitHub After generating content using OpenAI, create a comment in the GitHub issue. In Zapier, select GitHub as the action app again and choose "Create Issue Comment" as the action event. Follow the prompts to connect your GitHub account to Zapier and fill in the required fields, such as the repository, issue number, and the content of the comment, which should include the generated content from OpenAI.

<figure><img src="/files/rQG5yNpHOnLLSGUkalku" alt=""><figcaption></figcaption></figure>

Step 4: Find Issue in GitHub Next, find the issue in GitHub to update it. In Zapier, select GitHub as the action app once more and choose "Find Issue" as the action event. Fill in the required fields, such as the repository and issue number, and follow the prompts to connect your GitHub account to Zapier.

<figure><img src="/files/m3FeS3v8E09mC0Za7F2X" alt=""><figcaption></figcaption></figure>

Step 5: Update Issue in GitHub Now that you've found the issue, update it in GitHub. In Zapier, select GitHub as the action app again and choose "Update Issue" as the action event. Fill in the required fields, such as the repository, issue number, and any updates to the issue title or body, and follow the prompts to connect your GitHub account to Zapier.

<figure><img src="/files/Sv2m9kaF3o6L7oJnuRPb" alt=""><figcaption></figcaption></figure>

Step 6: Update NFT in Underdog Protocol Finally, update the NFT in Underdog Protocol based on the content generated by OpenAI. In Zapier, select Underdog Protocol as the action app and choose "Update NFT" as the action event. Fill in the required fields, such as the NFT ID, the new point value, and any other relevant information, and follow the prompts to connect your Underdog Protocol account to Zapier.

Congratulations, you've successfully integrated OpenAI, GitHub, and Underdog Protocol using Zapier! Now, every time a new issue is created in GitHub, content will be generated using OpenAI, a comment will be added to the issue, the issue will be found and updated, and the NFT in Underdog Protocol will be updated accordingly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.underdogprotocol.com/examples/zapier-integrations/zapier-+-github-+-openai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
