DaData.ru

Automated data cleansing for Russian postal addresses, phones and customer names

Go to site

Integrate the DaData.ru API with the MySQL API

Setup the DaData.ru API trigger to run a workflow which integrates with the MySQL API. Pipedream's integration platform allows you to integrate DaData.ru and MySQL remarkably fast. Free for developers.

Connect DaData.ru

const data = {
  "query": `pipedream @`,
}
return await require("@pipedreamhq/platform").axios(this, {
  url: `https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/email`,
  headers: {
    "Authorization": `Token ${auths.dadata_ru.api_key}`,
  },
  data,
})

Connect MySQL

const mysql = require('mysql2/promise');

const { host, port, username, password, database } = auths.mysql

const connection = await mysql.createConnection({
  host,
  port,
  user: username,
  password,
  database,
});

const [rows, fields] = await connection.execute('SELECT NOW()');
console.log(rows)