> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Nudge pull request reviewers

Implement with AI

Send this guide to your coding agent.

Prerequisite: Install Port MCP

This guide demonstrates how to send Slack reminders for pull request reviews using Port workflows, either on demand or automatically when a pull request becomes overdue.

ReminderWhen it runsSlack destination
On-demand reminderYou select a pull request from the self-service page or its entity menu.The channel configured in the workflow.
Overdue reminderThe pull request's timer expires while it is open and has no recorded reminder.The channel inherited from its repository or service.

Common use cases​

  • Automatic follow-up: Alert a repository or service channel when an open PR passes its deadline.
  • Faster merges: Remind reviewers of open PRs to reduce delays.
  • Better code: Encourage timely reviews for quicker feedback.
  • Smoother workflow: Prevent bottlenecks that hinder development progress.

Prerequisites​

  1. Install GitHub.

  2. Set up a Slack app:

    • Go to your Slack apps page.
    • Create a new app or use an existing one.
    • Add the chat:write Bot Token Scope under OAuth & Permissions.
    • Install the app to your workspace and copy the Bot User OAuth Token (xoxb-...).
    • Invite the bot to the target Slack channel.

Set up data model​

The on-demand path uses your existing githubPullRequest blueprint. For automatic overdue reminders, add a timer, a notification flag, and a channel mirror before building the workflow.

Add the reminder properties​

  1. Go to the builder page and select your Pull request (githubPullRequest) blueprint.

  2. Click Edit JSON and merge these definitions into the existing schema.properties object:

    {
    "prOpenTimer": {
    "title": "PR open timer",
    "type": "string",
    "format": "timer"
    },
    "isNotificationSent": {
    "title": "Notification sent",
    "type": "boolean",
    "default": false
    }
    }
  3. Click Save.

Configure the Slack destination​

The GitHub pull request model relates githubPullRequest to githubRepository through repository. The following steps use that relation. If you already use the old overdue-reminder guide's serviceSlackChannel mirror through a service relation, keep its service.slackChannel path and configure the channel on that service instead.

  1. On the builder page, select your Repository (githubRepository) blueprint, click Edit JSON, and add this definition to its schema.properties object:

    {
    "slackChannel": {
    "title": "Slack channel",
    "type": "string",
    "description": "Slack channel ID for overdue pull request reminders."
    }
    }
  2. Click Save.

  3. Open the Pull request blueprint, click Edit JSON, and add this definition to its existing mirrorProperties object. If serviceSlackChannel already exists, keep the path that matches your populated relation:

    {
    "serviceSlackChannel": {
    "title": "Review Slack channel",
    "path": "repository.slackChannel"
    }
    }
  4. Click Save.

  5. Set Slack channel on each repository entity that needs reminders to the destination channel ID, and invite your Slack bot to each channel. Verify that its pull request entities have a populated Review Slack channel mirror.

The workflow uses your SLACK_BOT_TOKEN secret. It does not need the old guide's slackURL property or serviceSlackUrl mirror.

Update integration mapping​

Complete this section only for automatic overdue reminders.

  1. Go to the connectors page of your factory and select your GitHub integration.

  2. Find the existing pull-request resource and add the following property under port.entity.mappings.properties. For the default REST API, calculate the deadline from created_at:

    prOpenTimer: '((.created_at | fromdateiso8601) + (3 * 24 * 60 * 60) | todateiso8601)'

    If your resource uses api: graphql, use createdAt instead:

    prOpenTimer: '((.createdAt | fromdateiso8601) + (3 * 24 * 60 * 60) | todateiso8601)'
  3. Keep your existing identifier, title, status, link, reviewer, and relation mappings. Do not map isNotificationSent: the workflow owns that value, so a resync must not reset it.

  4. Click Save & Resync to apply the mapping.

The example sets the deadline to three days after creation. Change 3 * 24 * 60 * 60 to your threshold in seconds. Keep your PR status current in Port so closed or merged PRs do not receive reminders.

Add the Slack bot token secret​

  1. Go to Port's settings page.

  2. Navigate to Credentials and click + Secret.

  3. Add a secret named SLACK_BOT_TOKEN with the Bot User OAuth Token you copied above.

Build the on-demand workflow​

The on-demand workflow has three nodes:

  1. Trigger - a self-service trigger that lets users select a pull request entity. When launched from the entity bolt menu, Port pre-fills the selected PR automatically.

  2. Fetch PR - calls Port's catalog API to retrieve the PR entity's properties (title, link, reviewers).

  3. Send Slack notification - posts a reminder message to your Slack channel using the fetched PR data.

