← MySQL + IP2Proxy integrations

Query IP address with IP2Proxy API on New Column from MySQL API

Pipedream makes it easy to connect APIs for IP2Proxy, MySQL and 1000+ other apps remarkably fast.

Trigger workflow on
New Column from the MySQL API
Next, do this
Query IP address with the IP2Proxy API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

This integration creates a workflow with a MySQL trigger and IP2Proxy action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Column trigger
    1. Connect your MySQL account
    2. Configure timer
    3. Select a Table
  3. Configure the Query IP address action
    1. Connect your IP2Proxy account
    2. Configure IP Address
    3. Select a Package
    4. Optional- Select a Response Format
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, open source components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event when you add a new column to a table. [See the docs here](https://dev.mysql.com/doc/refman/8.0/en/show-columns.html)
Version:0.0.3
Key:mysql-new-column

MySQL Overview

MySQL is a powerful database management system used by some of the largest
organizations in the world, including Facebook, Google, and Amazon. MySQL is an
open-source relational database management system (RDBMS), as well as a popular
choice for web applications used by millions of websites.

Some applications that can be built using the MySQL API include:

  • A web application that stores and retrieves data from a MySQL database
  • A desktop application that uses a MySQL database for data storage
  • A mobile application that interacts with a MySQL database

Trigger Code

import common from "../common/table.mjs";

export default {
  ...common,
  key: "mysql-new-column",
  name: "New Column",
  description: "Emit new event when you add a new column to a table. [See the docs here](https://dev.mysql.com/doc/refman/8.0/en/show-columns.html)",
  type: "source",
  version: "0.0.3",
  dedupe: "unique",
  props: {
    ...common.props,
    db: "$.service.db",
  },
  methods: {
    ...common.methods,
    _getPreviousColumns() {
      return this.db.get("previousColumns");
    },
    _setPreviousColumns(previousColumns) {
      this.db.set("previousColumns", previousColumns);
    },
    async listResults() {
      let previousColumns = this._getPreviousColumns() || [];
      const columns = await this.mysql.listNewColumns(
        this.table,
        previousColumns,
      );
      this.iterateAndEmitEvents(columns);

      const newColumnNames =
        columns
          .map((column) => column.Field)
          .filter((c) => !previousColumns.includes(c));

      previousColumns = previousColumns.concat(newColumnNames);
      this._setPreviousColumns(previousColumns);
    },
    generateMeta(column) {
      const columnName = column.Field;
      return {
        id: `${columnName}${this.table}`,
        summary: columnName,
        ts: Date.now(),
      };
    },
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
MySQLmysqlappThis component uses the MySQL app.
timer$.interface.timer
TabletablestringSelect a value from the drop down menu.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.

Trigger Authentication

MySQL uses API keys for authentication. When you connect your MySQL account, Pipedream securely stores the keys so you can easily authenticate to MySQL APIs in both code and no-code steps.

Before you connect to your MySQL database from Pipedream, please make sure your database is either:

  1. Accessible from the public internet (You may need to add a firewall rule on 0.0.0.0/0 on port 3306), or

  2. Accessible from an SSH server that you route MySQL requests through

After that, enter the following values:

  • host: The hostname or IP address of your MySQL server
  • port: 3306, unless you run MySQL on a different port
  • username: The account username to log in
  • password: The account password to log in
  • database: The name of the MySQL database to run queries against

About MySQL

Open-source relational database

Action

Description:Query IP address using IP2Proxy API. [See the docs here](https://www.ip2location.com/web-service/ip2proxy) for how to use this API.
Version:0.0.3
Key:ip2proxy-query-ip-info

IP2Proxy Overview

The IP2Proxy API can be used to build applications that can perform the
following tasks:

  • Determine the country, region, city, ISP, domain name, and proxy type of an
    IP address
  • Detect if an IP address is a Tor exit node
  • Detect if an IP address is a public proxy
  • Detect if an IP address is a datacenter IP
  • Detect if an IP address is blacklisted

Action Code

import ip2proxyApp from "../../ip2proxy.app.mjs";
import constants from "../../common/constants.mjs";

export default {
  name: "Query IP address",
  description: "Query IP address using IP2Proxy API. [See the docs here](https://www.ip2location.com/web-service/ip2proxy) for how to use this API.",
  key: "ip2proxy-query-ip-info",
  version: "0.0.3",
  type: "action",
  props: {
    ip2proxyApp,
    ipAddress: {
      type: "string",
      label: "IP Address",
      description: "IP address (IPv4 or IPv6) for reverse IP location lookup purposes.",
    },
    pxPackage: {
      type: "string",
      label: "Package",
      options: constants.PACKAGE_OPTIONS,
      description: "Web service package of different granularity of return information. Please refer to the pricing table in our [documentation](https://www.ip2location.com/web-service/ip2proxy) for the information returned.",
    },
    format: {
      type: "string",
      label: "Response Format",
      options: constants.FORMAT_OPTIONS,
      description: "Format of the response message. Available values are `json` or `xml`. If unspecified, json format will be used for the response message.",
      optional: true,
    },
  },
  async run({ $ }) {
    const {
      ipAddress,
      format,
      pxPackage,
    } = this;
    const response =
      await this.ip2proxyApp.queryIPInfo({
        $,
        params: {
          format: format ?? "json",
          ip: ipAddress,
          package: pxPackage,
        },
      });
    $.export("$summary", "Successfully queried IP address information with IP2Proxy API.");
    return response;

  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
IP2Proxyip2proxyAppappThis component uses the IP2Proxy app.
IP AddressipAddressstring

IP address (IPv4 or IPv6) for reverse IP location lookup purposes.

PackagepxPackagestringSelect a value from the drop down menu:PX1PX2PX3PX4PX5PX6PX7PX8PX9PX10PX11
Response FormatformatstringSelect a value from the drop down menu:jsonxml

Action Authentication

IP2Proxy uses API keys for authentication. When you connect your IP2Proxy account, Pipedream securely stores the keys so you can easily authenticate to IP2Proxy APIs in both code and no-code steps.

Access your API key from the License section in your IP2Location account in order to make authenticated requests to their API.

About IP2Proxy

The IP2Proxy™ Proxy Detection Web Service is a hosted Web Service that allows instant detection of anonymous proxy, VPN, TOR exit nodes, search engine robots (SES) and residential proxies (RES) by IP address. It is a REST API supporting both JSON and XML responses and provides IP location lookup information when a proxy is detected.

More Ways to Connect IP2Proxy + MySQL

Query IP address with IP2Proxy API on New or Updated Row from MySQL API
MySQL + IP2Proxy
 
Try it
Query IP address with IP2Proxy API on New Row (Custom Query) from MySQL API
MySQL + IP2Proxy
 
Try it
Query IP address with IP2Proxy API on New Row from MySQL API
MySQL + IP2Proxy
 
Try it
Query IP address with IP2Proxy API on New Table from MySQL API
MySQL + IP2Proxy
 
Try it
New Column from the MySQL API

Emit new event when you add a new column to a table. See the docs here

 
Try it
New or Updated Row from the MySQL API

Emit new event when you add or modify a new row in a table. See the docs here

 
Try it
New Row from the MySQL API

Emit new event when you add a new row to a table. See the docs here

 
Try it
New Row (Custom Query) from the MySQL API

Emit new event when new rows are returned from a custom query. See the docs here

 
Try it
New Table from the MySQL API

Emit new event when a new table is added to a database. See the docs here

 
Try it
Create Row with the MySQL API

Adds a new row. See the docs here

 
Try it
Delete Row with the MySQL API

Delete an existing row. See the docs here

 
Try it
Execute Query with the MySQL API

Find row(s) via a custom query. See the docs here

 
Try it
Execute Stored Procedure with the MySQL API

Execute Stored Procedure. See the docs here

 
Try it
Find Row with the MySQL API

Finds a row in a table via a lookup column. See the docs here

 
Try it