- You can store files in the specified library using Store file action:
HTTP trigger type allows trigger the action/s execution by sending HTTP request outside Teamsware Studio to the automatically generated URL.
Required headers:
Content-Type: application/json
Optional headers:
x-trigger-key: API key from Trigger tab
Body: application/JSON: Body in JSON format
{
*"RequesterName": "john@contoso.com"
"name": "John Doe",
"message": "Test from Postman"
}*NOTE: The RequesterName property is recommended to use in Body request. The email address is used for notifications for the case of request fails.
Limitation: Size of the body limited to 1MB
200 OK response code "HTTP Request successfully queued for processing".Example of using response headers and body of HTTP request in the actions:
Add Triggered action: In the Teamsware Studio add Triggered Action with HTTP trigger type.
Add configuration list: create configuration list with columns URL and API key. Insert generated URL and API key values from created Triggered Action.
Create Send HTTP action: In Teamsware Studio create an action Send HTTP request - add it on the display form of the list or in the list action, depends on your business logic or configuration:
URL: [[@Functions.GetFirstValueForQuery('Lists/Configurationlist', '<View Scope="Recursive"><Query><Where><Eq><FieldRef Name="Title" /><Value Type="Text" ProviderType="Expression">HTTP trigger configuration data</Value></Eq></Where></Query></View>', 'URL')]]
Request type: POST
Headers:
Content Type - application/json
x-trigger-key - [[@Functions.GetFirstValueForQuery('Lists/Configurationlist', '<View Scope="Recursive"><Query><Where><Eq><FieldRef Name="Title" /><Value Type="Text" ProviderType="Expression">HTTP trigger configuration data</Value></Eq></Where></Query></View>', 'APIkey')]]
Data:
=JSON.stringify({
"RequesterName": "john@contoso.com",
"username": "johndoe",
"password": "SecurePass123!"
})Deploy to the target site: Create package and publish to the target site.
Get URL and API key for target site: After deployment in the Teamsware Studio navigate to the Publish tab -> Deployments, open the deployment. On the panel navigation to Maintenance, Click on 'Show HTTP request details'.
Copy the URL and API key and insert to the configuration list on the target site: This dialog provides the URL and API key required to trigger the deployed Triggered Action
Required headers:
Content-Type: multipart/form-data
Optional headers:
x-trigger-key: API key from Trigger tab
Body:
Body → form-data
Key: file (type File)
In the form-data body it is possible also send JSON data:
Key: payload (type Text)
Limitations:
- Maximum 10 files allowed per HTTP request
- File - maximum 20 MB per file -> 200 MB total
- Maximum body size - 1 MB
- Allowed/Supported file extension: .JPG, .JPEG, ,PNG, .GIF, .BMP, .WEBP, .PDF, .DOCX, .XLSX, .PPTX, .TXT, .DOC, .XLS, .PPT, .CVS, .JSON
200 OK response code "HTTP Request successfully queued for processing".Examples of using files from the response of HTTP trigger request:
You can use files as output parameter and used it in subsequent actions, for example in Send Email action: