
Announcements
I have a Web API method that returns a PDF file along with the Content Type of application/pdf. However, I can't get Power Automate to present its response "body" as a selectable content element in my flow.
I'm sure this is to do with the way I've described my method in the swagger document (see below). How do I write the swagger to tell Power Automate to use the response body so I can present it to (for example) a "Create File (Sharepoint)" action? I've set the 200 schema to {type: file; format: binary} but I've tried {type: file} on it's own too.
/*
swagger: '2.0'
info: {title: xxxxx, version: '1.0', description: xxxxx}
host: xxxxx.azurewebsites.net
basePath: /api
schemes: [https]
consumes: []
produces: []
paths:
/FrontPageGenerator:
post:
description: Output a PDF
operationId: FrontPageGenerator
summary: FrontPageGenerator
parameters:
- in: body
name: FrontPageGeneratorRequestBody
description: Request payload - a json object of FrontPageGenerator data
required: true
schema: {$ref: '#/definitions/GenericJson'}
consumes: [application/json]
produces: [application/json, application/pdf]
responses:
'200':
description: Successfully generated PDF
schema: {type: file; format: binary}
headers:
'Content-Type:': {description: 'Content-Type:', type: string}
'Accept:': {description: 'Accept:', type: string}
definitions:
GenericJson: {type: object}
parameters: {}
responses: {}
securityDefinitions: {}
tags: []
*/
Any advice would be most welcome!