create_source_connector
Create connectors to extract data from cloud platforms like Azure, Google Drive, OneDrive, Salesforce, S3, and SharePoint for processing with the Unstructured API.
Instructions
Create a source connector based on type. Args: ctx: Context object with the request and lifespan context name: A unique name for this connector source_type: The type of source being created (e.g., 'azure', 'onedrive', 'salesforce', 'gdrive', 's3', 'sharepoint')
type_specific_config:
azure:
remote_url: The Azure Storage remote URL with the format
az://<container-name>/<path/to/file/or/folder/in/container/as/needed>
recursive: (Optional[bool]) Whether to access subfolders
gdrive:
drive_id: The Drive ID for the Google Drive source
recursive: (Optional[bool]) Whether to access subfolders
extensions: (Optional[list[str]]) File extensions to filter
onedrive:
path: The path to the target folder in the OneDrive account
user_pname: The User Principal Name (UPN) for the OneDrive user account
recursive: (Optional[bool]) Whether to access subfolders
authority_url: (Optional[str]) The authentication token provider URL
s3:
remote_url: The S3 URI to the bucket or folder (e.g., s3://my-bucket/)
recursive: (Optional[bool]) Whether to access subfolders
salesforce:
username: The Salesforce username
categories: (Optional[list[str]]) Optional Salesforce domain,the names of the
Salesforce categories (objects) that you want to access, specified as
a comma-separated list. Available categories include Account, Campaign,
Case, EmailMessage, and Lead.
sharepoint:
site: The SharePoint site to connect to
user_pname: The username for the SharePoint site
path: (Optional) The path within the SharePoint site
recursive: (Optional[bool]) Whether to access subfolders
authority_url: (Optional[str]) The authority URL for authentication
Returns:
String containing the created source connector informationInput Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| source_type | Yes | ||
| type_specific_config | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |