Hi Make Community,
I’m currently working on an automation scenario where I parse the output from a Lambda function that provides the following JSON:
{
“domain_name”: “example.com”,
“verification_token”: “12345678910111213141516=”,
“dkim_tokens”: [
“ttrf59f4148ggt1465e4f4re89g7418erf”,
“fekfhrj4iu4gbiuh3hbg3buf89b59f4bi”,
“sqtzxpjtffrjiofjriovnornrnf4rfnrgn332”
],
“message”: “Domain example.com successfully added to SES.”
}
My goal: Dynamically map the dkim_tokens
(3 values in the array) into a subsequent HTTP API call for updating DNS records in Namecheap. The HTTP call requires me to include all three dkim_tokens
separately as follows:
HostName1: dkim_token1._domainkey
Address1: dkim_token1.dkim.amazonses.com
HostName2: dkim_token2._domainkey
Address2: dkim_token2.dkim.amazonses.com
HostName3: dkim_token3._domainkey
Address3: dkim_token3.dkim.amazonses.com
What I’ve Tried:
- Parsed the JSON successfully using the Parse JSON module.
- The
dkim_tokens
array is available in the output.
- Added an Iterator to iterate over the
dkim_tokens
array. - Attempted to map the output of the Iterator into the HTTP module.
Issue: When mapping the tokens into the API call, I’m only able to map a single value (e.g., dkim_token1
) instead of all three. The output seems to lose context when moving between the Iterator and the HTTP call, or I’m missing a key step to dynamically combine the tokens.
What I Need Help With:
- How do I dynamically map all three
dkim_tokens
as separate variables (dkim_value1
,dkim_value2
,dkim_value3
) for use in my HTTP API call? - Is there a better way to handle and transform this JSON to achieve the desired mapping?
Any insights, advice, or solutions would be greatly appreciated!