Email Subscription Service with n8n Forms, Airtable and AI n8n Workflow Template

n8n workflow template · 24 nodes · Airtable

Email Subscription Service with n8n Forms, Airtable and AI is a free n8n workflow template that runs on a schedule and works with Airtable, Gmail, Wikipedia, Groq and OpenAI. It has 24 nodes, 5 of them AI nodes (Window Buffer Memory, Wikipedia Tool, AI Agent and Groq Chat Model). The notes inside the workflow say: “Use a form to allow users to subscribe to the service.” To run it, you add your own credentials for Airtable API, Gmail OAuth2, Groq API and OpenAI API.

At a glance

Trigger
Schedule Trigger (Schedule Trigger)
Nodes
24
Apps
Airtable, Gmail, Wikipedia, Groq and OpenAI
AI nodes
5
Credentials
4 types
Category
Email automation

Apps and integrations

  • Airtable
  • Gmail
  • Wikipedia
  • Groq
  • OpenAI

Node types used

  • Schedule Trigger
  • Airtable
  • Gmail
  • Execute Workflow
  • Edit Fields (Set)
  • Execute Workflow Trigger
  • n8n Form Trigger
  • Filter
  • Code
  • Execution Data
  • Window Buffer Memory
  • Wikipedia Tool
  • AI Agent
  • Groq Chat Model
  • OpenAI
  • Edit Image

How it works

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

1. Subscribe flow

Use a form to allow users to subscribe to the service.

2. Unsubscribe flow

  • Uses Form's pre-fill field feature to identify user
  • Doesn't use "email" as identifier so you can't unsubscribe others

3. Scheduled Trigger

  • Runs every day at 9am
  • Handles all 3 frequency types
  • Send emails concurrently

5. Use Execution Data to Filter Logs

If you've registered for community+ or are on n8n cloud, best practice is to use execution node to allow filtering of execution logs.

6. Use AI to Generate Factoid and Image

Use an AI agent to automate the generation of factoids as requested by the user. This is a simple example but we recommend a adding a unique touch to stand out from the crowd!

7. Send Email to User

Finally, send a message to the user with both text and image. Log the event in the Airtable for later analysis if required.

Setup notes

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

Try It Out!

This n8n templates demonstrates how to build a simple subscriber service entirely in n8n using n8n forms as a frontend, n8n generally as the backend and Airtable as the storage layer.

This template in particular shows a fully automated service to send automated messages containing facts about a topic the user requested for.

How it works

  • An n8n form is setup up to allow users to subscribe with a desired topic and interval of which to recieve messages via n8n forms which is then added to the Airtable.
  • A scheduled trigger is executed every morning and searches for subscribers to send messages for based on their desired intervals.
  • Once found, Subscribers are sent to a subworkflow which performs the text content generation via an AI agent and also uses a vision model to generate an image.
  • Both are attached to an email which is sent to the subscriber. This email also includes an unsubscribe link.
  • The unsubscribe flow works similarly via n8n form interface which when submitted disables further scheduled emails to the user.

How to use

  • Make a copy of sample Airtable here
  • Make sure the workflow is "activated" and the forms are available and reachable by your audience.

Need Help?

Join the Discord or ask in the Forum!

4. Using Subworkflows to run executions concurrently

This configuration is desired when sequential execution is slow and unnecessary. Also if one email fails, it doesn't fail the execution for everyone else.

Nodes in this workflow

The 24 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. Schedule Trigger (Schedule Trigger)
  2. Search daily (Airtable)
  3. Search weekly (Airtable)
  4. confirmation email1 (Gmail)
  5. Execute Workflow (Execute Workflow)
  6. Create Event (Edit Fields (Set))
  7. Execute Workflow Trigger (Execute Workflow Trigger)
  8. Unsubscribe Form (n8n Form Trigger)
  9. Set Email Vars (Edit Fields (Set))
  10. Log Last Sent (Airtable)
  11. Search surprise (Airtable)
  12. Should Send = True (Filter)
  13. Should Send? (Code)
  14. Create Subscriber (Airtable)
  15. Update Subscriber (Airtable)
  16. Subscribe Form (n8n Form Trigger)
  17. Execution Data (Execution Data)
  18. Window Buffer Memory (Window Buffer Memory)
  19. Wikipedia (Wikipedia Tool)
  20. Content Generation Agent (AI Agent)
  21. Groq Chat Model (Groq Chat Model)
  22. Generate Image (OpenAI)
  23. Resize Image (Edit Image)
  24. Send Message (Gmail)

Credentials you need

  • Airtable API – used by Create Subscriber, Log Last Sent, Search daily and Search surprise and others
  • Gmail OAuth2 – used by Send Message and confirmation email1
  • Groq API – used by Groq Chat Model
  • OpenAI API – used by Generate Image

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
  3. Open each node that shows a warning and select or create its credential.
  4. Read the notes on the canvas, test the workflow with sample data, then activate it.

Do you need somewhere to run it? Read our guide to self-hosted n8n.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us