To create the workflow:

  1. Go to the workflows page in Port.

  2. Click + Workflow.

  3. Fill out the Create new workflow form, then click Confirm.

  4. Click the {...} button to open the JSON editor and paste the workflow JSON below:

    {
    "identifier": "nudge_pr_reviewers",
    "title": "Nudge PR Reviewers",
    "icon": "Slack",
    "description": "Remind PR reviewers about pending pull request reviews",
    "nodes": [
    {
    "identifier": "trigger",
    "title": "Nudge PR Reviewers",
    "config": {
    "type": "SELF_SERVE_TRIGGER",
    "userInputs": {
    "properties": {
    "pullRequest": {
    "title": "Pull Request",
    "description": "Select the pull request to nudge reviewers for",
    "type": "string",
    "format": "entity",
    "blueprint": "githubPullRequest"
    }
    },
    "required": ["pullRequest"]
    },
    "contexts": [
    {
    "on": "ENTITY",
    "userInput": "pullRequest"
    }
    ]
    }
    },
    {
    "identifier": "fetch_pr",
    "title": "Fetch Pull Request",
    "config": {
    "type": "WEBHOOK",
    "url": "https://api.port.io/v1/blueprints/githubPullRequest/entities/{{ .outputs.trigger.pullRequest }}",
    "method": "GET",
    "synchronized": true
    },
    "variables": {
    "entity": "{{ .result.response.data.entity }}"
    }
    },
    {
    "identifier": "send_slack_notification",
    "title": "Send Slack Notification",
    "config": {
    "type": "WEBHOOK",
    "url": "https://slack.com/api/chat.postMessage",
    "method": "POST",
    "synchronized": true,
    "headers": {
    "Content-Type": "application/json; charset=utf-8",
    "Authorization": "Bearer {{ .secrets.SLACK_BOT_TOKEN }}"
    },
    "body": {
    "channel": "YOUR_SLACK_CHANNEL",
    "text": "\n*Reminder: Pending Pull Request Review*\nThis PR needs your attention!\n\n*PR:* <{{ .outputs.fetch_pr.entity.properties.link }}|{{ .outputs.fetch_pr.entity.title }}>\n*Reviewers:* {{ .outputs.fetch_pr.entity.properties.reviewers }}\nReview PR: {{ .outputs.fetch_pr.entity.properties.link }}"
    }
    }
    }
    ],
    "connections": [
    {
    "sourceIdentifier": "trigger",
    "targetIdentifier": "fetch_pr"
    },
    {
    "sourceIdentifier": "fetch_pr",
    "targetIdentifier": "send_slack_notification"
    }
    ]
    }
  5. Click Apply changes.

Configure the on-demand workflow​

