Devin
The Devin integration action allows workflows to create Devin sessions, send follow-up messages, terminate sessions, and archive sessions using your installed Devin integration.
Prerequisites
- A Devin integration installed in your Port organization.
- Actions processing must be enabled on your integration:
- Hosted by Port: actions processing is enabled automatically.
- Self-hosted (Helm or Docker): actions processing is disabled by default and must be explicitly enabled.
- For managed Port MCP:
- Set
executionIdentityon the workflow node (actorfor self-service, orservice_accountfor automations. Only admins can authorservice_account). - The integration injects Port MCP credentials using the fixed session secret key
MCP_PORT_TOKEN.
- Set
Configuration
| Field | Type | Description |
|---|---|---|
type | string | Required. Must be "INTEGRATION_ACTION" |
installationId | string | Required. Your Devin integration installation ID |
integrationProvider | string | Required. Must be "devin" |
integrationInvocationType | enum | Required. One of the values listed in available actions |
integrationActionExecutionProperties | object | Required. Operation-specific configuration |
executionIdentity | object | Optional. Who Port API / Port MCP calls act as for this node. Sibling of integrationActionExecutionProperties (not inside it). Required when enablePortMcp is true on create_session or send_message. See Execution identity |
Completion tracking
Devin does not support webhooks. Set reportCompletion to control whether the Port run waits for Devin to finish the turn.
reportCompletion | Behavior |
|---|---|
true (default on create_session and send_message) | Port run stays IN_PROGRESS. The integration polls Devin, streams messages to the run log, and completes the run with session output when the turn finishes or fails. |
false | Port run completes as soon as the session is created or the message is accepted. |
Polling interval and timeout come from integration install settings: sessionTrackingIntervalSeconds (default 30) and sessionTrackingMaxHours (default 72). See session tracking on the integration page.
Available actions
Each action is selected with the integrationInvocationType field:
| Action | Invocation type | Description |
|---|---|---|
| Create session | create_session | Start a new Devin session with a prompt |
| Send message | send_message | Send a follow-up message to an existing session |
| Terminate session | terminate_session | End a Devin session; fails any Port run still waiting on it |
| Archive session | archive_session | Archive a Devin session |
Create session
Starts a new Devin session and optionally waits for Devin to finish the first turn.
Execution properties
| Field | Type | Description |
|---|---|---|
prompt | string | Required. Task instructions for Devin. |
playbookId | string | Optional Devin playbook ID, for example playbook-0123456789abcdef. |
repos | array | Optional GitHub repositories, for example ["your-org/your-repo"]. |
knowledgeIds | array | Optional knowledge note IDs to attach. |
secretIds | array | Optional organization secret IDs to expose to the session (values are resolved by Devin). |
tags | array | Optional tags. Tags starting with port: are reserved and rejected. |
maxAcuLimit | number | Optional ACU cap for the session. |
structuredOutputSchema | object | Optional JSON schema for Devin structured output. Returned in run output when set. |
createAsUserId | string | Optional Devin organization user ID to create the session as. Requires ImpersonateOrgSessions on the service user. When omitted, the session is created as the integration service user. |
enablePortMcp | boolean | When true, injects session secret MCP_PORT_TOKEN with a short-lived Port token for executionIdentity. Defaults to false. See Managed Port MCP. |
reportCompletion | boolean | When true, keeps the Port run open until the turn completes and streams messages to run logs. Defaults to true. |
config | object | Optional passthrough merged onto the Devin create-session body. Only devin_mode and attachment_urls are allowed; typed inputs above take precedence. |
Node outputs
When the session is created, the node exposes:
| Output | Type | Description |
|---|---|---|
sessionId | string | Devin session ID. Pass to send_message for follow-ups. |
url | string | Link to the session in Devin. |
When reportCompletion is true and the turn completes, outputs also include pull request URLs, structured output (if requested), ACU usage, and start/end timestamps from the session.
Create session with Port MCP (click to expand)
{
"identifier": "create-devin-session",
"title": "Run Devin",
"config": {
"type": "INTEGRATION_ACTION",
"installationId": "<your-installation-id>",
"integrationProvider": "devin",
"integrationInvocationType": "create_session",
"executionIdentity": { "type": "actor" },
"integrationActionExecutionProperties": {
"prompt": "{{ .outputs.trigger.prompt }}",
"repos": ["{{ .outputs.trigger.repository }}"],
"enablePortMcp": true,
"reportCompletion": true
}
}
}
Send message
Sends a follow-up message to an existing Devin session. The action fails with Session busy when Devin is still working on a previous turn or another Port run is waiting on the same session.
Execution properties
| Field | Type | Description |
|---|---|---|
sessionId | string | Required. Devin session ID, for example devin-0123456789abcdef. |
message | string | Required. Follow-up message for Devin. |
messageAsUserId | string | Optional Devin organization user ID to send as. Requires ImpersonateOrgSessions when set. |
enablePortMcp | boolean | When true, injects MCP_PORT_TOKEN for this turn. Defaults to false. See Managed Port MCP. |
reportCompletion | boolean | When true, waits for this turn to finish. Defaults to true. Only this turn's messages are posted to the run log. |
config | object | Optional passthrough. Only devin_mode and attachment_urls are allowed. |
Node outputs
Same shape as create session outputs for sessionId, url, and completion fields when reportCompletion is true.
Send follow-up message (click to expand)
{
"identifier": "send-devin-message",
"title": "Follow up with Devin",
"config": {
"type": "INTEGRATION_ACTION",
"installationId": "<your-installation-id>",
"integrationProvider": "devin",
"integrationInvocationType": "send_message",
"integrationActionExecutionProperties": {
"sessionId": "{{ .outputs.create.sessionId }}",
"message": "{{ .outputs.trigger.message }}",
"reportCompletion": true
}
}
}
Terminate session
Terminates a Devin session. If a Port run is still waiting on the session (reportCompletion: true), that run is reported as failed.
| Field | Type | Description |
|---|---|---|
sessionId | string | Required. Devin session ID. |
archive | boolean | When true, also archives the session. Defaults to false. |
Archive session
Archives a Devin session without terminating an in-flight turn.
| Field | Type | Description |
|---|---|---|
sessionId | string | Required. Devin session ID. |
Execution identity
Set executionIdentity on the node config (next to integrationInvocationType), not under integrationActionExecutionProperties. create_session and send_message allow actor and service_account only.
| Shape | When to use |
|---|---|
{ "type": "actor" } | Self-service runs. Resolves to the user who triggered the workflow. Not valid on automation/timer triggers. |
{ "type": "service_account", "identifier": "<sa>@serviceaccounts.getport.io" } | Automations and headless runs. Identifier must be a literal (no JQ). Admins only when authoring the workflow. |
Managed Port MCP
Port MCP lets Devin read and update your Context Lake during a session. On Devin, credentials are injected as a session secret, not a vault.
Requirements
enablePortMcp: trueoncreate_sessionorsend_message.executionIdentityon the nodeconfigso workflow-service can mint a short-lived Port access token at claim time (portAccessTokenon the run).
At action time, the integration adds a Devin session_secrets entry with key MCP_PORT_TOKEN. The value is the minted token. There is no configurable secret key name.
One-time Devin setup
In your Devin organization, add a Customize MCP HTTP server (for example named port) that points at your region's Port MCP URL:
{
"mcpServers": {
"port": {
"url": "https://mcp.port.io/v1",
"headers": {
"Authorization": "Bearer ${MCP_PORT_TOKEN}"
}
}
}
}
Use https://mcp.us.port.io/v1 for US Port organizations. Devin substitutes ${MCP_PORT_TOKEN} from the session secret the integration injects on each run.
The Ocean integration does not create or update this MCP definition. See the Port MCP server overview and Ocean PR #4629.
- Self-service:
"executionIdentity": { "type": "actor" }. - Automations:
"executionIdentity": { "type": "service_account", "identifier": "<sa>@serviceaccounts.getport.io" }.
Impersonation
createAsUserId and messageAsUserId attribute work to a specific Devin organization member. Values are Devin user IDs (not emails). The integration service user needs ImpersonateOrgSessions. When omitted, actions run as the service user.