n8n Integration
Step-by-step guide for connecting SALZ to n8n workflows -- HTTP Request node setup, authentication, and example automation.
n8n is an open-source workflow automation platform. You can connect SALZ to n8n using the HTTP Request node to optimize AI-generated text as part of any automated workflow.
Prerequisites
- A running n8n instance (self-hosted or n8n Cloud)
- A SALZ account with an API key
Setting Up the HTTP Request Node
- Add an HTTP Request node to your workflow.
- Configure it with the following settings:
| Setting | Value |
|---|---|
| Method | POST |
| URL | https://add-salz.io/api/v1/optimize |
| Authentication | Header Auth |
| Header Name | Authorization |
| Header Value | Bearer YOUR_API_KEY |
| Content Type | JSON |
- In the Body section, set the body to JSON and add:
{
"text": "={{ $json.generatedText }}"
}
Replace $json.generatedText with the expression that points to the text from the previous node in your workflow.
Storing Your API Key
For security, store your SALZ API key as an n8n credential rather than pasting it directly in the node:
- Go to Credentials in n8n.
- Create a new Header Auth credential.
- Set the name to
Authorizationand the value toBearer YOUR_API_KEY. - Select this credential in the HTTP Request node.
Example Workflow: AI Content Pipeline
This workflow generates a blog post with an LLM, optimizes it with SALZ, and publishes it to a CMS.
Nodes
- Schedule Trigger -- Runs daily at 9 AM.
- OpenAI Node -- Generates a blog post draft.
- HTTP Request (SALZ) -- Optimizes the generated text.
- HTTP Request (CMS) -- Publishes the optimized text to WordPress/Ghost/etc.
SALZ Node Configuration
{
"method": "POST",
"url": "https://add-salz.io/api/v1/optimize",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
"body": {
"text": "={{ $json.choices[0].message.content }}"
}
}
Reading the Response
The SALZ response is available in the next node as:
{{ $json.optimized }}
Use this expression to pass the optimized text to your CMS, email service, or any downstream node.
Error Handling
Add an IF node after the SALZ HTTP Request to check for errors:
- Condition:
{{ $json.success }}equalstrue - True branch: Continue with the optimized text
- False branch: Log the error or send a notification
For rate limit errors (429), add a Wait node with a 60-second delay, then retry the SALZ request.
Example Workflow: Form Submission Optimization
- Webhook Trigger -- Receives form submissions from your website.
- HTTP Request (SALZ) -- Optimizes the user-submitted AI text.
- Google Sheets Node -- Stores the original and optimized versions.
- Email Node -- Sends the optimized text back to the submitter.
Tips
- Test with the Execute Node first. Run the SALZ node individually to verify the request and response before running the full workflow.
- Use expressions for dynamic text. Reference output from previous nodes using n8n's expression syntax.
- Add delays for batch processing. If your workflow processes many texts in a loop, add a 3-second wait between SALZ calls to stay within rate limits.
- Monitor execution logs. Check the n8n execution history to debug failed SALZ calls.