Skip to content

hobbyman/zip-file-connector

Repository files navigation

Zip File custom connector for Power Platform

This is simple code-based connector where the method is entirely contained within the custom code block.

Purpose of the connector is to take is zip file manipulations from Power Automate.

Manual Installation

  1. Download script.csx (click on ... > Download in the top right-hand corner).
  2. Sign in to https://make.powerapps.com.
  3. Select target environment.
  4. Select Custom connectors in the left navigation.
  5. Select + New customer connector > Import an OpenAPI from URL.
    • Enter CSV Magic as Connector name.
    • Copy and paste this URL: https://raw.githubusercontent.com/hobbyman/zip-file-connector/master/apiDefinition.json
  6. Select Import then select Continue.
  7. Select Code in the navigation dropdown.
  8. Flip the switch to Code Enabled.
  9. Select Upload and upload script.csx saved earlier.
  10. Select CsvToJson in the list of operations.
  11. Select Create connector.

Methods

  • CreateZip
  • ExtractZip (not yet implemented)

CreateZip Parameters

  • File Array - string - example below
[
    {
        "filename" : "blah.txt",
        "content"  : "base64-encoding-of-the-file"
    },
    {
        "filename" : "whatever.jpg",
        "content"  : "base64-encoding-of-the-file"
    }
]
  • Zip File Name - string - what it says

Getting the base64 encoding of a file in Sharepoint

Go to this nice article for start. Basically, you need to get the output of Get file content into a variable or compose. BUT, pay attention, you need to get the $content; that's what will need to go into the content property in the File Array

URLs used for my discovery and testing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages