Plugins
Templates

Convertico - Convert URL to Image or PDF Plugin

Link to plugin page: https://zeroqode.com/plugin/convertico---convert-url-to-image-or-pdf-1533644222107x705686037195915300

Introduction

This plugin lets you convert URLs to images or .pdf.

Prerequisites:

For using the plugin you'll need to get the API key with Convertio by creating a free account - https://developers.convertio.co/

Note: Please check API pricing fees: https://developers.convertio.co/api/pricing/

How to Setup

  1. Get the API Key from the provider

  2. Paste the obtained key in the Plugin Settings, in the apikey field:

Plugin Settings

Plugin Data/Action Calls

Data Calls

1. Convertio - Check Status

This call is a Data call type and a JSON data type.

It is a GET request that is used in order to get status of a conversion in UI.

Has the same parameters and returned values as it's action API call counterpart.

2. Convertio - Get Conversion

This call is a Data call type and a JSON data type.

It is a GET request that is used in order to get a conversion result in UI.

Has the same parameters and returned values as it's action API call counterpart.

Actions Calls

  1. Convert URL to Image (process)

This call is an Action call type and a JSON data type.

It is a POST request which is used in order to start a new conversion.

The action comes with the following body parameters:

  • file: URL of the file to convert

  • filename: input filename including extension (file.ext). Required if input = raw/base64

  • outputformat: output format, to which the file should be converted to

Returned values:

  • status: on success is 'ok'

  • id: conversion ID

  • minutes: API conversion minutes available on the balance

2. Convertio - Check Status

This call is an Action call type and a JSON data type.

It is a GET request that is used in order to get status of a conversion in a workflow.

The action comes with the following URL parameter:

  • id: conversion ID (obtained from the 'Convert URL to Image (process)' API call)

Returned values:

  • status: on success is 'ok'

  • id: conversion ID

  • step: conversion step; allowed values: wait, finish, convert, upload

  • step_percent: step progress in %

  • minutes: minutes used by this conversion

  • output url: URL of the file to download

  • output size: size of the file in bytes

3. Convertio - Get Conversion

This call is an Action call type and a JSON data type.

It is a GET request that is used in order to get a conversion result in a workflow.

The action comes with the following URL parameter:

  • id: conversion ID (obtained from the 'Convert URL to Image (process)' API call)

Returned values:

  • status: on success is 'ok'

  • id: conversion ID

  • encode: content encoding; allowed value: base64

  • content: content of the file

Workflow example

  1. First set up a workflow to start the conversion. Use the 'Convert URL to Image (process)' API call, indicating the required body parameters. Save the id you get from this step, for later use.

  2. Then set up a workflow to check the status of your conversion. Use the 'Convertio - Check Status' API call, indicating the id obtained on the previous step as URL parameter for this API call.

  3. Finally, set up a workflow to get the conversion result. Use the 'Convertio - Get Conversion' API call, indicating the id obtained on the first step as URL parameter for this API call.

Important note: The 3rd workflow should be run only after you get the 'ok' status from the 'Convertio - Check Status' API call for the same conversion id.

Demo to preview settings: