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
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives