Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Creating an INC and INC Task using flow designer

sailor_moon
Tera Contributor

Hi All,

 

I'm creating a flow designer wherein the trigger is inbound email that will generate an INC record once it received the email. My question is how can I get the incident number to populate the incident number in incident task table as well as the category and subcategory.

 

This is what I always got after running the testing

 

 

I tried to use a code

var incNumber = fd_data.trigger.inbound_email.incident;

return incNumber;

 

But it's also didn't work, please help me to resolve this. Thank you!

1 ACCEPTED SOLUTION

RAMANA MURTHY G
Mega Sage

Hello @sailor_moon ,

Please look at below screen shot

Screenshot_20240207-103207.png

You can select Incident number using data pill feature,

 

Plese mark my answer as helpful, if it helps you

Thank you

 

 

Please mark my answer helpful  & correct if it helps you
Thank you

G Ramana Murthy
ServiceNow Developer

View solution in original post

8 REPLIES 8

Sainath N
Mega Sage

@sailor_moon : Use the data pill option for the incident field, and select the incident record from step 2.

SainathN_0-1707269359693.png

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Hi @Sainath N,

 

I tried to do that but still not getting the incident number 

Hello @sailor_moon ,

 

Try

var numbe = fd_data.create_task.number

Return numbe

 

In script action, try above script

 

 

Michael George
Tera Guru

In the screenshot you provided, it looks like you are updating an incident, rather than generating a new one. It's a bit unclear on what is going on in step 1 and 2 of your flow, but I think those hold the key to your problem.