Fly.io
Learn how to create and integrate Enveloop messaging for Fly apps.
Last updated
Was this helpful?
Learn how to create and integrate Enveloop messaging for Fly apps.
Last updated
Was this helpful?
Enveloop integrates with -- combining the power of launching and managing apps on Fly with the ease of designing and sending email and text messages with Enveloop!
makes it easy for developers and non-developers to create, design, and send transactional email and SMS messages with a simple API call. is free and only takes a few moments.
is a powerful, developer-focused public cloud. Combined, you can rapidly create and deploy an application that effectively communicates to your users. Try Fly.io for free -- it's a powerful cloud service for running your apps!
Ok, let's dive in!
While you can separately have an Enveloop account and make calls to the Enveloop API via apps you run on top of Fly.io, the focus of this doc is integrating both services via Fly.io.
Creating an Enveloop project happens via the . Once the Fly.io CLI is installed, sign up for a Fly.io account and create your first Fly app. From there, you can add an Enveloop project to your app.
To create an Enveloop project for your Fly app, in your terminal, scoped to your Fly app, use the following command:
Fly will respond and ask for some additional information. Most of it is defaulted.
Once you confirm the information Fly needs, you should see a confirmation that your project, auto-named, is ready to be used. Boom.
Fly Secrets acts as a vault for your credentials.
So, as you can see in the code example above, ENVELOOP_LIVE_API_KEY
and ENVELOOP_SANDBOX_API_KEY
are accessible to your Fly app, and can be safely used when making programmatic API calls to Enveloop to send messages.
Enveloop provides a visual display of your message templates, a template builder, and message/API logging and monitoring. To access these features, use the dashboard command to launch the Enveloop web app:
From the Fly.io CLI, you can issue the following command:
In this example, the project name is quiet-butterfly-6638
. Once you open the Enveloop console, you can create and design message templates as well as configure your sending settings.
In Fly.io, via the Fly CLI, you can quickly get a list of your Enveloop projects.
Please note: Deleting is forever. This will remove all message settings, templates, and message logs for the Enveloop project you created. Before you do this, Enveloop does provide a way to back up all your templates.
Now that you know how to add an Enveloop integration via Fly, here are some useful examples for how to use Enveloop with various languages and frameworks that you may be running via Fly.io.
When you provision Enveloop for your Fly application, Enveloop will issue API keys to Fly and Fly will store those keys for you in . When you send your first message on Enveloop, via your Fly app, you can reference your keys using the vault provided via Fly Secrets.
Enveloop charges on a per-message basis. You can find the latest pricing information for Enveloop and Fly located here: . Enveloop usage fees are billed daily and will show up, throughout the month, on your Fly.io invoice.