Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to use Talend to extract data from Mailchimp. I found some instructions out on Google that indicated I should use the tRest component. I'm unfamiliar with the component and I'm not sure what I'm doing wrong. I'm getting a token error. See attached.
Hi @gfred,
It looks like you have a compilation error. I would recommend connecting a tLogRow to your tRest component. You have also not configured your tRest component incorrectly. You have set the body as a header and you have used unescaped quotes in the String. This will be the cause of your compilation issues.
Can you post a link to the mailchimp API documentation that you are using as this might help us help you out.
You posted a screenshot with your API key in it. This is not advisable since it could give access to other people to your mailchimp account. I have therefore removed the image.
Here's a link to the article I was referring to.
Hi @gfred, I cannot see the link
https://intodata.eu/connecting-to-salesforce-and-mailchimp-using-talend/
Here is the link that you requested.
It looks like there are several things wrong here. First of all, the API method you are using is for creating a list in mailchimp. I don't think that is what you want to do. It is also a POST method, yet you are using GET. The "Body" header is not needed there. If you set the Http Method to POST, you will see a Body section appear. This is a Java String, so must be surrounded with quotes (.....if it contains quotes, they must be escaped). The example shown in the documentation you have given me is formatted to escape quotes...
“{\”apikey\”: \”your api key will be here\”,\”cid\”: \”put a campaign id here\”}”
The '\' characters are there to escape the following '"' characters.
If you look at the MailChimp API documentation (https://developer.mailchimp.com/documentation/mailchimp/reference/overview/) you will see how the method calls should be built and what parameters are needed. To start with, you need to pick an API method
I'm trying to understand what components I should be using from the Talend side and how to use them. You are correct, I am trying to pull data from Mailchimp into Snowflake using Talend.
You first need to understand the MailChimp API and how to use it. You can test this out by using a tRest and tLogRow component. Once you have been able to extract the data you need from the MailChimp API, you will need to figure out how to extract it from JSON format. You can use a tExtractJsonFields component for that. Once you have got the data you want out of the JSON String, you will need to work out where you want it in Salesforce and how to get it there.
I suggest you start with just trying to get the data out of MailChimp first.
That's what I'm trying to do. But I'm confused. If I'm trying to use the get HTTP method and the Body isn't necessary as you mentioned then where do I give the component the API key to use to pull the data with?