Deprecated Credentials Migration Guide
Why are credentials being deprecated?
Section titled “Why are credentials being deprecated?”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.
How to migrate
Section titled “How to migrate”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");
2. Initialize the client (JavaScript)
Section titled “2. Initialize the client (JavaScript)”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");
3. Save the process (JavaScript)
Section titled “3. Save the process (JavaScript)”Hit the Save
button in your process status bar (bottom right) to update it.

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:

We’ll need to add them before executing the process.
4.1 Add missing dependencies (JavaScript)
Section titled “4.1 Add missing dependencies (JavaScript)”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:

Add the missing dependencies by clicking the Add all
button.

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

4.2 Add missing variables (JavaScript)
Section titled “4.2 Add missing variables (JavaScript)”YepCode will automatically detect missing variables for your source code. You can see the missing variables in your process right sidebar:

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

For this example we’ll use the http requests credential integration (other credentials will follow the same approach). Your current process code should look like this:
http = yepcode.integration.http("http-credential")
try: response = http.get("https://yepcode.io") print(response.text)except Exception as e: print(f"Error sending request: {e}")
1. Import the required dependency package (Python)
Section titled “1. Import the required dependency package (Python)”import requests
http = yepcode.integration.http("http-credential")
try: response = http.get("https://api.github.com/user") print(response.json())except Exception as e: print(f"Error sending request: {e}")
2. Initialize the client (Python)
Section titled “2. Initialize the client (Python)”Follow the package docs to know how to initialize/use the package instead of using the credential integration, in this case we are using the get
method from the requests package.
import requestsimport os
http = yepcode.integration.http("http-credential")
try: headers = { "Authorization": f"Bearer {os.getenv('GITHUB_TOKEN')}", "Accept": "application/vnd.github.v3+json" } response = requests.get("https://api.github.com/user", headers=headers) print(response.json())except Exception as e: print(f"Error sending request: {e}")
3. Save the process (Python)
Section titled “3. Save the process (Python)”Hit the Save
button in your process status bar (bottom right) to update it.

4. Install the missing dependencies (Python)
Section titled “4. Install the missing dependencies (Python)”After saving the process you’ll see some alerts in the process editor related to missing dependencies and variables:

We’ll need to add them before executing the process.
4.1 Add missing dependencies (Python)
Section titled “4.1 Add missing dependencies (Python)”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:

Add the missing dependencies by clicking the Add all
button.

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

4.2 Add missing variables (Python)
Section titled “4.2 Add missing variables (Python)”YepCode will automatically detect missing variables for your source code. You can see the missing variables in your process right sidebar:

Add the missing variables by clicking on each one of them and filling the required information.
Execute your process
Section titled “Execute your process”You can now execute your process as usual 🎉.