I wanted to configure a call to an API in order to request some information from one service called GoCardless (still pending support from n8n).
I have that query configure with an addon from google sheet but I prefer to move to n8n as that will give me more option of further process. The issue is that I’m a little lost on how to get the same results in n8n because of my poor knowledge
I guess someone can help me how to translate to the correct node.
This is how a have configured on google sheet add-on
Any help will be more than welcome!!!
Information on your n8n setup
n8n version: 0.198.2
Database you’re using (default: SQLite): I guess de default
Hi @MaaPer, which problem exactly do you have with n8n here? Did you try out the HTTP Request node yet and got any error? And do you have any documentation for this API?
As a starting point this will get all customers, You will need to add a generic header auth option that follows the API docs to get it working. It also doesn’t merge the execution outputs to provide one list but this should get you started.
Thanks @MutedJam & @Jon for your help.
What is not clear to me is how to configure the authorization key on header account (credential for header). I tried with different option of name a putting the key that is properly working on my actual query from google sheet but without success.
Can you help me with that?
Now it’s working!
I put the configuration here for if could be usefull for someone.
The correct is put Bearer + API_KEY_SECRET on value, and Authorization on Name
Now I help on how to put all the values on one single datatable. I tried to use Split Out form Item List node, but it only split the last information from the IF node and not all the records caught by the http request node. Any clue with that?
This is the flow, no I will need some kind of function to map all pages from IF node or HTTP node into one single list.?
After that node, I need to use two additional steps to get all the useful information (customers) on the same table. I put two item list nodes for split out. The first node is used to split out “allData” the second to do the same with “customers”.
How can I split out in the same code node and avoid those two additional steps? (if it is possible, just for my knowledge).
Hi @MaaPer, I’ve built an updated example workflow which uses the new code node, and which returns the actual items rather than s single item with the allData property:
Simply update the name of the node you want to grab data from in the code node.
That said, the customers comes from your API, so I’ve not covered this in the code to keep it as flexible and re-usable as possible. So, you’d still need one Item Lists node here. Let me know if this is a problem, and I’ll build a quick example taking care of the customers as well
Now I realize that even with that call error on the code editor, the flow is working.
How it will be the code to remove the second level (customers) so avoid using the item list node at all for split out?
Looking at your flow you have 2 item list nodes, I was just having a play and it only needs the one. The workflow below will get all customers from Go Cardless.
Thanks! I need to put a wait 1 second node after set, otherwise my flow execution hangs the explorer tab on testing. I also put to get 50 records (max) on each loop execution.
It’s working perfect, however still need an item list node for the last step