Best answer

Repeated firing of Close.com tiggers

  • 14 May 2020
  • 5 replies
  • 884 views

Badge

I have 3 zaps being triggered by Close.com New Note, New Call and New Email triggers.

These workflows were running successfully. However, a few days ago they started to repeatedly fire(as if looping), obviously resulting in repeated posts in the target service data.

This repeat firing occurs until the zap is turned off. There are no errors reported in Task history.

Has anyone experience something similar?

Your assistance to resolve this issue is greatly appreciated.

icon

Best answer by amarunda 6 July 2020, 18:08

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +8

Hi @amarunda ,

Thank you for reaching out- sorry you are running into an issue with your Close.com Zap!

I see Lionel in Support is working to help you troubleshoot some possible Code steps. I will let them continue to assist but in the meantime, just let us know if you have any additional questions- happy to help!

Badge

Hi Liz,

Could not work on this as we had run out of tasks due to this issue. However, our tasks have been replenished.

Have identified that the issue is that we have an API call request for company and contact details from the Highrise API endpoint(https://github.com/basecamp/highrise-api). However, a certain company and user combination has duplicates in Highrise i.e  2 company and 8 contact records with the same details. Therefore, Zapier is iterating over each element of the XML response, resulting in a perceived loop.

Initially I had used Javascript and moved to Python believing combining the call and XML parsing woudl result in only 1 response. 

Does anyone know how we can instruct Zapier via Python/Javascript API call to only get the first XML record and not iterate through all the duplicate records in the response.

 Your assistance to resolve this issue is greatly appreciated.

Userlevel 7
Badge +8

Hi @amarunda ,

I hate to hear that- thank you for letting me know!

Tagging in one of our coding and dev gurus in Community, @ikbelkirasan. Ikbel, do you have any suggestions on the above? Thank you!

Userlevel 7
Badge +12

Hi @amarunda, were you able to find the code that you needed to do this? If so it would be super helpful if you could share it 🙂

 

If you still looking for some support with this one and need some paid help, you could ask in the Work Offered category of the Community. 

Badge

Utilised Python code as follows. I have excluded the header and url 
root[0] is the key to getting the 1 response i.e the first record
 

import requests
from xml.etree import ElementTree
from base64 import b64encode



headers = XXXXXX

url = XXXXXX





response = requests.get(url, headers=headers)
response.raise_for_status()

root = ElementTree.fromstring(response.text).findall('person')

if len(root):
print(ElementTree.tostring(root[0], encoding='unicode').replace('\n','').strip())
return [
{field.tag: field.text for field in root[0]}
]
else:
return {'id': 'not found'}