Zammad - Query existing organization

I am using a POST webhook to send form data in to n8n. I will then create an organization, a user, and a ticket in Zammad based on the form data. This works just fine.

However, when the organization or the user already exists within Zammad the workflow fails.

I am trying to figure out how to use the GET organization and GET user expressions when the variables required by Zammad are ID’s and are not supplied by the form.

Webhook to GET organization (need the expression to GET)
to IF (if active = true)
to Create a ticket

IF active is false
Create Organization
Create a User

When i use a fixed ID number in GET organization it works fine but as the ID isn’t supplied by the form i am stuck as to how to query it…

Any help would be great here.

You’ll want to use the “Get Many” operation to grab all of your organizations and then match the name provided in the form against the results in order to get your ID. In the form, I presume the submitter is just typing out the name of their organization? Or are they selecting from a list? If they are typing it out manually, you run the risk of them typing it wrong/differently and then having a new organization created for no reason.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.