Incorrect mapping of values coming from HTTP Request

My flow is this:
Fetch email subscribers from datastore - Iterate through them - pass them one at a time to a HTTP request (API to my email service provider) - Update the subscriber status, subscription date etc. to the datastore (I’ve swapped this last step out for Google Sheet atm, just so I can get a better idea of what’s going on)

Everything is working fine except for the last step, where it is ‘locking’ me into the details of only the first subscriber’s email address.

In the screenshot above you can see the values I am mapping from the API response:

  1. data: aiming4fire@gmail.com: email
  2. data: aiming4fire@gmail.com: create_date
  3. data: aiming4fire@gmail.com: status

But, these should, I think, be:
3. data: email
3. data: create_date
3. data: status

So the question is, why am I not correctly able to map the values? i.e. why will Make not allow me to set ‘3. data: email’ etc. but instead is setting ‘3. data: aiming4fire@gmail.com: email’ etc.

Heyy @Aiming_For_FIRE
It is because the email,create_date and status are subitems of aiming4fire@gmail.com and data.
It helps in mapping the items. It will not change your result.

2 Likes

That makes sense. Is there a way around that/to fix that?

@Aiming_For_FIRE
No I think we cannot change the output coming from the http module.

More by luck than judgment, I have managed to find a way to handle this.

I added an additional iterator in my flow (just so that I can grab the data coming from the API request and do things with it).

Within this iterator, I converted my Data to an Array (it already is an array, so go figure).

Now in my final step (this case writing to Sheets), I can specify the label of the item I want from the array, like so:

Arrived at this solution after a fair bit of trial & error, don’t fully understand why it works but it does.

2 Likes

Hi @Aiming_For_FIRE welcome to the community :wave:

I just want to quickly step in and say congrats on getting this up and running :clap: Your Make intuition seems to work just right since it led you to the solution you needed!

Thanks a lot for circling back in here and for sharing your final setup with us in such detail. This is super valuable and could be incredibly helpful to many others who are searching for similar information. :pray:

1 Like