Skip to content

Instantly share code, notes, and snippets.

@sfdcale
Last active September 20, 2019 22:01
Show Gist options
  • Select an option

  • Save sfdcale/ddf318d4bc064a11a98e142b88cc2f31 to your computer and use it in GitHub Desktop.

Select an option

Save sfdcale/ddf318d4bc064a11a98e142b88cc2f31 to your computer and use it in GitHub Desktop.
This bash script is to download flow id and name from input file containing flow id
#!/bin/bash
input="flows.csv"
while IFS= read -r line
do
id="${line//\"/}"
id="'$id'"
echo "$id"
sfdx force:data:soql:query --usetoolingapi --query="SELECT Id,FullName FROM Flow WHERE Id=$id" --resultformat=csv --targetusername=prod >> flow_names.csv
done < "$input"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment