Implements the Mailform connector (#3139)
* Implements the Mailform connector * Remodelled to include all required sections from https://github.com/microsoft/PowerPlatformConnectors/blob/dev/templates/certified-connectors/readme.md and to use spaces instead of tabs
This commit is contained in:
Родитель
4a81c2244f
Коммит
184e7806c0
|
@ -0,0 +1,46 @@
|
|||
# Mailform
|
||||
The Mailform Connector for Power Automate is designed to make it easy to print and mail documents, letters and invoices, directly from your Power Apps or Power Automate flows.
|
||||
|
||||
## Publisher: Mailform, Inc.
|
||||
|
||||
Published by Mailform, the easiest way to print and mail documents, letters and invoices online. Send FedEx Standard Overnight, USPS Priority, Express, Certified & First Class Mail letters and postcards.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You will need the following to proceed:
|
||||
* A Mailform account with a valid, non-zero credit account (to pay for your print and mail jobs). Sign up for free at [Mailform](https://www.mailform.io)
|
||||
|
||||
## Supported Operations
|
||||
|
||||
### Print and mail a letter or postcard
|
||||
|
||||
This action takes a PDF (for a letter) or a PDF, PNG or JPEG (for a postcard) as well as the address information and delivery service and then creates an order that prints and mails the document according to the parameters passed.
|
||||
|
||||
|
||||
### Retrieve order details
|
||||
|
||||
This action takes an order identifier and returns the order details, including any tracking number associated with the order.
|
||||
|
||||
### Retrieve user details
|
||||
|
||||
This action retrieves the user's name, email address, return addresses and credit balance.
|
||||
|
||||
## Obtaining Credentials
|
||||
|
||||
Users need to authenticate using a Mailform API key obtained from their Mailform account.
|
||||
|
||||
To generate an API key, first sign into your [Mailform account](https://www.mailform.io), and then visit your [Mailform API Access](https://www.mailform.io/webapp/account.html#/api) page. Click the ***New API Token*** button to create a new API token. Save the token value: it won't be shown again.
|
||||
|
||||
## Known Issues and Limitations
|
||||
|
||||
None
|
||||
|
||||
## Deployment Instructions
|
||||
|
||||
To deploy this connector:
|
||||
|
||||
- Access your Power Automate environment.
|
||||
- Navigate to 'Custom Connectors'.
|
||||
- Import the provided connector definition.
|
||||
- Enter the required authentication details.
|
||||
- Test the connector to ensure functionality.
|
|
@ -0,0 +1,473 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Mailform",
|
||||
"description": "The easiest way to print and mail letters and postcards: USPS First Class, Certified, Priority and Priority Express Mail.",
|
||||
"version": "1.0",
|
||||
"contact": {
|
||||
"name": "Mailform Support",
|
||||
"email": "support@mailform.io",
|
||||
"url": "https://help.mailform.io"
|
||||
}
|
||||
},
|
||||
"x-ms-connector-metadata": [
|
||||
{
|
||||
"propertyName": "Website",
|
||||
"propertyValue": "https://www.mailform.io"
|
||||
},
|
||||
{
|
||||
"propertyName": "Privacy Policy",
|
||||
"propertyValue": "https://www.mailform.io/privacy"
|
||||
},
|
||||
{
|
||||
"propertyName": "Terms of Service",
|
||||
"propertyValue": "https://www.mailform.io/terms"
|
||||
},
|
||||
{
|
||||
"propertyName": "Categories",
|
||||
"propertyValue": "Business Management;Marketing"
|
||||
}
|
||||
],
|
||||
"host": "www.mailform.io",
|
||||
"basePath": "/app/api/",
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/v1/orders": {
|
||||
"post": {
|
||||
"summary": "Prints and mails a letter or postcard using Mailform",
|
||||
"description": "Creates a new Mailform order by providing the print proof as well as the order details (class of service, color/black and white, single-sided/double-sided printing and more)",
|
||||
"operationId": "CreateOrder",
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "file",
|
||||
"in": "formData",
|
||||
"type": "file",
|
||||
"description": "The PDF document to be mailed",
|
||||
"x-ms-summary": "File"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"in": "formData",
|
||||
"type": "string",
|
||||
"description": "URL from PDF will be downloaded",
|
||||
"x-ms-summary": "URL"
|
||||
},
|
||||
{
|
||||
"name": "customer_reference",
|
||||
"in": "formData",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "An optional customer reference to be attached to the order",
|
||||
"x-ms-summary": "Customer Reference"
|
||||
},
|
||||
{
|
||||
"name": "service",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The delivery service to be used. Must be one of the specified values",
|
||||
"enum": [
|
||||
"USPS_PRIORITY_EXPRESS",
|
||||
"USPS_PRIORITY",
|
||||
"USPS_CERTIFIED_PHYSICAL_RECEIPT",
|
||||
"USPS_CERTIFIED_RECEIPT",
|
||||
"USPS_CERTIFIED,",
|
||||
"USPS_FIRST_CLASS",
|
||||
"USPS_POSTCARD"
|
||||
],
|
||||
"default": "USPS_FIRST_CLASS",
|
||||
"x-ms-summary": "Delivery Service"
|
||||
},
|
||||
{
|
||||
"name": "webhook",
|
||||
"in": "formData",
|
||||
"type": "string",
|
||||
"description": "The webhook that should receive notifications about order updates to this order",
|
||||
"x-ms-summary": "Notification Webhook"
|
||||
},
|
||||
{
|
||||
"name": "simplex",
|
||||
"in": "formData",
|
||||
"type": "boolean",
|
||||
"description": "True if the document should be printed one page to a sheet, false if the document can be printed on both sides of a sheet",
|
||||
"x-ms-summary": "Single/Double Sided"
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"in": "formData",
|
||||
"type": "boolean",
|
||||
"description": "True if the document should be printed in color, false if the document should be printed in black and white",
|
||||
"x-ms-summary": "Color/Black & White"
|
||||
},
|
||||
{
|
||||
"name": "flat",
|
||||
"in": "formData",
|
||||
"type": "boolean",
|
||||
"description": "True if the document MUST be mailed in a flat envelope, false if it is acceptable to mail the document folded",
|
||||
"x-ms-summary": "Include Flat Envelope"
|
||||
},
|
||||
{
|
||||
"name": "return_envelope",
|
||||
"in": "formData",
|
||||
"type": "boolean",
|
||||
"description": "True if the document MUST be mailed with a return envelope. Do not specify if no return envelope is needed",
|
||||
"x-ms-summary": "Include Return Envelope"
|
||||
},
|
||||
{
|
||||
"name": "stamp",
|
||||
"in": "formData",
|
||||
"type": "boolean",
|
||||
"description": "True if the document MUST use a real postage stamp, false if it is acceptable to mail the document using metered postage or an imprint",
|
||||
"x-ms-summary": "Use Real Stamp"
|
||||
},
|
||||
{
|
||||
"name": "message",
|
||||
"in": "formData",
|
||||
"type": "string",
|
||||
"description": "The message to be printed on the non-picture side of a postcard. Required if the service is set to USPS_POSTCARD",
|
||||
"x-ms-summary": "Postcard Message"
|
||||
},
|
||||
{
|
||||
"name": "to.name",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the recipient of this envelope or postcard",
|
||||
"x-ms-summary": "Recipient Name"
|
||||
},
|
||||
{
|
||||
"name": "to.organization",
|
||||
"in": "formData",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "The organization or company of recipient",
|
||||
"x-ms-summary": "Recipient Company/Organization"
|
||||
},
|
||||
{
|
||||
"name": "to.address1",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The street number and name of the recipient",
|
||||
"x-ms-summary": "Recipient Street Address"
|
||||
},
|
||||
{
|
||||
"name": "to.address2",
|
||||
"in": "formData",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "The suite or room number of the recipient",
|
||||
"x-ms-summary": "Recipient Suite/Room/Floor/Unit Number"
|
||||
},
|
||||
{
|
||||
"name": "to.city",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The address city of the recipient",
|
||||
"x-ms-summary": "Recipient City"
|
||||
},
|
||||
{
|
||||
"name": "to.state",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The address state of the recipient",
|
||||
"x-ms-summary": "Recipient State/Locality"
|
||||
},
|
||||
{
|
||||
"name": "to.postcode",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The postcode or zip code of the recipient",
|
||||
"x-ms-summary": "Recipient Postcode/Zip Code"
|
||||
},
|
||||
{
|
||||
"name": "to.country",
|
||||
"in": "formData",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "The address country of the recipient",
|
||||
"default": "US",
|
||||
"x-ms-summary": "Recipient Country"
|
||||
},
|
||||
{
|
||||
"name": "from.name",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the sender",
|
||||
"x-ms-summary": "Sender Name"
|
||||
},
|
||||
{
|
||||
"name": "from.organization",
|
||||
"in": "formData",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "The organization or company of the sender",
|
||||
"x-ms-summary": "Sender Company/Organization"
|
||||
},
|
||||
{
|
||||
"name": "from.address1",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The street number and name of the sender",
|
||||
"x-ms-summary": "Sender Street Address"
|
||||
},
|
||||
{
|
||||
"name": "from.address2",
|
||||
"in": "formData",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "The suite or room number of the sender",
|
||||
"x-ms-summary": "Sender Suite/Room/Floor/Unit Number"
|
||||
},
|
||||
{
|
||||
"name": "from.city",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The address city of the sender",
|
||||
"x-ms-summary": "Sender City"
|
||||
},
|
||||
{
|
||||
"name": "from.state",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The address state of the sender",
|
||||
"x-ms-summary": "Sender State/Locality"
|
||||
},
|
||||
{
|
||||
"name": "from.postcode",
|
||||
"in": "formData",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The postcode or zip code of the sender",
|
||||
"x-ms-summary": "Sender Postcode/Zip Code"
|
||||
},
|
||||
{
|
||||
"name": "from.country",
|
||||
"in": "formData",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "The address country of the sender",
|
||||
"default": "US",
|
||||
"x-ms-summary": "Sender Country"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A new Mailform order",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "error code"
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "error message"
|
||||
}
|
||||
}
|
||||
},
|
||||
"details": {
|
||||
"type": "string",
|
||||
"description": "other details"
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean",
|
||||
"description": "true on success"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"lineitems": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-visibility": "important"
|
||||
}
|
||||
},
|
||||
"/v1/orders/{id}": {
|
||||
"get": {
|
||||
"summary": "Gets an existing order",
|
||||
"description": "Retrieve an existing order created via the API",
|
||||
"operationId": "GetOrder",
|
||||
"x-ms-visibility": "important",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "The ID of the Mailform order",
|
||||
"x-ms-summary": "Mailform Order ID",
|
||||
"x-ms-url-encoding": "single"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "An existing Mailform order",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "error code"
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "error message"
|
||||
}
|
||||
}
|
||||
},
|
||||
"details": {
|
||||
"type": "string",
|
||||
"description": "other details"
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean",
|
||||
"description": "true on success"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"lineitems": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"type": "string"
|
||||
},
|
||||
"tracking_number": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/users/me": {
|
||||
"get": {
|
||||
"summary": "Gets the authenticated user",
|
||||
"description": "Retrieve information about the authenticated Mailform user",
|
||||
"operationId": "GetUser",
|
||||
"x-ms-visibility": "important",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The current user",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"balance": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {},
|
||||
"parameters": {},
|
||||
"responses": {},
|
||||
"securityDefinitions": {
|
||||
"API Key": {
|
||||
"type": "apiKey",
|
||||
"in": "header",
|
||||
"name": "Authorization"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"API Key": []
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"x-ms-capabilities": {
|
||||
"testConnection": {
|
||||
"operationId": "GetUser"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"properties": {
|
||||
"capabilities": [],
|
||||
"connectionParameters": {
|
||||
"api_key": {
|
||||
"type": "securestring",
|
||||
"uiDefinition": {
|
||||
"description": "The Mailform API Key to be used for this connection",
|
||||
"displayName": "API Key",
|
||||
"tooltip": "Provide your API Key",
|
||||
"constraints": {
|
||||
"tabIndex": 2,
|
||||
"clearText": false,
|
||||
"required": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"iconBrandColor": "#D05555",
|
||||
"publisher": "Mailform, Inc.",
|
||||
"stackOwner": "Mailform, Inc."
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче