I thought I would make an attempt to answer your question. A few days ago I was in a similiar situation, we are trying to put together a Workforce project for a maintenance department. While Workforce is easy to get started with and create a project it quickly becomes more complicated if you want to do anything more that create assignments by clicking on the screen. I have used Python for various tasks before but would class myself as a beginner and when I have used it for geoprocessing tasks I have always written the code and then run it directly from the GUI (rather than the command line).
While the documentation is good for the Workforce scripts I get the impression it is aimed at people who are already exprienced in Python.
I'll try to explain the steps I took to import assignments from a csv file, anyone with more experience or that spots a mistake feel free to comment!
1. Follow the instructions here:
GitHub - Esri/workforce-scripts: A set of scripts to help administer Workforce projects.
to download and install both Python and ArcREST. I installed using pip, if you haven't got this far then there is information available on the internet about how to download and install pip and python librarys using pip.
2. Download the zip file including the Worforce scripts and unzip it somewhere on your computer
3. Create a Workforce project here: Workforce for ArcGIS. Add the names of the assignments you wish to include (Assignment Types) in you project and the mobile workers and dispatchers.
4.Open an empty text file and copy the example usage command line propmt to the text file from here.
workforce-scripts/create_assignments_from_csv_readme.md at master · Esri/workforce-scripts · GitHub
5. In your text file change username and password to your ArcGIS Online username and password. Change
"https://<org>.maps.arcgis.com" to your ArcGIS online account address. Change the code under -pid to your Workforce project code (you can find it in the web address when you are logged in to your Workforce project).
6. Depending upon how you have installed python and where you have unzipped the workforce scripts you may need to change the paths of the "create_assignments_from_csv.py" script, the assingment.csv file and the log text file. If you add the full file path then python should be able to find them. I have used the arcrest_scripts rather than the standalone_scripts.
7. Open your command line and type "python" without the quotes. If you see some white text and a >>> then you don't need to do anything, if you get an error then python is probably not in your system path. At the start of you text file, replace "python" with the full path to your python.exe (most likely something like C:\Python27\python.exe).
8. If you are going to run the sample assignments.csv then it should work now to copy the command line you have edited in your text file to the command line of your computer. I suggest you try this first before creating your own assignments.
9. When creating own assignments I have followed the structure of the sample csv file with regards to column names and order. If you want to change them then you need to change them in your command line aswell. Depending on your region, if you create a csv from Excel it might use a semi-colon instead of a comma as a seperator. This casues the python scipt to fail. In the csv file under the column "Type" there must be an interger, the number that you give the assignment here will be assigned an Assignment Type based on the order of the assignment types that you created in the Workforce project earlier. Change "102100" under -wkid to the EPSG code of the coordinate system you are using. If your Due Date format doesn't match "%m/%d/%Y" then you need to add -dateFormat with your date format to the command line. For example -dateFormat "%Y-%m-%d". Attachments work from a file, I haven't got them to work with a web url.
Hope this helps!