Del via


OptiAPI (Preview)

The official api for OptiAPI, which connects countless of everyday actions with Power Automate.

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Automate Premium All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Power Apps Premium All Power Apps regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Contact
Name Oliver Busk Jensen
Email support@optiapi.com
Connector Metadata
Publisher Busk
Website https://optiapi.com
Privacy policy https://optiapi.com/terms

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Not shareable

Default

Applicable: All regions

Parameters for creating connection.

This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.

Name Type Description Required
API Key securestring The API Key for this api True

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Actions

Add or subtract from time or dates

Manipulate datetime by adding or subtracting values.

Calculate average

Calculates the average value of a given key.

Check if array contain a value

Determines whether the array contains a given item.

Chunk an array

Break an array down into chunks.

Combine array

Combine the keys of one array with the values of another array.

Combine multiple PDF files

Combine multiple PDF files into one.

Convert a PDF file to text

Converts a PDF file to text.

Convert a string to a datetime object

Transform a string to a valid datetime format.

Filter an array for false values

This action removes false entries from an array.

Find difference between arrays

This action compares an array against another array.

Find duplicates in arrays

This action retrieves and returns duplicate values from an array.

Find values from a string based on a regular expression

Find one or more values in a string.

First Where within an array

This action returns the first element in an array with the given key / value pair.

Flatten an array

This action flattens a multi-dimensional array into a single dimension array.

Get PDF metadata information

Get metadata from a PDF file.

Get unique items in an array

The action returns all of the unique items in an array.

Group By an array key

This action groups an array's items by a given key.

Perform OCR on a scanned PDF or image file

Replaces a string with another word.

Remove item from array

Removes an item from an array by its key value.

Replace text in string

Replace one or more words with another word.

Replace text in string based on a regular expression

Replace one or more words with another word, based on a regular expression.

Set password on a PDF file

Dynamically sets a custom password on a PDF file.

Sort an array

Sort an array from high to low or from descending to ascending.

Add or subtract from time or dates

Manipulate datetime by adding or subtracting values.

Parameters

Name Key Required Type Description
Action
action True string

The action to add or subtract too. This can for example be 'year', 'weekday', 'week' or 'day'.

Input Datetime
datetime True string

The input value to either add to or subtract from.

Operator
operator True string

Whether we should add or subtract the value from the input date time. Can be either 'add' or 'subtract.

Output Format
outputFormat string

The date time format that the string should be converted to (for example d-m-Y)

Value
value True integer

The value to either add or subtract.

Returns

Name Path Type Description
Date Time
datetime string

The new transformed date time

Calculate average

Calculates the average value of a given key.

Parameters

Name Key Required Type Description
array
array True array of string

array

Key
key True string

The key to calculate the average for.

Returns

Name Path Type Description
Average
average integer

The calculated average for the given key.

Check if array contain a value

Determines whether the array contains a given item.

Parameters

Name Key Required Type Description
array
array True array of string

array

Key
key True string

The key to search for the specific value in.

Search Term
search True string

The search term to look for.

Returns

Name Path Type Description
Contains
contains boolean

Whether the array contains the given item or not (bool)

Chunk an array

Break an array down into chunks.

Parameters

Name Key Required Type Description
array
array True array of string

array

Chunk Size
size True integer

The size of each chunk.

Returns

Name Path Type Description
array
array array of string

array

Combine array

Combine the keys of one array with the values of another array.

Parameters

Name Key Required Type Description
The content-type for the request.
Content-Type True string

Content-Type

The accept type for the request.
Accept True string

Accept

keys
keys True array of string

keys

values
values True array of string

values

Returns

Name Path Type Description
array
array array of string

array

Combine multiple PDF files

Combine multiple PDF files into one.

Parameters

Name Key Required Type Description
pdfs
pdfs True array of string

pdfs

Returns

Name Path Type Description
File Content
content string

The base64 encoded string of the combined PDF files.

Convert a PDF file to text

Converts a PDF file to text.

Parameters

Name Key Required Type Description
End Page
endPage integer

If set, this is the last page the action will convert to text.

Output Layout
layout True string

The layout of the output content. You can choose from 'raw' or 'original'. Original will preserve the layout..

File Content
pdf True byte

The base64 encoded string of the PDF file.

Start Page
startPage integer

If set, this is the first page the action will convert to text.

Returns

Convert a string to a datetime object

Transform a string to a valid datetime format.

Parameters

Name Key Required Type Description
The content-type for the request.
Content-Type True string

Content-Type

The accept type for the request.
Accept True string

Accept

Input Format
inputFormat True string

The format of the input string.

Output Format
outputFormat True string

The date time format that the string should be converted to.

Input String
string True string

The input string to convert to date time.

Timezone
timezone string

The timezone the datetime should be converted to (Optional)

Returns

Name Path Type Description
Date Time
datetime string

The new transformed date time

Filter an array for false values

This action removes false entries from an array.

Parameters

Name Key Required Type Description
array
array True array of string

array

Preserve Array Keys
preserveKeys True boolean

If set to true, the returning array will preserve the keys of the original attributes.

Returns

Name Path Type Description
array
array array of string

array

Find difference between arrays

This action compares an array against another array.

Parameters

Name Key Required Type Description
array
array True array of string

array

compare
compare True array of string

compare

Returns

