We can now use email-based trade alerts to execute automated trades by combining Zapier and the power Option Alpha webhooks.
Webhooks allow for real-time data transfer between systems. When a specific event occurs (e.g., a new trade alert), a webhook triggers a predefined action automatically, like running an automation in Option Alpha to place a trade.
Zapier is an automation platform that connects your favorite apps and services. It allows us to create workflows, known as "Zaps," to automate tasks without coding.
How to connect Option Alpha and Zapier
This article highlights how you can use Zapier to trigger an Option Alpha automation via email. We’ll explore how to use Zapier to reference an email-based trade alert to open a position in Option Alpha.
If you don’t have a Zapier account, create one here.
Automated open position trigger using an email-based trade alert
In this example, we’ll use a ‘Position Opened’ email from Option Alpha to demonstrate how you can automate a trade alert or signal from any email-based service. Ultimately, the behavior is the same across different use cases: reference an email, reference the necessary details, and send the webhook to trigger another action.
Zap flow set up
Create a new Zap
Click "Make a Zap" to start creating your automated workflow.
Choose Gmail or another email-based alternative. In the Trigger section, you’ll specify the email sender to help sort the specific emails you want to filter.
Then, in the 'Test' section, locate a recent email to use as your test reference.
Set up Email Filtering
Open an example email in the parser and highlight the specific details you need (e.g., ticker symbol, trade type, strike price, expiration date). You can filter the email for specific details to pull out and match various conditions. This will allow you to trigger certain hooks based on certain email details to trigger the correct automation and criteria.
For example, the Zap only continues if the email's body text contains certain keywords:
Configure the Webhook to Option Alpha
- Add a Webhook Action: In your Zap, search for and select "Webhooks by Zapier" as the action app.
- Set Up Webhook: Choose the "POST Request" option.
- Configure Webhook Details: Enter the webhook URL provided by Option Alpha.
The last step is to schedule your bot’s automation to run when your Webhook triggers.
Bot-to-Bot communication via email
We know this will be a very popular use case! Traders have wanted a way to trigger actions between two or more bots in their automated portfolio. With webhooks and Zapier, we are now able to use Option Alpha's email alerts to enable bots to 'talk' to other bots.
There are numerous ways you can use this type of bot-to-bot communication, such as notifications or opened/closed emails, to make logic decisions based on one bot's activity, performance, and more.
In this example, we’ll use a notification to alert 'Bot B' of 'Bot A's' Total P/L and automatically disable scanners to stop looking for additional positions.
Create an automation
First, create an automation that checks the Bot's open P/L, followed by a notification that will be sent to your email if the criteria is met (the same example could also work if you want to notify Bot B that Bot A's open P/L is negative).
A bot notification will be sent to your email that you can reference inside Zapier to call a webhook back to your Option Alpha account.
Create a Zap
Just like the first example, you'll need to create a Zap and specify the email sender information.
In the 'Test' section, instruct Zapier to find that email type and filter it to continue your logic and send a webhook to Bot B.
Now that we’ve sourced the right email type, we can filter for certain words or conditions of the text body. For this example, we’ll ensure the text contains “$500.”
Finally, repeat the first example's process and schedule an automation to trigger when your webhook is called, and Bot B will receive it and follow the automation's logic.
Disclaimer: These use cases are provided solely as an example of how to use webhooks in the Option Alpha platform. Option Alpha does not recommend, suggest, or advise any particular trading strategy, automation, or bot. Option Alpha is not affiliated with Zapier. Additional fees may be required to use Zapier automations.