Hi Troy,
I can’t seem to get the custom action to fire correctly.
I took to ChatGPT and asked for its help and here’s what I’ve got so far.. I know I need to update the apiKey field with my actual API, which I’ve done. But I’m still getting a error message (below) after the code is ran.
const contactId = inputData.contactId; // Get the contact ID from the previous step
const tagId = inputData.tagId; // ID for 'MEMBER_Community'
const apiKey = 'your-getresponse-api-key'; // Your GetResponse API key
// Set up the API request URL
const url = `https://api.getresponse.com/v3/contacts/${contactId}/tags/${tagId}`;
const options = {
method: 'DELETE',
headers: {
'X-Auth-Token': `api-key ${apiKey}`,
'Content-Type': 'application/json'
}
};
// Make the API request using fetch with callback
fetch(url, options)
.then(response => {
if (!response.ok) {
throw new Error(`Error: ${response.statusText}`);
}
return response.json();
})
.then(data => {
// Return a success message if the tag was removed successfully
callback(null, { success: true, data: data });
})
.catch(error => {
// Return the error message if something went wrong
callback(null, { success: false, error: error.message });
});
=======
Success false Error Error: Not Found ID eBtx4Epr4nb1HE45KpN4IZkJRz9laZWM runtime_meta Runtime Meta Memory Used Mb 77 Runtime Meta Duration Ms 636 Runtime Meta Logs Runtime Meta Async true
So, it seems it’s not able to find the contact from the lookup on the previous Zap.
The call from the previous Zap looks at the email from Circle (the subscription platform) and should find and update the contact based on that. Here’s a screenshot: https://glitzyinfo.com/
Can you assist me with putting together the missing pieces?