Build Agent Prompt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
Hi All,
We are using Build Agent Tool to create a catalog item and flow in global scope. Facing the issue with writing the prompt for populating a group record in ask for approval action for flow. It's not populating the exact group we have given in prompt. It's populates nothing.
Prompt we have given is below:
Flow Name: Reach v2
Catalog Item: Reach for Amazing Platform
Trigger
- Trigger the flow when a Requested Item (RITM) is created for the catalog item "Reach for Amazing Platform v2 ".
Approval Logic
Scenario 1: requested_for is same as opened_by
When the Requested For user and Opened By user are the same:
- Check whether the Requested For user is a member of the group "Onboarding HR Approval Group".
- If Yes:
- Auto-approve the Request Item.
- Set:
-Approval = Approved
-State = Work in Progress
- If No:
-add an 'Ask for Approval' action. Set the rules 'Approve or Reject' When 'Anyone approves or rejects' to group -'Onboarding HR Approval Group" having sys id is '"8be2373e647e48b78ee8e3ee36487562"
- After approval:
- Set Approval = Approved
-Set State = Work in Progress
Any help would be appreciated.
Thanks,
Ankita Bisht
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Hi @Ankita Bisht,
The issue is likely the prompt ambiguity around the approval rule. Build Agent works better when you explicitly identify the table, field, group name, and sys_id, rather than describing the approval configuration only in natural language.
Update the existing Flow Reach v2.
Trigger: When a Requested Item [sc_req_item] is created for catalog item Reach for Amazing Platform v2.
Condition: Compare requested_for and opened_by.
If requested_for == opened_by:
- Check whether requested_for is a member of the group:
- Group name: Onboarding HR Approval Group
- Group sys_id: 8be2373e647e48b78ee8e3ee36487562
- If the requested-for user is a member of this group:
- Set approval = approved
- Set state = Work in Progress
- Do not create an approval request.
- If the requested-for user is NOT a member of this group:
- Add exactly one Ask for Approval action.
- Record: the current Requested Item [sc_req_item].
- Approval rule: Anyone approves or rejects.
- Approver type: Group.
- Approver group: Onboarding HR Approval Group.
- Group sys_id: 8be2373e647e48b78ee8e3ee36487562.
- After the approval action returns Approved:
- Set approval = approved
- Set state = Work in Progress
Do not leave the Group approver blank and do not use the current user's group dynamically.
Use the specific group record identified by sys_id 8be2373e647e48b78ee8e3ee36487562.
