Last active
November 15, 2020 08:54
-
-
Save wmcraver/8c75cf7fc72e100c2889efb810fafda2 to your computer and use it in GitHub Desktop.
This R script will login to your DocuSign account, retrieve a list of all envelopes, filter the list of envelopes for those with a status of 'completed', and then download said envelopes into one neat PDF. If you use this script, you will need to uncomment lines 5-7 and enter your username, password, and integrator key.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(docuSignr) | |
library(dplyr) | |
# Create env variables based on github directions for this package. https://github.com/CannaData/docuSignr | |
# Sys.setenv("docuSign_username" = "username") | |
# Sys.setenv("docuSign_password" = "password") | |
# Sys.setenv("docuSign_integrator_key" = "integrator_key") | |
login = docu_login() | |
envelopeList = docu_list_envelopes(username = Sys.getenv("docuSign_username"), | |
password = Sys.getenv("docuSign_password"), | |
integrator_key = Sys.getenv("docuSign_integrator_key"), | |
base_url = login$baseUrl, | |
from_date = "2017/6/14") | |
envelopeList$envelopeID = gsub("/envelopes/", "", envelopeList$documentsUri) | |
envelopeList$envelopeID = gsub("/documents", "", envelopeList$envelopeID) | |
envelopeList = envelopeList %>% filter(status == "completed") | |
for (i in 1:nrow(envelopeList)) { | |
docu_download(file = paste(envelopeList$envelopeID[i], ".pdf", sep = ""), | |
username = Sys.getenv("docuSign_username"), | |
password = Sys.getenv("docuSign_password"), | |
integrator_key = Sys.getenv("docuSign_integrator_key"), | |
base_url = login$baseUrl, | |
envelope_id = envelopeList$envelopeID[i]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey @wmcraver - i am desperately in need for that exact same functionality, but am presented with the error below when trying to run this script.
Error in nrow(envelopeList) : object 'envelopeList' not found
any chance you can help with that!?