copy_folder doesn't copy automation rules via rest api
currently I run a copy_folder by API then found that the automation rules of the sheet under the folder is not copied.
I tried to create that automation rule by rest api, after copying the folder, but found that create_automation_rule is not available.
Is there a good way to do this fully via rest?
Answers
-
Hi @Lilian T
Based on the documentation for copy_folder here, it looks like you would just need to include rules as one of your parameters (rules includes both notification and workflow rules).
There's an example of how to include a parameter in C# (the example is for DATA) to the right of the documentation.
If you're using Python, there's an example on GitHub, here (search for "rules" and you'll see it under "copy_folder").
Let me know if you still need help after reviewing the examples above. If so, it would be helpful to see a copy of your request, but please remove any sensitive data.
Cheers!
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Hi @Genevieve P. Thanks a lot for getting back a while ago. This task was put aside because of my work load. I tested again lately with Python and it did NOT work.
Below you can find my code, which is quite straight forward:
response = smart_service.Folders.copy_folder( copy_from, smartsheet.models.ContainerDestination({ 'destination_id': copy_to, 'destination_type': 'folder', 'new_name': new_name }), include='rules,all')
I used "all" here because only "all" works while I want to copy all the sub folders beneath.
Please check the API implementation on your side and see if "rules" only works under certain conditions.
Thanks a lot.
-
Hi,
the following code works fine for me:
we need everything from our template folder (many, many complex Smartsheet objects),
so, we included all available options in include ...
and it works perfect (including automation workflows) ... except that it does not do automatically cross sheet references, so, you have to use other api calls to get them correct ... here is example:
rgrds,
ljk
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives