At first: I am a total beginner here. Browsed the forum archive for “Zammad”, didn’t find anything related to my issue.
Describe the issue/error/question
I try to trigger my workflow using a POST webhook: the Zammad application calls the webhook (currently everytime a ticket is edited there) and I try to extract the Ticket-ID from the “raw body”.
Basically I want the following Zammad-Node to “Get a ticket” by using that
But that fails with “ERROR: Forbidden - perhaps check your credentials?”
I auth to Zammad via Token, the setup tests OK, the token has Admin privileges.
When I edit the Zammad Node to use the Operation “Get many”, it authenticates OK and returns all the tickets.
Maybe I use the wrong field from the webhook for the Ticket ID?
My bigger goal is to export tickets from Zammad and make a pdf out of them or something.
These should then be imported into a DMS (unfortunately not yet a Node available for that).
What is the error message (if any)?
ERROR: Forbidden - perhaps check your credentials?
I am actually using a Zammad trigger to send a webhook to n8n, then have the workflow add an article to a ticket. This is working fine for me so far, no auth problems.
I am using an HTTP Request node using OAuth authentication though, as the existing n8n node was rather limited when I looked at it. That said, I just tried fetching a ticket through the default Zammad node and didn’t run into any trouble here with an expression of {{$json["body"]["ticket"]["id"]}}:
Ah, the Agent permissions were the key, it seems, thank you! I had “Admin” etc … simply was wrong.
Now I am that step further and have the whole ticket structure in n8n: great.
Do you have experience with fetching tickets from Zammad, via n8n? My job is to somehow setup an archiving pipeline to put closed tickets into a document managing system.
Thanks. As I am just starting I won’t notice the clumsiness fully, I assume
Looking forward to try this and maybe come up with a fresher approach soon.
In n8n I added a Header auth account but it seems to be wrong to paste the Token from Zammad into “Value” only. Browsing the forum already … thanks for any pointer.
To me your approach seems more powerful than using the Zammad Node: more explicit queries possible as far as I understand.
If you’d like to verify the exact request made by n8n, you could generate a test URL using a service such as webhook.site (which simply accepts any HTTP Request and lets you inspect it afterwards):
If want to re-use this logic for multiple tickets it might be worth putting it in its own workflow, then use an Execute Workflow node whenever you need all attachments for a ticket.
I need to fetch all the articles and attachments per ticket-id.
Maybe another approach would be better: trigger a webhook in Zammad as soon as a ticket gets closed … and by doing so transmit the single ticket-id to n8n. I am not yet sure which approach is better …
EDIT: maybe that’s what you wanted to tell me by pointing at the “Execute Workflow” …