N8N
Use N8N to integrate with SEEN
- Click this link and create a user - https://n8n.io/
- Click “Add Workflow”.
- Choose the module you will send data from (Webhook, Google sheet etc). We will use Webhook in this guide.
- Change HTTP method to “Post”, and click “Listen For Test Event”.
- Send a test payload to the “Test URL”. You will now see the structure of your payload body under “Output”.
- Click on the “+” button on the top right corner. Choose “Helpers” ⇒ “HTTP Request”.
- Under “HTTP Request” do the following:
- Change “Method” to “Post”
- Add your SEEN endpoint URL: https://api.seen.io/v1/campaigns/{campaign_slug}/receivers/
- Choose “Generic Credential Type” under “Authentication”, and “Header Auth” under “Generic Auth Type”
- Create new credential: “Name” = “Authorization” & “Value” = “Token {string}”.
- Toggle “Send Body” on and choose “JSON” as the “Body Content Type” as well as “Using JSON” as the “Specify Body”.
- Use the following example structure using the “Input” ⇒ “Body” menu in the HTTP node to map your fields:
Note: you will receive the campaign_slug from SEEN.
Note: you will receive the string from SEEN.
Note that the content may need to include more values based on your specific campaign set-up. SEEN will inform you of any changes needed.
You can copy the above example here (make sure to change the content to match your campaign set-up):
[ { "first_name":"{{ $json.body.first_name }}", "last_name":"{{ $json.body.last_name }}", "email":"{{ $json.body.email }}", "customer_id":"{{ $json.body.customer_id }}", "extra_args":{ "country":"{{ $json.body.country }}", "gender":"{{ $json.body.gender }}" } } ]
Replace and add relevant fields and corresponding placeholders for values based on the existing module that you have connected
- Click on “Execute node” to test your payload.
- If you are using Webhook in N8N, remember to change the Webhook URL to “Production URL” in your system before going live.
Did this answer your question?
😞
😐
🤩
Last updated on July 31, 2024