> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opennous.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Run a workflow now

> Run once now. Deal triggers run on the most recent deal that hit the trigger in the last 90 days. `clock`, `before_meeting`, and `manual` run one agent turn on the prompt. Other triggers return 409.

<Note>
  Workflows are in beta. Today the runner executes the first agent step and the first send step. Email and webhook sends are delivered. A Slack step is recorded, but Slack delivery is not wired yet. Other step types are validated and saved but not executed yet.
</Note>

Runs a workflow once, now.

| Trigger | What a run does |
| - | - |
| Deal triggers (`deal_closed_won`, `deal_closed_lost`, `deal_stage_changed`) | Runs on the most recent deal that hit the trigger in the last 90 days. Returns `nothing_to_run_on` when there is none. |
| `clock`, `before_meeting`, `manual` | Runs one agent turn on the workflow's prompt. Needs an agent step with a prompt. |
| Anything else | Returns `409 run_not_supported`. |


## OpenAPI

````yaml POST /v2/workflows/{id}/run
openapi: 3.1.0
info:
  title: OpenNous REST API
  version: 2.0.0
  description: >-
    Read and write the OpenNous revenue context graph over HTTP. Authenticate
    with a workspace API key.
servers:
  - url: https://api.opennous.cloud
    description: OpenNous Cloud
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: People
  - name: Accounts
  - name: Deals
  - name: Notes
  - name: Attention
  - name: Insights
  - name: Enrich & score
  - name: Organization
  - name: Workflows
  - name: Webhooks
    description: >-
      Subscribe to events and have them pushed to your own stack, with the
      account record attached.
  - name: Usage
paths:
  /v2/workflows/{id}/run:
    post:
      tags:
        - Workflows
      summary: Run a workflow now
      description: >-
        Run once now. Deal triggers run on the most recent deal that hit the
        trigger in the last 90 days. `clock`, `before_meeting`, and `manual` run
        one agent turn on the prompt. Other triggers return 409.
      operationId: runWorkflow
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Workflow id.
          example: 6a5b4c3d-2e1f-4a0b-9c8d-7e6f5a4b3c2d
      responses:
        '200':
          description: The run.
          content:
            application/json:
              schema:
                type: object
                properties:
                  run_id:
                    type:
                      - string
                      - 'null'
                  status:
                    type: string
                    description: '`ok`, `error`, `running`, or `nothing_to_run_on`.'
                  document_id:
                    type: string
                  thread_id:
                    type: string
                  detail:
                    type: string
              examples:
                ran:
                  summary: Ran
                  value:
                    run_id: r1
                    status: ok
                    thread_id: t1
                nothing:
                  summary: No deal hit the trigger
                  value:
                    run_id: null
                    status: nothing_to_run_on
                    detail: >-
                      No account has hit this trigger in the last 90 days, so
                      there is nothing to run it on yet.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: The plan lacks the in-app agent, or credits ran out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                feature_not_in_plan:
                  summary: feature_not_in_plan
                  value:
                    error: feature_not_in_plan
                    feature: inAppAgent
                out_of_credits:
                  summary: out_of_credits
                  value:
                    error: out_of_credits
                    run_id: r1
                    status: skipped
        '403':
          $ref: '#/components/responses/ReadOnlyKey'
        '404':
          description: No such workflow, or it belongs to another member.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: workflow_not_found
        '409':
          description: This workflow can't run on demand.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: run_not_supported
                trigger: call_ended
                detail: Nothing runs a "call_ended" workflow on demand yet.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          description: The run failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: run_failed
                run_id: r1
components:
  responses:
    Unauthorized:
      description: Missing, unknown, or expired API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: api_key_required
              value:
                error: api_key_required
            invalid:
              summary: invalid_api_key
              value:
                error: invalid_api_key
            expired:
              summary: api_key_expired
              value:
                error: api_key_expired
                detail: >-
                  This API key has expired. Create or rotate a key to get a
                  fresh one.
    ReadOnlyKey:
      description: A read-only key called a write endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: read_only_key
            detail: >-
              This API key is read-only — it can read context but cannot record,
              modify, connect, or send. Use a read/write key for write
              operations.
    RateLimited:
      description: More than 600 requests in a minute on this key.
      headers:
        RateLimit-Limit:
          schema:
            type: integer
          description: Requests allowed per window.
        RateLimit-Remaining:
          schema:
            type: integer
          description: Requests left in the window.
        RateLimit-Reset:
          schema:
            type: integer
          description: Seconds until the window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: rate_limited
  schemas:
    Error:
      type: object
      description: >-
        Every error response. `error` is a stable machine code. Some errors add
        fields such as `detail`, `supported`, `max`, or `reason`.
      required:
        - error
      properties:
        error:
          type: string
          description: Machine-readable error code.
        detail:
          type: string
          description: Human-readable explanation, when there is one.
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Workspace API key. Create one in **Settings → API keys**.
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: The same key, sent as a header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.