Skip to main content

AWS Redshift to Holded contacts

Read rows from AWS Redshift table using them to create contacts using Holded API

Clone to YepCode

Read rows from AWS Redshift table

Used integrations:
class AwsRedshiftSourceSelect {    async init() { // initialize a AWS Redshift client        this.awsRedshift = yepcode.integration.awsRedshift("your-aws-redshift-credential-name"); // Prepare the command to execute, customize the params and the SQL query        const executeStatementCommand = new ExecuteStatementCommand({            ClusterIdentifier: "your-cluster-identifier",            Database: "your-database-name",            DbUser: "your-database-user",            Sql: "SELECT * FROM your-table-name;"        });        const {            Id        } = await this.awsRedshift.send(executeStatementCommand);        this.statementId = Id;        await this._awaitStatementToFinish();    }    async fetch(publish, done) {        let nextToken; // if result is returned paginated, iterate to publish entire statement result        do {            const result = await this.awsRedshift.send(new GetStatementResultCommand({                Id: this.statementId,                NextToken: nextToken            }));            nextToken = result.NextToken;            for (const record of result.Records) { // Each record come as a list of record cells                // An small example: [ { stringValue: 'the-string-value' }, { longValue: 1234 } ]                // You can map your record to a JSON object                await publish(record);            }        } while (nextToken);        done();    }    async close() {}    _awaitStatementToFinish() {        return new Promise((resolve, reject) => {            const describeStatementCommand = new DescribeStatementCommand({                Id: this.statementId            }); // configure interval to check statement status            const intervalId = setInterval(async () => {                const result = await this.awsRedshift.send(describeStatementCommand);                if (result.Status === "FINISHED") {                    clearInterval(intervalId);                    resolve();                    return;                }                if (result.Status === "FAILED" || result.Status === "ABORTED") {                    clearInterval(intervalId);                    reject();                    return;                }            }, 1000);        });    }}

Create contacts using Holded API

Used integrations:
class AxiosTargetHoldedCreateContact {    async init() { // initialize an axios client with holded credentials:        // baseUrl:        // HTTP Headers:        //   {        //     "key": "your-access-token",        //     "Content-Type": "application/json"        //   }        this.axiosClient = yepcode.integration.axios("your-axios-holded-credential-name");    }    async consume(item) { // You may check the full API documentation at:        //        await`/invoicing/v1/contacts`, {            CustomId: item.customer_id,            name:,            code: "string",            email: "string" // complete your fields        });    }    async close() {}}

Find related recipes

  • AWS Redshift
  • Holded


These recipes are a good starting point for you to build your own YepCode processes and solve your integration and automation problems.

YepCode is a SaaS platform that allows to create, execute and monitor integrations and automations using source code in a serverless environment.

We like to call it the Zapier for developers, since we bring all the agility and benefits of NoCode tools (avoid server provisioning, environment configuration, deployments,...), but with all the power of being able to use a programming language like JavaScript with a NodeJS engine.

You only have to fill the sign up form and your account will be created with our FREE plan (no credit card required).

YepCode has been created with a clear enterprise approach (multi-tenant environment, team management, high security and auditing standards, IdP integrations, on-premise options,...) so we can be the Swiss army knife of any team of engineering, especially those that need to extract or send information to external systems, and where a certain dynamism or adaptation to change is necessary in that process.

Sure! You just need to do some configuration to allow YepCode servers to connect to that service. Check our docs page to get more information.