Scheduled agents can't upload files to SharePoint (or any connector) because prepare_file_for_sending_to_connector fails with "Agent space is not available" in the scheduled agent sandbox — blocking any automation that creates a file and needs to push it

I’m building a scheduled agent that runs every 30 minutes to automatically pull Zoom meeting summary emails from Outlook, convert them to .docx files, and upload them to a SharePoint document library where they get indexed by a separate AI agent for team-wide search. Everything in the pipeline works — email search, HTML parsing, .docx creation, sensitivity filtering, deduplication — except the final upload step. SharePoint V2’s UploadFile requires a signed_url from prepare_file_for_sending_to_connector, but that function fails with “Agent space is not available: not signed in” in the scheduled agent sandbox. The same error occurs in background tasks (start_task) and forked contexts. The upload only works in the main conversation context, which defeats the purpose of automation. This likely blocks any scheduled workflow that needs to create a file and push it to any connector (SharePoint, OneDrive, etc)

Hi @rteich

Welcome to the Quick community!

Thank you for the detailed write-up, your debugging and diagnosis are excellent, and I appreciate you taking the time to lay out the full pipeline.

Current limitation: prepare_file_for_sending_to_connector requires an active interactive session context (agent space) to mint the signed URL. This context is not available in scheduled agent runs, background tasks (start_task), or forked contexts. This affects any automated workflow that creates a file and pushes it to a connector SharePoint, OneDrive, Gmail attachments, etc. It’s a platform limitation, not a misconfiguration on your end.

Workarounds:

Stage locally, upload interactively: Run your full pipeline on the schedule but save .docx files to a local staging folder. Trigger the SharePoint upload from a regular conversation where the tool works.

OneDrive/SharePoint sync client: Write files to a locally synced folder and let the sync client handle the upload automatically.

Browser automation: The browser skill can potentially upload files to SharePoint via the web UI, bypassing the connector path, though browser availability in scheduled contexts may vary and would need validation on your end.

Custom MCP server: A custom MCP server wrapping the Microsoft Graph API with its own auth could serve as an alternative upload path worth exploring, though you’d want to confirm MCP tool calls work as expected in scheduled runs.

I’ve marked this as a feature request to promote visibility to the product team.