๐ฌ Generate SEO meta drafts from webhook batches with OpenAI and Outlook
โก 3 views ยท ๐ฌ Content Creation & Video
Description
Quick overview
This webhook-driven workflow validates an incoming SEO post batch, uses OpenAI to generate meta title and description drafts for each post, sends the drafts to a provided callback URL, and emails an HTML summary through Microsoft Outlook.
How it works
- Receives a POST webhook request containing a batch of posts to optimize.
- Validates the request by checking the
X-AIS-Secretheader and ensuring the payload includes a non-emptypostsarray. - Responds immediately with either a 202 Accepted (including the number of received posts) or a 401 Unauthorized.
- Builds a per-post prompt from the site context (audience, keywords/phrases, existing meta, and page content) and sends it to OpenAI to generate meta title and meta description JSON.
- Parses the OpenAI responses into a consolidated drafts list and tracks any posts whose AI output cannot be parsed.
- Posts the generated drafts to the provided callback URL via HTTP, then sends an HTML summary email via Microsoft Outlook showing delivery status and the proposed metadata.
Setup
- Configure the webhook URL (path
ais-seo-meta) in the source system that sends the SEO batches. - Replace the hardcoded secret in the validation step and ensure the sender includes the same value in the
X-AIS-Secretheader. - Add OpenAI credentials and confirm the selected model (gpt-4.1) is available for your account.
- Ensure the incoming payload includes
callback_url,batch_id,site, optionalcontext(keywords/phrases/audience), and apostsarray withid,title,url, andcontent. - Add Microsoft Outlook credentials and update the recipient list in the email step to your target addresses.
- Make sure the callback endpoint accepts a POST with
{ "batch_id": "...", "drafts": [...] }and validates theX-AIS-Secretheader.
Requirements
- Self-hosted n8n instance (this template uses LangChain/community nodes not available in n8n.cloud)
- Active OpenAI and Microsoft Outlook accounts with valid API credentials
Customization
- Modify the OpenAI prompt in the generator node to tailor title and meta description style, keyword focus, or length.
- Adjust email content or recipient logic in the final notification node as needed.
Additional info
For support, contact support@ais.email (AI Solutions, Inc.).
๐ Nodes Used
HTTP Request, Webhook, Microsoft Outlook, OpenAI
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File