Send input parameters as additional fields in customer.io node

Hi everyone, I’m currently creating a flow to send data submitted in a webhook to customer.io

In my particular example the data is already in an array of objects ready to be upserted in to customer.io, but within the node it forces you to specify each property of the object as an additional field which seriously limits the reusability of the flow for a webhook call with an arbitrary amount of parameters

I wonder if we could somehow change the node to just take any objects passed to it as input the same way that the Airtable node does (which is great all around)

Usually we only let the database like nodes to use the input instead of the values define in the UI. But I see how that can be helpfull as well for your case in the customer.io node.

Yep! I would mention as a note that several of these marketing tools like Customer.io and ActiveCampaign have a CRM component to it which is essentially a database of customers and their statuses. I have a feeling this would simplify a lot of flows for storing customers

We do have a design to add this option to all database-like nodes: the idea is to give you the choice between specifying each field mapping manually or passing in pre-formatted data.

In fact we have a whole load of recurring patterns like this that we want to improve (specifying which record you’d like to act on is another one). Once we have designs for all, we will update all the existing nodes.

Until that feature comes out, it might save some time for you to reference objects via expressions (in the HTTP Request node)
Here is a quick video on how to do that:

3 Likes

+1 for an awesome video - thanks for the walkthrough!

1 Like

Amazing !

I’m trying to make a put request with your template but I’ve always refused at customer.io.

Do you have an example of a header configuration parameter please?

I’m afraid I don’t have a header config example. Can you let me know why you’re using the HTTP Request node instead of the native Customer.io node?

@MuMu @maxT

In my case I found that it was easier to use the HTTP request node than the CIO native node due to authentication

Here’s how I set the headers and had it work successfully:

If you look at the cURL example for any action in the documentation it has a line that looks something like this:

"Authorization: Basic $(echo -n site_id:api_key | base64)"

If you notice, in the second header I’m setting

Authorization

and then

Basic with a string that looks something like this MTIzOjQ1Ng==

(notice the equal sign at the end, that is a good sign that you did it correctly)

So all together

Basic MTIzOjQ1Ng==

The way to get the last part with the equal sign is to copy and paste this into your terminal / console

echo -n site_id:api_key | base64

but replacing the site_id and api_key with the values you get from this page Customer.io

So if your site_id and api_key were 123 and 456 then the line above would look like this

echo -n 123:456 | base64

And that would give you the string with the equal sign

MTIzOjQ1Ng==

Hope this helps

1 Like

Hello,

The problem with this node is that it outputs information with data, customer.io does not create the attributes automatically.

@MuMU in my example I’m still outputting using the data property, I’m actually not sure if there’s another way to get attributes in customer.io :thinking:

Yes working good ! thx !

Why you did not use the HTTP basic authentication?

They require their site_id api_key combo to base64 encoded, would HTTP basic auth be able to do that automatically?

Yes, just add the site_id in the username and the api_key in the password. That should do it.

2 Likes

I use this template to update the customer attributes in customer.io. So I put the email URL automatically via expression but it doesn’t send multiple requests.

Do you have any idea how to handle this?

I think I need a little more context to answer, would you be able to post a screenshot of your flow to understand better what you’re trying to achieve?

Hello,

Here are the screenshots. The goal is to update the customers via their email at each request (there are several customers)



I notice that you’re using a function item node, what’s always worked for me is to use the regular function node

Other than that, assuming that your expressions are correct this should work as you want

For you each email should make a request?