Macro to Create Ticket and Post new Comment - Comment Author | The place for Zendesk users to come together and share
Skip to main content
January 11, 2022
Question

Macro to Create Ticket and Post new Comment - Comment Author

  • January 11, 2022
  • 2 replies
  • 25 views

I have a small workflow set up that allows a user to use a macro which creates a new ticket and sends a message to the requester on the new ticket using webhooks in triggers.

The problem I am running into is the author of the comment on the new message. Since I use 'Basic Authentication' it always says it the email was from the user who is associated with the webhook. How can I notify a webhook and have the author be the person who used the macro on the original ticket?

Thank you everyone!

2 replies

Jason112
January 13, 2022

Hi @dean13,

In the create ticket payload, you can add an 'author_id' property to the 'comment' object (check out the Ticket Comments documentation for more info). The 'current_user.id' placeholder should work for the 'author_id' value, assuming the webhook trigger runs when the agent applies the macro and submits the ticket. Here's a sample payload:

{
"ticket": {
"comment": {
"body": "Something something",
"author_id": {{current_user.id}}
},
...
}
}

Note: per the Author id documentation, the updater of the ticket will still be the authenticated user, so it could have an impact on business rules and views.

Dean13Author
January 14, 2022

Thank you this is very helpful.