Build your first workflow
Now that your context lake is populated with data and your integrations are connected, it's time to see Port's agentic capabilities in action and build your first workflow.
Build the workflow
The fastest way to build your first workflow is to describe it to Port's AI assistant:
-
Click the
button in Port, then switch the mode selector next to the chat input from Build to Plan - this way the assistant only suggests and plans workflows, without building anything yet.
-
Try a prompt such as:
- "Help me build my first workflow based on the integrations I already have connected."
- "Suggest a few workflows I could create based on my context lake."
-
Depending on your use-case, the assistant may suggest something like:
- Auto-nudge users via Slack about stale PRs.
- Auto-triage new GitHub issues based on service criticality and ownership.
- Auto-escalate unacknowledged incidents to the next on-call engineer.
You can build any of the suggestions, or describe a workflow of your own.
For this guide, we will walk through building Auto-Nudge Stale PRs, so you can see the whole flow end to end.Keep in mind that Port AI won't necessarily follow the exact same path twice - your assistant may phrase things differently, ask different clarifying questions, or suggest a different set of workflows altogether. Use the flow below as a guide for what to expect, not an exact script.
To build a workflow yourself instead, see the workflows documentation for how to construct any workflow from scratch - trigger nodes, action nodes, and connections.
Example
In this section, we'll go over one of the possible workflows the AI suggested: Auto-Nudge Stale PRs.
- Triggers on a daily schedule and fetches all open pull requests from the catalog.
- Generates an AI summary for each stale pull request, based on its title, age, and review status.
- Posts the full digest to a Slack channel.
Because the report is grounded in your actual catalog data, the more pull request data you have in Port, the more useful it becomes.
This example uses GitHub and Slack, but you can swap in whichever Git provider or messaging tool you actually use - for example, GitLab instead of GitHub, or Microsoft Teams instead of Slack.
Build it with the AI assistant
-
Stay in the same chat, in Plan mode. Either pick the suggestion the assistant already offered, or describe the workflow yourself with a prompt like the one below:
Example prompt (click to expand)
Build a workflow that runs daily and checks for GitHub pull request entitiesthat become stale, then sends a Slack notification to a channel along withan AI-generated summary of the stale PRs. -
Port AI plans the workflow, creates any missing blueprints, properties, or mappings, and asks clarifying questions to narrow down the details.
-
Review the plan, confirm, and let Port set up the trigger, the catalog lookups, the AI drafting step, and the Slack webhook for you. Follow any additional steps Port AI walks you through to finish the setup, such as providing a Slack webhook URL.
Add this example manually
If you'd rather skip the AI assistant and paste this specific example directly, make sure you have the following in place first:
-
The GitHub integration installed on your organization.
-
An
is_staleand adays_oldcalculation property on thegithubPullRequestblueprint - not part of the default GitHub Ocean blueprint or mapping.Calculation properties definition (click to expand)
"calculationProperties": {"days_old": {"title": "Days Old","icon": "DefaultProperty","calculation": "(now / 86400) - (.properties.createdAt | capture(\"(?<date>\\\\d{4}-\\\\d{2}-\\\\d{2})\") | .date | strptime(\"%Y-%m-%d\") | mktime / 86400) | floor","type": "number"},"is_stale": {"title": "Is Stale (7d+)","icon": "Clock","description": "True when this PR is open and older than 7 days","calculation": "if (.properties.status == \"open\" and (((now / 86400) - (.properties.createdAt | capture(\"(?<date>\\\\d{4}-\\\\d{2}-\\\\d{2})\") | .date | strptime(\"%Y-%m-%d\") | mktime / 86400) | floor) > 7)) then true else false end","type": "boolean","colorized": true,"colors": {"true": "orange"}}} -
A
SLACK_WEBHOOK_URLsecret. See Slack's incoming webhooks guide for how to create one.
Then, add the workflow directly:
-
Go to the workflows page in Port.
-
Click + Workflow, name it as you wish, then click Confirm.
-
In the workflow page, click on the {...} button and paste the following definition:
Auto-Nudge Stale PRs workflow definition (click to expand)
Before pasting, make sure the
SLACK_WEBHOOK_URLsecret name matches the secret you created in Port Secrets.{"title": "Auto-Nudge Stale PRs","icon": "Github","description": "Runs daily at 8 AM UTC. Fetches stale GitHub PRs via catalog API, generates individual AI summaries per PR, and posts the full digest to Slack.","category": null,"allowAnyoneToViewRuns": true,"connections": [{"description": null,"sourceIdentifier": "schedule_trigger","targetIdentifier": "fetch_stale_prs"},{"description": null,"sourceIdentifier": "fetch_stale_prs","targetIdentifier": "ai_generate_summaries"},{"description": null,"sourceIdentifier": "ai_generate_summaries","targetIdentifier": "send_to_slack"}],"nodes": [{"identifier": "schedule_trigger","title": "Daily at 8 AM UTC","icon": null,"description": null,"config": {"type": "SCHEDULE_TRIGGER","cron": "0 8 * * *","published": true},"variables": {},"links": [],"verbose": false},{"identifier": "fetch_stale_prs","title": "Fetch Stale PRs from Catalog","icon": null,"description": null,"config": {"type": "WEBHOOK","url": "https://api.port.io/v1/blueprints/githubPullRequest/entities/search","agent": false,"synchronized": true,"method": "POST","headers": {"Content-Type": "application/json"},"body": {"query": {"rules": [{"value": "open","operator": "=","property": "status"}],"combinator": "and"}},"onTimeout": "fail","onFailure": "terminate"},"variables": {},"links": [],"verbose": false},{"identifier": "ai_generate_summaries","title": "Generate Per-PR AI Summaries","icon": null,"description": null,"config": {"type": "AI","userPrompt": "Below is the full list of open GitHub pull requests fetched from the Port catalog:\n\n{{ .outputs.fetch_stale_prs.response.data.entities }}\n\nYour job is to generate a Slack digest. Follow these instructions exactly:\n\n1. Filter to only PRs where the `is_stale` field is true OR `days_old` > 7. Skip any non-stale PRs.\n2. Sort stale PRs by `days_old` descending (oldest first).\n3. For EACH stale PR, output a block in EXACTLY this format, with one blank line between each block:\n\n:red_circle: Stale PR Alert\n{title}\n:stopwatch: Open for {days_old} days | Review: {reviewDecision if set, otherwise write 'No decision yet'}\n:memo: *AI Summary:*\n{Write 2-4 sentences specific to this PR: what it appears to be about based on its title and branch name, how long it has been dormant, whether it looks like a test/placeholder or real feature work, and your recommended action (close, assign reviewer, etc.)}\n\n4. After all individual PR blocks, output a line containing only three dashes: ---\n Then output a final summary block in this format:\n\n*Summary:* :red_circle: *{count} stale PRs* detected across {list the unique repository names}. All have been open between *{min_days} and {max_days} days* with *{key pattern observation, e.g. no reviewers assigned and no review decisions made}*. {One actionable recommendation sentence.}\n\nReturn ONLY the Slack message text. No preamble, no explanation, no markdown code fences.","systemPrompt": "You are a developer productivity analyst creating a daily stale PR Slack digest. Format ALL output as Slack mrkdwn — use *bold*, _italic_, and Slack emoji codes like :red_circle:, :stopwatch:, :memo:. Never use markdown # headers or **double-asterisk bold**. Use only *single-asterisk bold* for Slack. You receive raw PR entity JSON — process it directly without calling any tools.","tools": []},"variables": {},"links": [],"verbose": false},{"identifier": "send_to_slack","title": "Post to the configured Slack channel","icon": null,"description": null,"config": {"type": "WEBHOOK","url": "{{ .secrets.SLACK_WEBHOOK_URL }}","agent": false,"synchronized": true,"method": "POST","body": {"text": "{{ .outputs.ai_generate_summaries.response }}"},"onTimeout": "fail","onFailure": "terminate"},"variables": {},"links": [],"verbose": false}]}
See it in action
Once the workflow is saved, wait for its next scheduled run, or trigger it manually. Within seconds, a Slack message appears listing the stale pull requests along with an AI-generated summary of each one - based on your own, even if still sparse, catalog data.
What's next
The quality of this workflow's report depends entirely on how much of your engineering context lives in Port - which pull requests exist, how old they are, and their review status. As you connect more tools and enrich your context lake, workflows like this one get smarter. The rest of this guide walks you through the following steps:
- View your dashboards - see the data you've connected reflected back to you.
- (Optional) Invite your team - bring your colleagues into Port.
As your context lake grows, you can extend this workflow, or build new ones, that take real action - opening pull requests, escalating incidents, or auto-resolving issues. See use-cases & examples for inspiration.