In the send_slack_notification node, replace YOUR_SLACK_CHANNEL with the channel ID or name where you want to send the reminder (e.g. #pr-reviews).

Build the overdue reminder workflow​

This path uses a timer-expiry event trigger to send reminders without a manual launch. It fetches the current PR, checks that it is open, unnotified, and has a channel, then posts to Slack. The final node records isNotificationSent: true only when Slack returns ok: true.

  1. Go to the workflows page in Port.

  2. Click + Workflow.

  3. Fill out the Create new workflow form, then click Confirm.

  4. Click the {...} button to open the JSON editor and paste the workflow JSON below:

    {
    "identifier": "remind_overdue_pull_requests",
    "title": "Remind reviewers of overdue pull requests",
    "icon": "Slack",
    "description": "Remind a channel when a pull request passes its review deadline",
    "nodes": [
    {
    "identifier": "trigger",
    "title": "When the PR timer expires",
    "config": {
    "type": "EVENT_TRIGGER",
    "published": true,
    "event": {
    "type": "TIMER_EXPIRED",
    "blueprintIdentifier": "githubPullRequest",
    "propertyIdentifier": "prOpenTimer"
    },
    "condition": {
    "type": "JQ",
    "expressions": [
    "(.diff.after.properties.status == \"open\" or .diff.after.properties.status == \"OPEN\")",
    ".diff.after.properties.isNotificationSent != true"
    ],
    "combinator": "and"
    }
    }
    },
    {
    "identifier": "fetch_overdue_pr",
    "title": "Fetch current pull request",
    "config": {
    "type": "WEBHOOK",
    "url": "https://api.port.io/v1/blueprints/githubPullRequest/entities/{{ .outputs.trigger.diff.after.identifier }}",
    "method": "GET",
    "synchronized": true,
    "onFailure": "terminate"
    },
    "variables": {
    "entity": "{{ .result.response.data.entity }}"
    }
    },
    {
    "identifier": "check_overdue_pr",
    "title": "Check reminder eligibility",
    "config": {
    "type": "CONDITION",
    "outlets": [
    {
    "identifier": "eligible",
    "title": "Open, unsent, with a channel",
    "expression": "(.outputs.fetch_overdue_pr.entity.properties.status == \"open\" or .outputs.fetch_overdue_pr.entity.properties.status == \"OPEN\") and (.outputs.fetch_overdue_pr.entity.properties.isNotificationSent != true) and ((.outputs.fetch_overdue_pr.entity.properties.serviceSlackChannel // \"\") | length > 0)"
    }
    ]
    }
    },
    {
    "identifier": "send_overdue_notification",
    "title": "Send overdue reminder",
    "config": {
    "type": "WEBHOOK",
    "url": "https://slack.com/api/chat.postMessage",
    "method": "POST",
    "synchronized": true,
    "onFailure": "terminate",
    "headers": {
    "Content-Type": "application/json; charset=utf-8",
    "Authorization": "Bearer {{ .secrets.SLACK_BOT_TOKEN }}"
    },
    "body": {
    "channel": "{{ .outputs.fetch_overdue_pr.entity.properties.serviceSlackChannel }}",
    "text": "*Overdue pull request review*\n*PR:* <{{ .outputs.fetch_overdue_pr.entity.properties.link }}|{{ .outputs.fetch_overdue_pr.entity.title }}>\n*Deadline:* {{ .outputs.fetch_overdue_pr.entity.properties.prOpenTimer }}\n*Creator:* {{ .outputs.fetch_overdue_pr.entity.properties.creator }}\n*Assignees:* {{ .outputs.fetch_overdue_pr.entity.properties.assignees }}\n*Reviewers:* {{ .outputs.fetch_overdue_pr.entity.properties.reviewers }}"
    }
    }
    },
    {
    "identifier": "check_slack_response",
    "title": "Confirm Slack accepted the message",
    "config": {
    "type": "CONDITION",
    "outlets": [
    {
    "identifier": "sent",
    "title": "Message sent",
    "expression": ".outputs.send_overdue_notification.response.data.ok == true"
    }
    ]
    }
    },
    {
    "identifier": "mark_notification_sent",
    "title": "Record the sent reminder",
    "config": {
    "type": "UPSERT_ENTITY",
    "blueprintIdentifier": "githubPullRequest",
    "onFailure": "terminate",
    "mapping": {
    "identifier": "{{ .outputs.fetch_overdue_pr.entity.identifier }}",
    "properties": {
    "isNotificationSent": true
    }
    }
    }
    }
    ],
    "connections": [
    {
    "sourceIdentifier": "trigger",
    "targetIdentifier": "fetch_overdue_pr"
    },
    {
    "sourceIdentifier": "fetch_overdue_pr",
    "targetIdentifier": "check_overdue_pr"
    },
    {
    "sourceIdentifier": "check_overdue_pr",
    "targetIdentifier": "send_overdue_notification",
    "sourceOutletIdentifier": "eligible"
    },
    {
    "sourceIdentifier": "send_overdue_notification",
    "targetIdentifier": "check_slack_response"
    },
    {
    "sourceIdentifier": "check_slack_response",
    "targetIdentifier": "mark_notification_sent",
    "sourceOutletIdentifier": "sent"
    }
    ]
    }
  5. Click Apply changes.

Condition nodes stop the branch when there is no matching outlet. Inspect Check reminder eligibility when no message is sent. If Slack returns ok: false, Confirm Slack accepted the message stops before the notification flag is set; inspect the Slack response for its error.

If you previously installed the old guide's prOpenForMoreThan3Days and markNudgeSent automations, disable both before enabling this workflow. Keep existing isNotificationSent values and the service-based channel mirror if you already use it. The on-demand workflow remains independent and does not set the overdue notification flag.

Let's test it!​

Send an on-demand reminder​

You can trigger the workflow in two ways:

  • From the Self-service page: Go to the Self-service page, find Nudge PR Reviewers, click it, and select a pull request from the dropdown.
  • From an entity: In the githubPullRequest catalog page, click the bolt (⚡) menu on any PR row and select Nudge PR Reviewers; the PR is pre-filled automatically.

After execution, the configured channel receives a Slack message similar to:

*Reminder: Pending Pull Request Review*
This PR needs your attention!

*PR:* <link to PR>
*Reviewers:* reviewer1, reviewer2
Review PR: https://github.com/...

Test an overdue reminder​

  1. Select a test PR that is open in GitHub and Port. Set its repository or service channel to a test Slack channel that includes your bot, and verify the PR's serviceSlackChannel mirror is populated.

  2. On the test PR entity, set Notification sent to false and PR open timer to a time a few minutes in the future. Let it expire before the next GitHub resync replaces the test value, or use a short threshold in a test integration mapping.

  3. Open workflow runs and follow the overdue workflow run. Verify the Slack channel receives the PR link and review details, then verify Notification sent becomes true.

  4. Set a new future timer on the same entity without clearing Notification sent. After it expires, verify that the event condition prevents another reminder.

  5. Test a closed PR and an open PR with no channel mirror. Verify neither sends a reminder or marks the notification as sent.

  6. Restore the three-day mapping if you changed it for testing, then click Save & Resync on the connectors page.

Limitations​

  • Reminders post to a channel; GitHub reviewer names in the message are not Slack user mentions or direct messages.
  • The flag suppresses later timer events after a successful recorded send. A send and a catalog update are separate requests, so concurrent runs or a failed flag update can still produce duplicates. This is not an exactly-once delivery guarantee.
  • A failed send leaves the flag unset. Correct the error and set a new future timer to retry; this workflow does not retry on a schedule. Already expired timers should not be assumed to replay when you enable the workflow.
  • A reopened PR retains its notification flag. Clear the flag and set a new timer if you want another automatic reminder.

More relevant guides​