Articles on: Connectors

HTTP Connector

The HTTP API connector used to make a request for the API endpoint based on Hypertext Transfer Protocol (HTTP). It allow users to configure whatever endpoint they want directly from 3rd-party API docs into their workflow in Easyflow Portal.

Getting Started with HTTP



Connections

This selector used to Create/Select connection for Apps using OAuth 2.0 authorization protocol. Example: Google Sheets.

Method

GET - to retrieve information for an entry.
POST - to create a new entry.
PUT - to update/replace an existing entry.
PATCH - to make a partial entry update.
DELETE - to delete an entry.

URL

Enter the endpoint URL to send a request. Example: https://api.trello.com/1/lists/

Parameters (Query String)

Query string parameters in JSON format. Example:
{"key": "xxxx", "token": "yyyy"}


Content type

To specify a form of parsing the data. Example: application/json

Headers

Header parameters in JSON format. Example:
{"User-Agent": "EasyflowRuntime/1.0.0"}


Request Content

Body payload in a JSON format. Example
{"firstname": "John", "lastname": "Smith", "email": "johnsmith@outlook.uk"}


Output Attributes

To draw an output schema for HTTP API connector. Example:
{"type": "object", "properties": {"firstname": {"type": "string"}, "lastname": {"type": "string"}, "email": {"type": "string"}}}


HTTP Connector Configuration

User-Agent header



We recommend using this header.
The User-Agent request header is a characteristic string that lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.

Some Apps like Woocommerce return 402 error when trying to send a request.
To prevent this error, include the User-Agent header in your request.

Steps to add the User-Agent parameter:

Click on the HTTP - API connector
In the right panel, add the following key/value into Headers parameter under INPUT section:

{"User-Agent": "EasyflowRuntime/1.0.0"}



GET method Example



Using Trello API, endpoint name Get a List by ID

Required parameters


Method: GET
URL: https://api.trello.com/1/lists/{list_id}
Parameters (Query String): {"key": "xxxx", "token": "yyyy"}
Content type: application/json



POST method Example



Using Airtable API, endpoint name Create a Record*

Required parameters


Method: POST
URL: https://api.airtable.com/v0/{base_id}/{table_id}
Content type: application/json
Headers: {"Authorization": "Bearer xxxx"}
Request Content: {"records": [{"fields": {"firstname": "John", "lastname": "Smith", "email":"johnsmith@outlook.uk"}}]}

Updated on: 27/10/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!