N8N

Use N8N to integrate with SEEN

  1. Click this link and create a user - https://n8n.io/
  1. Click “Add Workflow”.
  1. Choose the module you will send data from (Webhook, Google sheet etc). We will use Webhook in this guide.
  1. Change HTTP method to “Post”, and click “Listen For Test Event”.
  1. Send a test payload to the “Test URL”. You will now see the structure of your payload body under “Output”.
  1. Click on the “+” button on the top right corner. Choose “Helpers” ⇒ “HTTP Request”.
  1. Under “HTTP Request” do the following:
    1. Change “Method” to “Post”
    2. Add your SEEN endpoint URL: https://api.seen.io/v1/campaigns/{campaign_slug}/receivers/
      1. Note: you will receive the campaign_slug from SEEN.

    3. Choose “Generic Credential Type” under “Authentication”, and “Header Auth” under “Generic Auth Type”
    4. Create new credential: “Name” = “Authorization” & “Value” = “Token {string}”.
      1. Note: you will receive the string from SEEN.

    5. Toggle “Send Body” on and choose “JSON” as the “Body Content Type” as well as “Using JSON” as the “Specify Body”.
    6. Use the following example structure using the “Input” ⇒ “Body” menu in the HTTP node to map your fields:
Notion image

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

  1. Click on “Execute node” to test your payload.
  1. 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