# awx collection workflow creation

**URL:** <https://forum.ansible.com/t/awx-collection-workflow-creation/33144>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [June 10, 2020, 4:10pm UTC](https://forum.ansible.com/t/awx-collection-workflow-creation/33144 "2020-06-10T16:10:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Bullen](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Jason\_Bullen](https://forum.ansible.com/u/Jason_Bullen)\
**Post date:** [June 10, 2020, 4:10pm UTC](https://forum.ansible.com/t/awx-collection-workflow-creation/33144/1 "2020-06-10T16:10:40Z")

</div>

I’m trying to get my awx deployment documented in Iac. Trying to get workflows to create. ran into a bug with the built int tower-cli modules that was already documented and on that git issue the recommendation was to switch over to the new collection which I have done but it is still really new and I can’t find any documentation on workflow schema and survey formats supported. For my schema, I just have a very simple list that I pulled from tower-cli but when I run that against the awx.awx tower\_workflow\_template module I get

Elements value for option schema is of type \<class ‘str’\> and we were unable to convert to dict: dictionary requested, could not parse JSON or key=value"}

The below 2 formats are what I export out from tower-cli. Is there somewhere I can go to see the dict format the new collection is requesting??

I’ve tried the below two formats and this is what the module looks like:

- name: Create Server Connection workflow  
tower\_workflow\_template:  
\<\<: \*login  
name: Manage Server Connections  
description: Manage server connections in AWX  
organization: “{{ awx\_org }}”  
schema: “{{ lookup(‘file’,‘./workflow\_configure\_ports.json’) }}”

# survey: “{{ lookup(‘file’,‘./workflow\_configure\_ports\_survey.json’) }}”

# survey\_enabled: yes

---

<div class="post-metadata">

**Author:** ![Jason\_Bullen](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Jason\_Bullen](https://forum.ansible.com/u/Jason_Bullen)\
**Post date:** [June 10, 2020, 6:21pm UTC](https://forum.ansible.com/t/awx-collection-workflow-creation/33144/2 "2020-06-10T18:21:28Z")

</div>

I was able to get this working finally. The problem is the easier documentation to find right now is on the older tower-cli based modules. In that documentation, they used a lookup to load the yaml schema. lookups parse the file and returns a str. In the collection though the tower\_workflow\_template wants a dictionary. Fix that by forgoing the lookup and drop your schema into a var file. There is also another way to do this and this is their recommend way going forward. Use the tower\_workflow\_job\_template\_node module to create the workflow. With this module you don’t upload a schema file you build the nodes and attach to the workflow. Something like this works:
