Outbound SharePoint Binary Stage
The Outbound SharePoint Binary stage allows binary messages, such as PDFs and images, to be exported to an external SharePoint site.
Stage Overview
The Outbound SharePoint Binary stage allows binary formatted messages (e.g. PDFs, images, etc.) to be exported from the Integration Hub service to an external SharePoint site.
For sending text-based messages to an external SharePoint site, see the Outbound SharePoint stage.
The Outbound SharePoint Binary stage was added in Integration Hub v5.0.0.
Logic Apps only support connecting SharePoint using the credentials of a standard user account - the use of a Service Principal App Registration to connect to SharePoint is not supported. MFA and Conditional Access Policies may need to be configured with appropriate exemptions to allow ongoing use of the account.
Stage Definition File Location
All Outbound SharePoint Binary stages are defined by creating an appropriately formatted JSON definition file in the following location:
Stage JSON Definition File Format
The JSON definition file for an Outbound SharePoint Binary stage is as follows:
{
"name": "stage-name",
"displayName": "Brief Stage Title",
"description": "Brief description of the stage.",
"enabled": "$env:STATUS_<INTEGRATION_NAME>",
"source": "source-event",
"concurrency": 10,
"enableVnet": true,
"sharepointDetails": {
// See Outbound SharePoint stage
},
"emitEvent": "previous-stage-name-1",
"emitError": false,
"emitErrorTerminateSuccess": false,
"leaseLockName": "lock-name"
}
| Property | Sub-Property | Description |
|---|---|---|
name | The name of the stage. | |
displayName | Optional (but highly recommended). A short (3 or 4 word) "display name" for the stage, used as a "title" of the stage in the Integration Hub Portal service's self-documentation capability. | |
description | Optional (but highly recommended). A brief (10 to 15 word) description of the stage, used as a brief description of the stage's purpose in the Integration Hub Portal service's self-documentation capability. For a more detailed explanation (when needed), use the stage markdown feature. | |
enabled | Optional boolean flag (true or false). Default is true.Generally set via a DevOps variable. Controls if the stage is deployed enabled or not. | |
source | The source event that the stage subscribes to. See Pub/Sub Model. Alternatively, sources may be supplied, and an array of one or more source events can be subscribed to. | |
concurrency | Optional number of concurrent runs permitted for the stage. Default is 10. | |
enableVnet | Optional. Boolean flag to indicate if the SharePoint connection should use VNet integration to ensure the use of a fixed IP address or not. Default value is false.VNet integration is only supported when deploying using Standard Logic Apps. | |
sharepointDetails | Details of the SharePoint site to send the binary payload to. The options are the same as the Outbound SharePoint stage. | |
emitEvent | When the upload to the remote SharePoint service is successful, the stage will normally terminate. However, under certain circumstances, it may be desirable to continue workflow processing. The optional emitEvent flag allows the payload of a previously run stage to be output as a message from this stage. The stage must have previously been executed in the run history of the overall Integration Hub integration, with the stage's exported payload details being present in the Cloud Event Attributes section. | |
emitError | Optional boolean flag (true or false). Default is false. When true, the stage will capture and emit a payload if a non-retryable error is detected, or if a retryable error is detected on the final retry attempt. See the Emit Error Payload section below for more details. | |
emitErrorTerminateSuccess | Optional boolean flag (true or false). Default is false. When true, and when emitError is also true, the stage will terminate with a Successful state, rather than a Failed state, in the event of an error being detected and emitted.When the stage is configured to operate in this way, the integration should be defined so that a subsequent stage, or series of stages, will be triggered by the emitted error payload to "handle" the error condition in such a way that reporting and alerting on the error (as would happen if the stage terminated with a Failed state) is unnecessary. | |
leaseLockName | Optional. See Lease Locking. |
SharePoint Connection Setup
The setup of an Outbound SharePoint Binary stage's API Connection resource is the same as for an Inbound SharePoint stage.
Required Payload Format
This stage must be triggered with a payload in the following format:
{
"filename": "filename.pdf",
"base64": "base64pdf"
}
| Property | Description |
|---|---|
filename | The full name of the file that will be created on the remote SharePoint site. |
base64 | A Base64 encoded string of the file's contents. This string will be decoded into binary during creation of the remote file on the SharePoint site. |
Emit Error Payload
In the event that the emitError option has been set to true and:
- a non-retryable error is detected when calling the external SharePoint service; or
- a retryable error is detected on the final retry attempt
then the stage will emit an error payload.
There is no defined format for the error payload that is emitted, as it depends on the Azure SharePoint action.
The event used to emit the payload will be the full stage name with -error appended, e.g. out-sp-binary-stage-name-error.
Last updated on