Configure Environment Variables
Add all your API keys and connection strings to make your ColdConvert application work properly.
Overview
Environment variables are configuration values that your application needs to function. In this tutorial, you'll add all the API keys and connection strings you collected in the previous tutorials.
Step 1: Access Environment Variables
Step 2: Add Database Variables
Add your database connection strings from the database setup tutorial:
# Add these two variables:
POSTGRES_PRISMA_URL=your-database-connection-string
POSTGRES_URL_NON_POOLING=your-database-connection-string
# Example (replace with your actual connection string):
POSTGRES_PRISMA_URL=postgresql://username:password@host:port/database
POSTGRES_URL_NON_POOLING=postgresql://username:password@host:port/database
POSTGRES_PRISMA_URL
as the keyPOSTGRES_URL_NON_POOLING
postgresql://username:password@host:port/database_name
Step 3: Add Email Variables
Add your Resend API key and email configuration from the email setup tutorial:
# Add these variables:
RESEND_API_KEY=your-resend-api-key
RESEND_FROM_ADMIN=Your Name <support@yourdomain.com>
EMAILS_PER_RUN=5
EMAIL_DOMAIN=yourdomain.com
# Example (replace with your actual values):
RESEND_API_KEY=re_1234567890abcdef...
RESEND_FROM_ADMIN=Sergiu <support@yourdomain.com>
EMAILS_PER_RUN=5
EMAIL_DOMAIN=yourdomain.com
RESEND_API_KEY
as the keyRESEND_FROM_ADMIN
with your sender name and emailEMAILS_PER_RUN
with the number of emails to send per cron job runEMAIL_DOMAIN
with your email domain- •
RESEND_FROM_ADMIN
- The sender name and email that will appear in your cold emails - •
EMAILS_PER_RUN
- Number of emails sent per cron job execution (recommended: 5-10) - •
EMAIL_DOMAIN
- Your email domain for proper authentication
Step 4: Add Product Hunt Variables
Add your Product Hunt API key and configuration from the Product Hunt API tutorial:
# Add these variables:
PH_API_TOKEN=your-product-hunt-api-token
PH_ENDPOINT_URL=https://api.producthunt.com/v2/api/graphql
TOPICS=saas,productivity,development,ai,startup
# Example (replace with your actual values):
PH_API_TOKEN=phc_1234567890abcdef...
PH_ENDPOINT_URL=https://api.producthunt.com/v2/api/graphql
TOPICS=saas,productivity,development,ai,startup
PH_API_TOKEN
as the keyPH_ENDPOINT_URL
with value https://api.producthunt.com/v2/api/graphql
TOPICS
with your selected niches (comma-separated)- •
saas
- Software as a Service products - •
productivity
- Productivity tools and apps - •
development
- Developer tools and software - •
ai
- Artificial Intelligence products - •
startup
- Startup and business tools
Step 5: Add Client Information Variables
Add your personal and business information that will appear in email templates:
# Add these variables:
YOUR_NAME=Your Name
YOUR_STARTUP_NAME=Your Startup Name
YOUR_WEBSITE=https://yourwebsite.com
# Example (replace with your actual values):
YOUR_NAME=Sergiu
YOUR_STARTUP_NAME=ColdConvert
YOUR_WEBSITE=https://www.coldconvert.ai
YOUR_NAME
with your full nameYOUR_STARTUP_NAME
with your business nameYOUR_WEBSITE
with your website URLStep 6: Redeploy
After adding all environment variables, you need to redeploy your application:
Success Indicators:
- • Deployment completes successfully
- • No environment variable errors
- • Your app URL loads without errors
- • Database connection works properly
Next Tutorial
Verify Cron Jobs
Now let's verify that your cron jobs are properly configured and ready to automate your cold email campaigns.