Environment variables in Customerly are a powerful way to securely store and manage data like API tokens, URLs, and reusable custom values. Whether you're integrating third-party services or setting up advanced automations with Chatflows and AI Missions, using environment variables can streamline your setup and protect sensitive information.
What are environment variables?
Environment variables are named values you can define within your Customerly workspace. These can be used in Chatflows, API calls, or anywhere you need a dynamic value. You’ll typically use them for:
API tokens or secrets (e.g.,
bearer_token
,asana_client_secret
)Service URLs (e.g.,
pipedrive_base_url
,slack_webhook_url
)Custom property values (e.g., default team, plan, or source tags)
They come in two types:
Default: visible and accessible for general use (ideal for URLs or IDs)
Secret: encrypted and hidden for sensitive data like access tokens
How to create and manage environment variables
To create an environment variable:
Go to your Settings > Integrations and select Environment Variables.
Click on the + Create variable button.
Add a name (e.g.,
pipedrive_access_token
).Choose the type:
Default for non-sensitive values
Secret for confidential data like tokens
Paste in the value.
Save the variable.
In your list, you’ll see each variable’s name, type, who created it, and whether it’s editable or deletable. Secrets will be masked for security.
💡 Tip: Use clear and consistent naming like
asana_client_id
orslack_webhook_url
so teammates can quickly understand and reuse them.
Using environment variables in chatflows and ai missions
Environment variables can be embedded directly into your chat messages, API calls, or AI Mission configurations.
1. Using variables in chatflows and chat messages
You can insert an environment variable in a chat message using this syntax:
{{ env.variable_name }}
Example:
You can connect your Slack workspace via this webhook: {{ env.slack_webhook_url }}
This is especially useful when you want to show links, client IDs, or support values that may change depending on the environment (e.g., staging vs production).
2. Using variables in REST API nodes
In API nodes within Chatflows, use environment variables as part of the endpoint, headers, or payload:
{
"Authorization": "Bearer {{ env.bearer_token }}",
"Content-Type": "application/json"
}
This keeps your tokens secure and reusable across multiple workflows without hardcoding them.
Using variables as default property values
Customerly allows you to set properties in your Chatflows or through the REST API. When doing so, you can insert environment variables as default values.
For example, when setting a property in an AI Mission:
{
"plan_type": "{{ env.default_plan }}"
}
This is useful when tagging leads or categorizing users based on a common variable that might evolve in the future. Update the environment variable once, and all related flows will automatically reflect the change.
Best practices
Use secrets for sensitive info: Always mark tokens, client secrets, and passwords as Secret.
Name descriptively: Stick to a format like
service_name_type
(e.g.,asana_client_id
,hubspot_api_key
).Re-use in multiple flows: Reference environment variables in any Chatflow or API node for consistency.
Keep your values updated: When a token or endpoint changes, update the variable once and it will update everywhere it's used.
Document variable use: Add internal notes or naming conventions to make it easier for your team.
Using environment variables is key to building secure, scalable, and maintainable automations within Customerly. Whether you’re syncing with external tools like Asana, Pipedrive, or Slack—or managing property values in your workflows—this small feature makes a big impact on efficiency and security.