Skip to main content

Outlook mail

Mount @bijectionhq/app-imap in Graph mode. Use one mailbox directory object ID and one actual mail folder ID. Bind the receiver and the mount under the same declared label.

Mount and start

mailbox({ data, graph }) returns the app to place at a path of your tree. Bind the Graph receiver with graphMailboxReceiver(auth, label).
app.ts
graphMail.operator is granted from code: ctx.grant(graphMail.operator, { to, under }) in one of your mutations (Grants). The mount’s operator role clears data and is the only role its functions allow: graphMail.source.*, graphMail.metadata.list, graphMail.content.*. Give the principal Mail.Read access to the selected mailbox and folder. The receiver also accepts a reviewed oauth2 credential. This mode uses the global graph.microsoft.com origin. Message delta and permissions

Position and limits

The app asks for immutable IDs on every page. The returned ID keys the metadata row within this folder. payload is JSON text containing the observed subject, conversation, folder, receipt time, read state and attachment presence. A partial update changes only fields the answer states. An explicit @removed withdraws the row from the folder, including when a message moves out of scope. Immutable Outlook IDs The initial delta round publishes the folder baseline when its final page lands. Each subsequent page commits its changes and full continuation together. The app checks each next or delta link against the same origin, mailbox and folder. It accepts at most 32 entries per page within the 64 KiB encoded task result budget and 4,096 characters of retained cursor text. source.progress reports the revision and gap instant. source.poll, source.pause and source.resume take the current revision. HTTP 410 on a held cursor requires source.reset with revision and gapAt. The previous folder view stays visible until the replacement baseline finishes. Page metadata.list({ cursor }): it returns { facts, next }, and next is the following call’s cursor. A new baseline has one day to finish, including time spent paused. An expired baseline keeps the previous view. Reset the source and resume it if it is paused.

Message Files

The app pins the immutable message ID and changeKey, reads MIME through $value, and checks the same identity again before publication. The raw MIME File and embedded attachment Files are available through content.get. Call content.requestAttachment with the message key and a Graph attachment id for a direct $value read of a file or item attachment. That read also checks the parent message before and after staging. The raw MIME and up to 32 attachment Files share an 8 MiB budget. Within one permit, the receiver uses 512 KiB HTTP ranges when Graph returns an exact partial response with a strong ETag. It sends that ETag with If-Match on later ranges and checks Graph’s changeKey before and after the read. When the range probe yields a complete answer, the receiver streams that same body. A partial answer without a usable validator falls back to one complete download. Publication checks the whole-body digest and retires the private File parts in the same commit. A changed version, validator, length or digest refuses the capture. Metadata remains available while content is pending or refused. content.retry requests a fresh raw capture for the same item. Graph MIME · Graph attachment reads

OneDrive and SharePoint Online

Mount @bijectionhq/app-rest using the REST installation guide. Use the Graph drive ID of one OneDrive account or SharePoint Online document library. Teams channel Files are stored in SharePoint document libraries. Choose the drive for the site that owns those Files.
app.ts
Use the same drive ID in the receiver and the source profile. Percent-encode ! as %21 in the receiver path and keep it literal in the selection. Pass the receiver as receivers.provider and bind it and the mount under the same data label. Use a sealed bearer or OAuth2 credential with Files read permission for the chosen drive. Initialize with:
The first walk enumerates the drive and publishes each page as it lands. The app keys rows by exact drive item ID, keeps the last event within each page, and withdraws IDs with a deleted facet. The next or delta position stays scoped to the drive and commits with the page. The completed delta position persists between polls. HTTP 410 stops the source for source.reset at the reviewed revision and gap instant. A replacement walk keeps prior rows that it does not explicitly withdraw. Each page fits at most 32 items and 36 KiB of JSON. Drive delta and permissions

Capture drive Files

