Canvas LMS · Arazzo Workflow

Canvas LMS Find or Create Assignment

Version 1.0.0

Search a course for an assignment by name and create it only when it is missing.

1 workflow 1 source API 1 provider
View Spec View on GitHub Learning ManagementEducationEdTechLMSLTIHigher EducationK-12Open-SourceAGPLCanvasArazzoWorkflows

Provider

canvas-lms

Workflows

find-or-create-assignment
Upsert an assignment into a course by name, creating it only if absent.
Searches the course assignments for the supplied name; if one exists it is read back, otherwise a new assignment is created.
3 steps inputs: courseId, name, pointsPossible outputs: createdAssignmentId, existingAssignmentId
1
searchAssignments
Search the course assignments using the supplied name as the search term, returning matching assignments.
2
readExisting
Read the matched assignment back by id to return its full record.
3
createNew
Create a new assignment with the supplied name and point value when no existing assignment matched.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Canvas LMS Find or Create Assignment
  summary: Search a course for an assignment by name and create it only when it is missing.
  description: >-
    An idempotent authoring flow for Canvas. The workflow searches a course's
    assignments for one matching the supplied name and then branches: when a
    match is found it reads that existing assignment, and when no match is found
    it creates a new assignment. This avoids duplicating assignments when a
    sync job runs repeatedly. Every step spells out its request inline so the
    flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: assignmentsApi
  url: ../openapi/canvas-lms-assignments-api-openapi.yml
  type: openapi
workflows:
- workflowId: find-or-create-assignment
  summary: Upsert an assignment into a course by name, creating it only if absent.
  description: >-
    Searches the course assignments for the supplied name; if one exists it is
    read back, otherwise a new assignment is created.
  inputs:
    type: object
    required:
    - courseId
    - name
    - pointsPossible
    properties:
      courseId:
        type: string
        description: The Canvas course id to search and write into.
      name:
        type: string
        description: The assignment name to search for and create if missing.
      pointsPossible:
        type: number
        description: The maximum points for the assignment when it must be created.
  steps:
  - stepId: searchAssignments
    description: >-
      Search the course assignments using the supplied name as the search term,
      returning matching assignments.
    operationId: listAssignments
    parameters:
    - name: course_id
      in: path
      value: $inputs.courseId
    - name: search_term
      in: query
      value: $inputs.name
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      matchedAssignmentId: $response.body#/0/id
    onSuccess:
    - name: assignmentExists
      type: goto
      stepId: readExisting
      criteria:
      - context: $response.body
        condition: $.length > 0
        type: jsonpath
    - name: assignmentMissing
      type: goto
      stepId: createNew
      criteria:
      - context: $response.body
        condition: $.length == 0
        type: jsonpath
  - stepId: readExisting
    description: >-
      Read the matched assignment back by id to return its full record.
    operationId: getAssignment
    parameters:
    - name: course_id
      in: path
      value: $inputs.courseId
    - name: assignment_id
      in: path
      value: $steps.searchAssignments.outputs.matchedAssignmentId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      assignmentId: $response.body#/id
      name: $response.body#/name
    onSuccess:
    - name: done
      type: end
  - stepId: createNew
    description: >-
      Create a new assignment with the supplied name and point value when no
      existing assignment matched.
    operationId: createAssignment
    parameters:
    - name: course_id
      in: path
      value: $inputs.courseId
    requestBody:
      contentType: application/json
      payload:
        assignment:
          name: $inputs.name
          points_possible: $inputs.pointsPossible
          submission_types:
          - online_text_entry
          published: true
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      assignmentId: $response.body#/id
      name: $response.body#/name
  outputs:
    existingAssignmentId: $steps.readExisting.outputs.assignmentId
    createdAssignmentId: $steps.createNew.outputs.assignmentId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/canvas-lms-find-or-create-assignment-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.