ATF - Email to Case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2023 01:30 AM
Hello,
We have been creating a flow for email to case. The way of working is quite simple, when an email is sent to a specific email address, a case is created. The flow is working, I've been using and testing it.
We would like to validate the case creation flow using ATF.
I've created a test step with "Generate Inbound Email".
The email creation is done, I can see it on the email log.
Two issues:
- On the email log, the target field is empty for the email created by ATF.
- I try to use "Open an Existing Record" step, but I'm not sure it is the right way and as no target is created, therefore this step fail. (A sys_id was expected, however none was present. Please ensure that you are passing in the document id correctly)
Do you have any idea why the flow isn't fired with the ATF email ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2023 03:14 AM
Hi @Cedric Ruffier ,
I trust you are doing great.
Ensure that the target field is populated in the email log:
- In your test step with "Generate Inbound Email," verify that the target field is correctly set. This field determines where the email should be directed.
- Confirm that the email generated by ATF has the appropriate target field value to trigger the desired flow.
Use the "Open an Existing Record" step in the flow:
- This step can be utilized to open an existing record, such as a case.
- Make sure that you are passing the correct document ID (sys_id) of the case record to the "Open an Existing Record" step.
- If the target field is empty for the ATF-generated email, it indicates that the email did not trigger the flow properly. In this case, the "Open an Existing Record" step will fail since there is no record to open.
To map the approving (document_id) field and retrieve the case record/number through the flow designer, follow these steps:
- In the flow designer, add a new action or step after the "Open an Existing Record" step.
- Configure the action/step to fetch the required case record using the approving (document_id) field.
- You can use a script action or a REST API action, depending on your specific requirements and available resources.
- Retrieve the case record based on the provided document_id value and store it in a variable for further use in the flow.
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2023 05:58 AM
Hello @Amit Gujarathi ,
Thanks for your prompt answer.
On the Generate inbound Email step, I can't specified a target:
What I'm expected is once this email is generated, the case creation flow should start as the criteria is met (base on the To field). But unfortunately, the flow isn't fired, hence the target filed is empty:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 09:40 AM
Hi Cedric Ruffier,
The Case record created during ATF execution would be deleted once the run is completed. Place Debug point and the record would be available.
Suggestion:
- Use Generate Random String step to generate a unique string
- Create Generate inbound Email with unique value in short description from above step
- Use record query step under server category with filter (Short description = Unique value from above).
- Above query will give only one record and give the output sys_id as input to "Open an Existing Record"
Regards,
Sushma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 09:44 AM
Hi there,
Do keep in mind, that processing emails is happening scheduled in ServiceNow. So it might not happen instantly, while you might have that logic as such in your ATF.
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field