When the published row is a file with an ETag, bind the File reader for the same drive and pass it as receivers.graphContent.
Choose the exact HTTPS download hostname reviewed for this installation. The supported hosts are onedrive.com and hostnames under onedrive.com, files.1drv.com or sharepoint.com. Set the Files credential of the File receiver. The driver refuses any other redirect authority and keeps the signed download URL in the driver. The download request has its own headers and presents no Graph authorization. The operator calls drive.files.request and drive.files.get. Request the item key to capture the current File. A matching in-flight or ready request returns the retained state. A refused capture can be requested again. Read the state, size, Graph version ID and File reference with files.get. The driver checks the observed item ETag and most recent driveItemVersion before and after download. It accepts a complete response of the checked length or ranges with exact offsets and a strong validator across multiple ranges. The File limit is 8 MiB and the mount permits four concurrent captures. A subsequent changed ETag or item deletion withdraws the captured File. Drive item versions · Drive content

Teams channels

Mount @bijectionhq/app-rest with providerEndpoint and the mode microsoft-graph.team.channels.observations. Bind https://graph.microsoft.com and /v1.0/teams/<team-id>/channels. Supply the same team GUID as selection, with limit: 100. Use sealed Graph authorization with read access to the team’s channels, and bind the mount and the receiver under the same data label. Each sweep reads the channels visible to that credential and keys the metadata by channel ID. The app reuses a continuation only within that team and restarts when it reaches the last page. Missing channels remain published. A response must fit 100 rows and 36 KiB. Read channel Files through their SharePoint drive. List channels and permissions

Write list items

Follow the native write mount guide. Use mode microsoft-graph.list-items.create-update-delete with providerWriter and endpoint https://graph.microsoft.com, passed in receivers.writers under that mode. Use scope: ["TENANT.sharepoint.com", "SITE_COLLECTION_UUID", "SITE_UUID", "LIST_UUID"] and seal an OAuth credential authorized to write the installed SharePoint list. Create takes { fields: { … } } and requires HTTP 201 with the new item ID. Update takes a field-value object and accepts the HTTP 200 field-set response for the requested item. Delete accepts HTTP 204 for removal of the exact list item. Use decimal item IDs as text. The writer records evidence under the mount’s label. Commands take up to 24 KiB of JSON and carry no read cursor. Provider write API

Directory, Planner, To Do, OneNote and Teams messages

Bind one @bijectionhq/app-rest mount per collection with providerEndpoint at https://graph.microsoft.com. Seal a bearer or OAuth2 credential with the permissions for the selected API. Bind a protected data label to the receiver and the mount. Use the mode from the table as profile.provider. Put the indicated IDs in selection as literal text, separated by slashes when there is more than one ID. In the installed path, percent-encode each ID segment independently. For example, write %3A and %40 in a Teams channel ID and %21 in a OneNote ID. The route must match the source selection. Directory, Planner, To Do and OneNote modes accept up to 100 rows per response. Graph controls the Planner page size. Teams accepts up to 50. All modes cap inline answers at 36 KiB and publish by provider object ID. OneNote reads metadata for notebooks, direct sections and pages. HTML page content requires a separate read outside these modes. Graph paging positions stay on the exact installed collection. OneNote uses ordered traversal offsets and advances after a full window even when Graph omits a next link. These sweeps restart at the end. A Teams message or reply with deletedDateTime withdraws that ID. Missing objects remain published, including when a credential loses access. Planner · To Do · OneNote · Teams messages

OneNote page HTML

Bind a separate protected REST mount with mode microsoft-graph.onenote.page.content and path /v1.0/users/USER/onenote/pages/PAGE/content at https://graph.microsoft.com. Set selection to the literal USER/PAGE pair and limit: 1. Apply the same path encoding and OneNote read authorization as for page metadata. The app publishes one UTF-8 HTML record by page ID, up to 36 KiB. Linked assets stay remote. The read carries no cursor, and a failed read keeps the prior observation. OneNote page content