I am using flow builder to create cases and assign them to specific queues based on criteria within the flow.

In the Assignment element, I can set OwnerId to a hard coded id string or a resource.

I would like to use a resource to keep it dynamic, but am not seeing an obvious way to get the queue id by name.

At the beginning of the flow, I could run an invocable action that pulls the queues through SOQL and return a list of queues back to a resource, but this seems inefficient and excessive.

I looked into using a formula variable resource, but I'm not seeing a path in formulas to query a queue based on name either.

2 Answers 2


Use the GetRecords Element and Query on the Group object.

Add the filter to make sure Type = Queue, then add the filter for DeveloperName = (queue name). enter image description here

  • 1
    I think that the accepted answer is wrong, and this answer is right. As noted by @cropredy, the name of the queue is not an option you can pick if you're targeting Queue. This technique using Group does let you pick the name.
    – Aidan
    Commented Aug 3, 2020 at 15:18

You can retrieve Queue Id dynamically by performing a lookup against Group object, check the query below

select Id , Name , Type from Group where Type= 'Queue'
  • 1
    OP asked for querying by queue name so you need to extend the Where clause
    – cropredy
    Commented Mar 7, 2020 at 6:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .