Skip to content

Deprecated Credentials Migration Guide

Since we added the ability to use dependencies in YepCode, it has created a maintainability challenge supporting all package versions with Credentials. As a result, we are deprecating them. You can still securely initialize your clients using environment variables.

We’ll use dependencies and team variables to migrate your current credentials. Lets see a real example:

For this example we’ll use the nodemailer credential integration (other credentials will follow the same approach). Your current process code should look like this:

const mailClient = yepcode.integration.nodemailer("nodemailer-credentials");
await mailClient.sendMail({
from: "YepCode 🤖 <info@yepcode.io>",
to: "support@yepcode.io",
subject: "YepCode nodemailer credential",
text: "This is a message from YepCode using nodemailer credential",
});
console.log("Email sent");

1. Import the required dependency package (JavaScript)

Section titled “1. Import the required dependency package (JavaScript)”
const nodemailer = require("nodemailer");
const mailClient = yepcode.integration.nodemailer("nodemailer-credentials");
await mailClient.sendMail({
from: "YepCode 🤖 <info@yepcode.io>",
to: "support@yepcode.io",
subject: "YepCode nodemailer credential",
text: "This is a message from YepCode using nodemailer credential",
});
console.log("Email sent");

Follow the package docs to know how to initialize the client instead of using the credential integration, in this case we are using the createTransport method from nodemailer usage section.

const nodemailer = require("nodemailer");
const mailClient = yepcode.integration.nodemailer("nodemailer-credentials");
const mailClient = nodemailer.createTransport({
host: process.env.nodemailerHost,
port: 587,
secure: false, // If SSL is required, you'd need to set secure: true
connectionTimeout: 5000,
auth: {
user: process.env.nodemailerUser,
pass: process.env.nodemailerPass,
},
});
await mailClient.sendMail({
from: "YepCode 🤖 <info@yepcode.io>",
to: "support@yepcode.io",
subject: "YepCode nodemailer credential",
text: "This is a message from YepCode using nodemailer credential",
});
console.log("Email sent");

Hit the Save button in your process status bar (bottom right) to update it.

Save process

4. Install the missing dependencies (JavaScript)

Section titled “4. Install the missing dependencies (JavaScript)”

After saving the process you’ll see some alerts in the process editor related to missing dependencies and variables:

Alerts

We’ll need to add them before executing the process.

YepCode will automatically detect missing dependencies for your source code. You can see the missing dependencies by clicking the Dependencies button in the process status bar:

Missing dependencies

Add the missing dependencies by clicking the Add all button.

Add all dependencies

Install the missing dependencies by clicking the Install button on the pop up notification.

Install dependencies

YepCode will automatically detect missing variables for your source code. You can see the missing variables in your process right sidebar:

Missing variables

Add the missing variables by clicking on each one of them and filling the required information:

Add variables

You can now execute your process as usual 🎉.