Skip to content
KiweelyKiweelyKiweely

Reading Integration Launch Attachments, Calling SOAP Integrations API, and Uploading ZIPs to Workday Drive in O4I

In Orchestrate for Integrations (O4I), read launch files via an Integration Retrieval Service (‘Attach file at launch’) and documents.get(0). For Get_Event_Documents over SOAP, use /soap/v46.2/Integrations with .wrapSoapV11(), and test Workday Drive ZIP uploads outside Debug Mode.

  • Checked against Workday on
  • Applies to Workday Orchestrate
  • 3 min read
  • Published
  • By Kiweely
On this page

Why an Integration Attachment Launch Parameter Cannot Be Read by documents.get(0) in O4I

When building an Orchestrate for Integrations (O4I) orchestration where a user uploads an input file at launch (for example, an ID scan for Document Intelligence or an ad-hoc CSV file), developers often add a custom Integration Attachment launch parameter to the Integration System. At runtime, that approach fails across every standard document retrieval API:

  • lp.referenceData("document", "File_ID") returns a reference of format INTEGRATION_ATTACHMENT-17-xxxx, which is designed exclusively for Enterprise Interface Builder (EIB) spreadsheets rather than Document_ID blobitory retrieval.
  • documents.getDocumentCount() returns 0.
  • Calling the Retrieve Document component or GET /myReports/<File_ID> returns HTTP 404 Not Found (No entry at tenant/...).
  • Calling Get_Event_Documents over SOAP returns 0 results because a launch parameter attachment is not registered as a retrieved event document.

Configuring an Integration Retrieval Service for Manual Attach at Launch

To allow a user to upload a file at integration launch and read its binary content inside an O4I orchestration, configure an Integration Retrieval Service on the Integration System instead of a custom launch parameter:

  1. In the Workday tenant, run View Integration System for your O4I Integration System and select Related Actions > Integration System > Configure Integration Services.
  2. Under Custom Integration Services, add a new Integration Retrieval Service (or enable the standard Document Retrieval service).
  3. Configure the Retrieval Service with Attach file at launch (manual attachment at launch) and set the Security Group receiving the attachment prompt to Initiator (so only the person launching the integration is prompted to attach the file).
  4. When the user runs Launch / Schedule Integration, Workday prompts them to upload the file as part of the launch workflow and attaches it to the integration event with the Retrieved tag.
  5. Inside your O4I orchestration, read the uploaded file directly using the documents global function qualifier:
javascript
// Verify at least one file was attached at launch
documents.getDocumentCount() > 0

// Retrieve the uploaded file as a Data instance
documents.get(0)

// Retrieve the uploaded file's original filename
documents.getFileName(0)

Fixing 404 Not Found and 400 Bad Request on Get_Event_Documents_Request via SOAP

When an orchestration needs to query integration event metadata or documents from another integration event using the Workday Integrations SOAP web service (Get_Event_Documents_Request or Get_Integration_Events_Request) inside a Send Workday API Request step, two configuration mistakes cause 404 and 400 errors:

1. Fixing 404 Not Found: Use /soap/v46.2/Integrations

The Workday Cloud Platform API Gateway routes SOAP requests through /soap/<version>/<Service_Name>, not the direct tenant /ccx/service/<tenant>/<Service_Name>/<version> path used in external SOAP clients. Setting the path to /service/.../Integrations/v45.0 returns 404 {"error":"Not Found"}.

Set the Send Workday API Request method and path to:

  • Method: POST
  • Path: /soap/v46.2/Integrations

2. Fixing 400 Bad Request: Include bsvc:version and Chain .wrapSoapV11()

A Create Text Template (PrepareSoapPayload) typically generates the inner <bsvc:Get_Event_Documents_Request> XML element without an outer <soapenv:Envelope> wrapper. Sending that raw XML element directly to /soap/v46.2/Integrations returns 400 Bad Request.

First, include bsvc:version="v46.2" on the root request element in your Create Text Template (with Content Type set to text/xml or application/xml):

xml
<bsvc:Get_Event_Documents_Request bsvc:version="v46.2" xmlns:bsvc="urn:com.workday/bsvc">
    <bsvc:Request_References>
        <bsvc:Integration_Event_Reference>
            <bsvc:ID bsvc:type="WID">{{data.Start.IntegrationEventWID}}</bsvc:ID>
        </bsvc:Integration_Event_Reference>
    </bsvc:Request_References>
</bsvc:Get_Event_Documents_Request>

Second, on the Body tab of the Send Workday API Request step, select Reference Existing Data and chain .wrapSoapV11() onto the template’s XML output so Orchestrate wraps the payload in a valid SOAP 1.1 envelope:

javascript
data.PrepareSoapPayload.message.asXML().wrapSoapV11()

Why Put_Drive_Document_Content Produces a Corrupted ZIP File in Debug Mode

When aggregating multiple PDFs or files into a Zip Archive inside a Loop aggregation and uploading the resulting archive to Workday Drive via Put_Drive_Document_Content_Request (<bsvc:File>{{data.LoopFiles.ZipOutput.base64encode()}}</bsvc:File>), downloading the .zip file from Workday Drive after running the orchestration in Orchestration Debug Mode yields an invalid, unextractable ZIP archive.

Root Cause: Debug Mode Binary Payload Truncation

Neither .base64encode() nor .base64MimeEncode() is defective. Orchestration Debug Mode instruments and truncates large intermediate binary/base64 payloads to capture step inspection state, which corrupts the central directory at the end of the ZIP stream before Put_Drive_Document_Content_Request sends it to Workday Drive.

When the exact same asynchronous orchestration is triggered normally from an Extend presentation page (or launched as a standard integration event outside Debug Mode), {{data.LoopFiles.ZipOutput.base64encode()}} uploads a complete, extractable .zip file to Workday Drive.


Verifying Document Retrieval and Drive Uploads in Your Tenant

  1. Launch your O4I Integration System in the tenant via Launch / Schedule Integration, attach a sample file at the Integration Retrieval Service prompt, and verify in Orchestration Activity that documents.getDocumentCount() evaluates to 1 and documents.getFileName(0) matches the uploaded filename.
  2. For Get_Event_Documents_Request, verify that Send Workday API Request uses /soap/v46.2/Integrations with .wrapSoapV11() and returns HTTP 200 with <wd:Get_Event_Documents_Response>.
  3. For Workday Drive ZIP uploads, trigger the asynchronous orchestration from your Extend page or normal runtime trigger (not DebugOrchestrations), download the generated .zip from Workday Drive, and extract the archive to confirm all entries are intact.

Sources checked

Related guides

All guides

Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.

We’ll email you once to confirm. Unsubscribe in one click from any issue.