Creating a Task from a Zendesk Ticket — Accessing Comments in AI Prompt

I’m setting up an automation to create a Task when a Zendesk ticket is marked as type “Task.” The automation triggers just fine, but I’m stuck on the AI prompt.

I want the task title to be generated based on the ticket’s context, using the Comments field. I can access Comments in a formula, but I can’t seem to get it to work in the AI prompt.

Any tips on how to properly reference the Comments field in an AI prompt?

You need to reference fields using double braces, e.g. {{Name}}
I suggest looking at the examples in the user guide:

Tried referencing it every way I could think of with no luck. I’ve reviewed all the docs and videos multiple times, but still can’t get it to work as expected.

Did you try
{- Comments:Text -}
?

Yep, but it makes sense to me that it wouldn’t work. I’m guessing I need to reference Step One somehow, and then pull comments:Text from it.

In the formula field it would look like this: [Step 1 Ticket].Comments

I also tried this workaround to bring the context from Step 1 into Step 2, but that didn’t work either.

Nope. When passing parameters to the AI (or in markdown) the syntax is not the same as used in formulas.
Your case is almost identical to the example in the user guide.

Just try it :blush:

Like I wrote above, I have a bunch of times. It’s not working.

I don’t know what to say. I have tested a version for updating both a name field and a description field and it works as expected for me.

1 Like

Thanks for sharing the video! I finally understand where the miscommunication has been :slightly_smiling_face:

The Comments you’re using are from the entity itself. I’m referring to the Comments field from the Zendesk integration—the built-in Rich Text one.

My automation likely worked—the actual comments were just empty. In Fibery’s Zendesk integration, the ticket context is stored in a dedicated Rich Text field called Comments.

So now the question is:

How can I access the Zendesk Integration’s Comments field specifically, and not the entity’s default comments?

What does your schema look like?
Do you want to summarise the contents of a rich text field in the Ticket (called Comments) or do you want to summarise the contents of the rich text field (called Comments) from a set of entities that are linked to the triggering Ticket?

For the former, it should be very easy:

I’d like to summarize the contents of a rich text field in the Ticket called Comments.

Not sure how I can share the schema.

Here’s the trigger, the ai markup, and the error I face when trying to use {{Comments}} :backhand_index_pointing_down:

CleanShot 2025-04-10 at 09.22.06

What fields does the Ticket db have?

Thanks for all that info. I think we’re now on the same page, and I am trying to figure out the answer :slight_smile:

Much appreciated! I also tried renaming the field in the integration settings to see if the name comments was causing a conflict—but that didn’t work either.

I think I see the problem.

Do you have a real comments field on the “Task” database?

When you create a task and set the fields using ai, its using the fields from the task entity, not the step 1 triggering entity.

Work around full thought process as it may be helpful:

You should be to add a lookup to the related comments field and call it “Ticket Comments”, then generate with AI from that field. Tested, not possible because the lookup gets greated after the AI request is sent.

Workaround: add another step. Still doesn’t work for some reason… Maybe the steps don’t wait for eachother to finish?

Workaround: add a rule in the Tasks DB to update field with AI when the lookup field is changed. Works! But then if the ticket comment changes (idk if it does) it’ll retrigger and overwrite the task db.

Solution: Filter on the Tasks rule to only run if the description is empty.

Lemme know if this works!

It appeared to be a Bug on our side.
For “Add Item” Action fields referenced via {{ in a prompt were always resolved incorrectly.
I’ve fixed it, now it should be resolved to field values of triggered entity.

Btw, If you have doubts about exact values that are sent to AI (I know template syntax is cubersome), you can try to use the same template for setting Description field. And see what you get there. Prompt template is resolved in the same way as template for rich-text field (except the Bug above, but it’s fixed already)

1 Like

Yes! It’s finally working as expected.

Thanks for releasing the hotfix, and a big thank you to @Chr1sG for all the back and forth on this.