Name Path Type Description
array
array array of string

array

Find duplicates in arrays

This action retrieves and returns duplicate values from an array.

Parameters

Name Key Required Type Description
array
array True array of string

array

Key
key string

You can specify a key in order to look for duplicates under a specific attribute (Optional)

Returns

Name Path Type Description
array
array array of string

array

Find values from a string based on a regular expression

Find one or more values in a string.

Parameters

Name Key Required Type Description
Group
group integer

The group to return. (default = 0)

Regex Pattern
pattern True string

The regular expression pattern.

Input Text
text True string

The string to look for references in.

Returns

Name Path Type Description
values
values array of string

values

First Where within an array

This action returns the first element in an array with the given key / value pair.

Parameters

Name Key Required Type Description
array
array True array of string

array

Key
key True string

The key to search for.

Operator
operator string

Perform an operator clause (Optional)

Search For
value True string

The value to search for.

Returns

Name Path Type Description
array
array array of string

array

Flatten an array

This action flattens a multi-dimensional array into a single dimension array.

Parameters

Name Key Required Type Description
array
array True array of string

array

Depth
depth integer

The depth level that should be flattened (integer)

Returns

Name Path Type Description
array
array array of string

array

Get PDF metadata information

Get metadata from a PDF file.

Parameters

Name Key Required Type Description
File Content
pdf True byte

The base64 encoded string of the PDF file.

Returns

Name Path Type Description
PDF Version
metadata.PDFVersion string

PDFVersion

Author
metadata.author string

The author of the PDF file

Date Created
metadata.creationDate string

The date the PDF file was originally created.

Creator
metadata.creator string

The creator of the PDF file.

Encrypted
metadata.encrypted string

Whether the PDF file is encrypted. Returns "yes"/"no".

File Size
metadata.fileSize string

The file size of the PDF file in bytes.

Form
metadata.form string

If any forms are found in the PDF file.

Modification Date
metadata.modDate string

If the file has been changed. (default = null)

Optimized
metadata.optimized string

If the file was optimized. (default = "no")

output
metadata.output array of string

output

Page Rotation
metadata.pageRot string

The rotation of the PDF file.

Page Size
metadata.pageSize string

The page size of the PDF file.

Number of Pages
metadata.pages string

The number of pages in the PDF file.

Produced By
metadata.producer string

The producer of the PDF file.

Tagged
metadata.tagged string

Whether the PDF file is tagged or not. Returns "yes"/"no".

Title
metadata.title string

The title of the PDF file.

Get unique items in an array

The action returns all of the unique items in an array.

Parameters

Name Key Required Type Description
array
array True array of string

array

Key
key string

The specific key that determines the uniqueness.

Returns

Name Path Type Description
array
array array of string

array

Group By an array key

This action groups an array's items by a given key.

Parameters

Name Key Required Type Description
array
array True array of string

array

Key
key True string

The key to group items by.

Returns

Name Path Type Description
array
array array of string

array

Perform OCR on a scanned PDF or image file

Replaces a string with another word.

Parameters

Name Key Required Type Description
File Content
file True string

The base64 encoded string of the file (PDF or image).

Language
language string

The language of the input file. (default = eng)

OCR Engine (OEM)
oem True integer

The OCR engine to use. (0 = legacy, 1 = LSTM)

Page Segmentation Method (PSM)
psm True integer

How should the OCR segment the input image?

Trim Output
trim True boolean

If enabled, this will remove all excess spacing and line breaks of the output text.

File Type
type True string

The input file type.

Returns

Name Path Type Description
Output Text
text string

The output text from the OCR action.

Remove item from array

Removes an item from an array by its key value.

Parameters

Name Key Required Type Description
array
array True array of string

array

Key
key True string

Items matching this key will be removed.

Returns

Name Path Type Description
array
array array of string

array

Replace text in string

Replace one or more words with another word.

Parameters

Name Key Required Type Description
The content-type for the request.
Content-Type True string

Content-Type

The accept type for the request.
Accept True string

Accept

Replace With
replace True string

The string or word to replace the found string with.

Search For
search True string

The string or word to find in the input string.

Input Text
text True string

The input text to perform the replacement on.

Returns

Name Path Type Description
text
text string

text

Replace text in string based on a regular expression

Replace one or more words with another word, based on a regular expression.

Parameters

Name Key Required Type Description
Regex Pattern
pattern True string

The regular expression pattern to use in the search.

Replacement Value
replacement True string

The string to replace the found value with.

Input Text
text True string

The string to perform the text replace against.

Returns

Name Path Type Description
Text
text string

The replaced text string

Set password on a PDF file

Dynamically sets a custom password on a PDF file.

Parameters

Name Key Required Type Description
The content-type for the request.
Content-Type True string

Content-Type

The accept type for the request.
Accept True string

Accept

Password
password True string

The password to apply to the PDF file.

PDF File
pdf True byte

The base64 content of the PDF files.

Returns

Name Path Type Description
File Content
content string

The base64 encoded string of the PDF file with the password.

Sort an array

Sort an array from high to low or from descending to ascending.

Parameters

Name Key Required Type Description
array
array True array of string

array

Sort
sort True string

How should the array items be sorted?

Returns

Definitions

StandardArrayResponse

Name Path Type Description
Result Array
array array of string

The array containing the new items.