GitHub logo
Google Sheets logo

Workflow template

Log new GitHub pull requests in Google Sheets

Record newly opened GitHub pull requests in Google Sheets. Append nine fields, including source and target branches and the draft flag, to an existing worksheet.

How it works

From a PR opening to a nine-column register

1 Trigger · 1 Action
GitHub1 · Trigger

Pull Request

Receive opened pull_request events for the repository you select. Draft PRs are included; later commits, reviews and other changes are excluded by the prepared Actions filter.

Google Sheets2 · Action

Append pull request to the register

Append number, title, repository, author, URL, creation time, source branch, target branch and draft flag to A:I. RAW input keeps formula-looking titles and branch names as text.

The result

A register of PRs as they were opened

The row records the opening event’s metadata. Draft and branch fields are snapshots rather than a live view of review status.

Fictional PR with optional headers in the prepared A:I order. The action does not create a header row.
PR numberTitleRepositoryAuthorPR URLCreated at (UTC)Source branchTarget branchDraft
66Review the Dresden contributor guideexample-studio/project-trackeralex-examplehttps://github.com/example-studio/project-tracker/pull/662026-09-16T17:00:00Zdocs/dresden-guidemainfalse

Fictional data. The source branch proposes changes into the target branch. PR descriptions, code changes, comments and attachments are not copied.

Before activation

Set up your workflow

  1. Select the source repository

    Connect the FastHook GitHub App with access to the repository, choose it in the trigger and keep opened selected in Actions. The prepared filter includes draft PRs.

  2. Prepare nine worksheet columns

    Connect Google Sheets and select an existing spreadsheet and worksheet. Reserve A:I for the example order. An empty worksheet works, or add your own optional headers; the workflow does not create the file or labels.

  3. Activate and open a fictional PR

    Wait for the trigger to connect, then open a fictional PR. Compare the new row’s number, timestamp, source and target branches and draft value with the GitHub opening event.

Details and limitations
  • Drafts are recorded when opened. A newly opened draft PR can append a row with Draft true. Converting it to ready-for-review later does not update that cell or create another row under the prepared filter.

  • An append-only opening register. Existing PRs are not imported. Edits, commits, reviews, closures and reopenings do not append or update rows. Manual reruns can create duplicates because there is no PR lookup or row-update step.

  • Worksheet access and literal values. The worksheet exposes copied titles, repository identities and branch names to its readers. RAW input preserves formula-looking values as text. Body text, code, comments and attachments are not included.

Questions about this template

Will draft pull requests be included?

Yes. Opened draft PRs are included and their flag is written to Draft. The workflow does not wait until they are ready for review.

Will Draft change when the PR becomes ready for review?

No. The row captures the opening event. Later state changes, commits and reviews do not update it through this template.

Do I need to create nine headers first?

No. An empty existing worksheet works. Headers are optional; if you add them, use the A:I order in the example. The action does not create a spreadsheet or headers.

Which branch is the source and which is the target?

Source branch contains the proposed changes, such as docs/dresden-guide. Target branch is where they are proposed to merge, such as main. The workflow copies these names without code changes or comments.

Explore connected apps