How to Send Mass Emails with CodelessAPI, SendGrid, and Notion
Published on October 5, 2023
What You Can Achieve with CodelessAPI, SendGrid, and Notion
- Personalized Newsletters: Tailor newsletters to each recipient's preferences by connecting CodelessAPI with Notion to fetch user data, allowing SendGrid to craft personalized content.
- Targeted Marketing Campaigns: Leverage SendGrid's robust analytics and Notion's segmentation capabilities to run highly targeted campaigns that convert.
- Automated Notifications: Stay ahead with automated notifications for task updates, deadlines, or critical alerts, ensuring they reach the right recipients at the right time.
- Data-Driven Decision Making: Combine Notion's data management and SendGrid's campaign data to create custom reports and dashboards for deep insights, optimizing your email strategies.
Step 1: Sign Up for SendGrid
To embark on your journey of seamless email communication, you'll first need a SendGrid account. If you don't already have one, don't worry – it's easy to get started. Follow these simple steps:
- Visit SendGrid: Head over to sendgrid.com in your web browser.
- Sign Up: Look for the sign-up or registration option on the website and click on it.
- Choose a Plan: SendGrid offers various plans to suit your email sending needs. You can opt for a free tier for smaller-scale usage or choose a plan that fits your requirements.
- Complete Registration: Follow the on-screen instructions to complete the registration process. This will include providing some basic information and verifying your email address.
Congratulations! You now have a SendGrid account ready to power your email communications. If you want to follow a tutorial on how to setup SendGrid, please follow this post.
Step 2: Obtain Your API Key
After signing up, navigate to your SendGrid dashboard and generate an API key. This key will be used to authenticate CodelessAPI's interactions with SendGrid. Follow this tutorial to generate your SendGrid API key. Make sure to save the generated API key for later.
Step 3: Create a New Workflow
With your SendGrid account and API key in hand, you're ready to start building your email automation workflow with CodelessAPI. Here's how you can create a new workflow:
- Access CodelessAPI.io: Log in to your CodelessAPI.io account.
- Navigate to Workflow: Locate and click on the "Create new Workflow" button in the Workflow section of your CodelessAPI.io dashboard.
- Create Your Workflow: Provide a name and description for your workflow and then click "Create". You'll be taken to the Workflow builder page where the magic happens.
You've taken a significant step in setting up your email automation platform. Now, let's proceed to connect Notion to your workflow.
Step 4: Connect Notion to CodelessAPI
Before you add the SendGrid module, it's essential to connect your Notion module to CodelessAPI. This connection will allow you to access the data you want to include in your emails. Here's how:
- Drag Notion Module: In the left sidebar of your workflow builder, expand the "Data" section, then expand the "Read" section and find the Notion module and drag it onto your canvas.
- Configure Notion Module: Click on the Notion module you've added to your canvas. This is where you'll set up the connection. Click on "Add new Notion Account"
- Authenticate Your Notion Account: Follow the authentication process to connect your Notion account to CodelessAPI. Select the relevant workspace and database that contains the data you want to send via email with SendGrid.
- Link the modules To dictate the flow of data, you need to link your modules together. Click the "Start" module and then click "Link". You should see a blue line with an arrow pointing towards your cursor. Move your cursor over to the "Notion" module and click. You should now see an arrow going from the Start module to the Notion module.
You've successfully established the link between Notion and CodelessAPI, allowing you to seamlessly fetch and utilize data for your emails.
Step 5: Add the Text Replace Module
Use the "Text Replace" module if you'd like to send personalized emails or would like to use a custom template.
- Drag Test Replace Module: In the left sidebar of your workflow builder, expand the "Operations" section and find the "Text Replace" module and drag it onto your canvas.
- Link the modules Similar to above, link the "Notion" module to the "Text Replace" module.
- Configure the Text Replace Module: Click on the Text Replace module you've added to your canvas. Within the "Text body" field is where you can paste your html template or your personalized message.
- Replace words for customizability Use the "Add new replace condition" option to replace words from your body text. By setting the "Replace with" to the "map" option. You can select a field from the Notion data source. Make sure to click on the "Add replace condition" button after you've added yoru condition!
For example, the body text "Hi [NAME]" can have the "[NAME]" replaced with data from the Notion source. Each row in the data source will generate a new personalized template with all the words replaced based on the "Text Replace" modules configurations.
You've now added the ability to generate personalized templates! Link the "Text Replace" module to the "End" module and click run to see the output templates. Optionally add the "ChatGPT" module to before the "Text Replace" module, and then feed in both Notion and the "ChatGPT" module to automate generating personalized emails!
Step 6: Adding the SendGrid Module
Now that you've set up your data source, it's time to add the SendGrid module to your workflow. The SendGrid module will enable you to send emails efficiently and effectively. Follow these steps to add it to your canvas:
- Access Advanced Operations: In the left sidebar of the workflow builder, find the "Advanced Operations" section and expand it.
- Select SendGrid: Among the advanced options, locate the "SendGrid" module and drag it onto your canvas.
- Link the modules Similar to above, this time link both the "Notion" module and the "Text Replace" module to the "SendGrid" module.
With the SendGrid module added, you're ready to configure it to connect securely to your SendGrid account.
Step 7: Configuring SendGrid module
To send emails using SendGrid, you need to provide your SendGrid API key that you generated from step 2.
- Add SendGrid account Click on the SendGrid module on the canvas, and then select "Configure" from the options. In the configuration panel, click on "New SendGrid Account" and paste your SendGrid API key. Provide a name and description for the account. You'll now be able to configure the email configuration by clicking on your SendGrid account and then filling out the columns fields.
- Set email values The "From email" options is set automatically based on the emails you have verified from your SendGrid account. The rest of the columns can either be set with the "manual" option or the "map" option. The manual option let's you hardcode the entry.
You can now utilize the map option for your columns and map it to relevant columns coming from either the Text Replace module or the Notion module. This will send an email for every row of data from your Notion data source. - Link the modules You can now link the "SendGrid" module to the "End" module. This completes you workflow and ensures that it operates seamlessly.
Step 8: Run the Workflow
Before you finalize your email automation, it's crucial to test your workflow and ensure that emails are sent correctly. Here's how you can run the workflow for validation:
- Use Built-in Run Feature: CodelessAPI.io offers a built-in run feature to validate your API endpoint. Click the "Run" button located at the bottom of the left sidebar to test your workflow. Please use a dummy email in SendGrid for the test.
- Inspect Results: Review the results of your test run. Ensure that emails are being sent correctly and that the data flows as expected.
- Copy API Link: Once you're satisfied with the results, you can either run your workflow manually or copy the API associated with your workflow to trigger it based on an event. Find your Workflow API by clicking on the "Start" module and selecting the "Configuration" option. Copy the provided API link.
Congratulations! You've reached the final step and are now ready to harness the power of automated, personalized email communication.
Conclusion
You've completed the journey of integrating SendGrid, CodelessAPI, and Notion to create a dynamic email automation system. The synergy of these three elements empowers you to send personalized mass emails without the need for complex coding.
What's even more exciting is what you can achieve with this integration. From crafting personalized newsletters to running targeted marketing campaigns, automating notifications, and making data-driven decisions, the possibilities are endless. This integration opens the door to efficient, data-backed email communication with your audience.
If you encounter any challenges along the way or have questions, don't hesitate to reach out to us at hello@codelessapi.io. We're here to assist you in optimizing your email workflows.