Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
Former Member
4 years agoHow do I create/attach a File Field to an existing item using the 1Password CLI
Trying to automate a workflow and was wondering how to use the 1Password CLI to attach/upload a File Field to an existing item. See uploaded picture with the file depicted. Any help would be much a...
oliverroos
4 years agoOccasional Contributor
Hi 1P_Simon
many thanks for your reply and for file a feature request.
I tried your example, but this will end in the same error as many others i tried before:
echo "Hello from Simon" > hello.txt && op item create --title "Greeting" --vault="demo" --category SecureNote "greeting[file]=hello.txt" && rm hello.txt
will result in a error:
[ERROR] 2022/09/01 12:46:46 Failed to create item: assignment statement number 1 is not formatted correctly - "file" is not a supported field type. Use: [<section>.]<field>[[fieldType]]=<value>
I'm on 1Password version 8.8 if that helps :)