GitHub Copilot
Use a service account to create this integration. Learn more about creating service accounts. The service account must be a maintainer or owner at both the project and repository levels to utilize all services and webhooks.
Authentication
Currently, Copilot integration supports authentication only through GitHub Personal Access Tokens (PATs). Both classic PATs (Organization-managed and Enterprise-managed) and fine-grained PATs (Organization-managed) work; however, we recommend classic PATs when possible because they simplify permission scoping and reduce configuration issues.
Some organizations enforce short PAT expiration windows. This can introduce operational overhead, since expired tokens must be regenerated and re-added to the integration.
If your security policies allow it, you can extend the PAT expiration period to reduce this maintenance burden.
Create your integration
To create your Copilot integration:
Click Settings in the top navigation.
In the left navigation under Integrations, click Integrations.
Click Add integration.
Click Copilot in the Integration Provider list.
Generate an access token (Settings > Developer Settings > Personal access tokens > Tokens (classic)).
If your Copilot licenses are managed by your organization (classic PATs and fine-grained PATs), you will need to create a personal access token with the following scopes:
read:orgmanage_billing:copilot
If your Copilot licenses are managed by your enterprise (classic PATs only), you will need to create a personal access token with the following scopes:
read:enterprisemanage_billing:copilot
Copilot has announced changes in some functionality with their APIs that will affect user PATs:
Customers using a classic PAT for the Copilot integration do not need to make any changes.
Customers using a fine-grained PAT for the Copilot integration will need to enable a new permission in their PAT settings. You can do so by editing or creating a new fine-grained PAT. The following permissions are required:
Organization-managed:
GitHub Copilot BusinessORAdministrationOrganization Copilot metrics(new)
Enterprise-managed:
Enterprise-managed fine-grained PATs are not supported. If you are are enterprise managed, you cannot use a fine-grained PAT for the Copilot integration.
If you are unsure to which scopes you need, you can enable both the read:org and read:enterprise along with manage_billing:copilot.
Copy the access token and return to Flow.
Paste the token in the Personal access token field.
Paste the organization’s URL in the Organization URL field.
Click Test connection. If the connection was successful, you'll see the success message.
Click Next.
Name your integration. This is the name Flow will display for the integration. Choose a name that will help you identify the integration later.
Once you've completed all sections, click Create.
When you have successfully integrated Flow with Copilot, you can go to Reports > Dashboards > AI activity dashboard to view the Copilot report.
