- id: list_sites
name: list_sites
tool: SHAREPOINT_LIST_SITES
config:
- name: token
value: "{{secrets.MICROSOFT_GRAPH_SHAREPOINT.access_token}}"
input:
- name: search
value: "engineering"
- id: get_site
name: get_site
tool: SHAREPOINT_GET_SITE_INFORMATION
config:
- name: token
value: "{{secrets.MICROSOFT_GRAPH_SHAREPOINT.access_token}}"
input:
- name: site_url
value: "https://contoso.sharepoint.com/sites/Engineering"
- id: list_documents
name: list_documents
tool: SHAREPOINT_LIST_DOCUMENTS
config:
- name: token
value: "{{secrets.MICROSOFT_GRAPH_SHAREPOINT.access_token}}"
input:
# If you omit drive_id, the tool lists the user's OneDrive (me/drive)
# For SharePoint document libraries, set drive_id to the library's drive ID.
- name: top
value: 10
- id: list_sharepoint_documents
name: list_sharepoint_documents
tool: SHAREPOINT_LIST_DOCUMENTS
config:
- name: token
value: "{{secrets.MICROSOFT_GRAPH_SHAREPOINT.access_token}}"
input:
- name: drive_id
value: "YOUR_SHAREPOINT_DRIVE_ID"
- name: top
value: 10
- id: search_files
name: search_files
tool: SHAREPOINT_SEARCH_FILES
config:
- name: token
value: "{{secrets.MICROSOFT_GRAPH_SHAREPOINT.access_token}}"
input:
# Omit drive_id to search the user's OneDrive (me/drive)
- name: query
value: "quarterly report"
- name: top
value: 25
# "all" (default), "files", or "folders"
- name: filter
value: "files"
- id: upload_file
name: upload_file
tool: SHAREPOINT_UPLOAD_FILE_V2
config:
- name: token
value: "{{secrets.MICROSOFT_GRAPH_SHAREPOINT.access_token}}"
input:
# Omit drive_id to upload to OneDrive (me/drive)
# file accepts a previous step's output file, base64, a data URL, or an HTTP(S) URL
- name: file
value: "{{steps.generate_report.result}}"
- name: filename
value: "report.pdf"
- name: conflict_behavior
value: "rename"
- id: download_file
name: download_file
tool: SHAREPOINT_DOWNLOAD_FILE
config:
- name: token
value: "{{secrets.MICROSOFT_GRAPH_SHAREPOINT.access_token}}"
input:
# item_id is retrieved from SHAREPOINT_LIST_DOCUMENTS results
- name: item_id
value: "{{steps.list_documents.result.items[0].id}}"
# "url" (default) returns a pre-authenticated download URL
# "base64" returns file content as base64 (max 4 MB)
- name: output_format
value: "url"