How to use invoke_screen_automation() in a Python Lambda?

Hello all,
I am having trouble using invoke_screen_automation() (InvokeScreenAutomation) in a Python-coded Lambda.

response = client.invoke_screen_automation(
        'string': {
            'rawValue': 'string'

Above, "workbookId", "appId", "screenId" and "screenAutomationId" make sense. If I omit "variables", because I don't need to send any data, I get an error upon execution. If I omit "rowId", I get an error upon execution.

I assume I can omit "clientRequestToken".

What should I be setting "variables" to? What should I be setting "rowId" to (I see no row ID# anywhere!)?

RowId is required if the automation you're calling is "defined inside a block with source or list". Basically if the automation requires the context of a row.

You'll need to use GetScreenData to find a RowId to use.

If you don't need to set any variables, then you can just set the variables parameter to an empty dictionary {}.


Okay; I successfully executed my automation from within a Lambda. I used an empty dictionary for variables and I left out the rowId as my automation was within an empty, invisible Content Box.

The lesson, here, is about weak documentation:

I assume ...defined inside a block with source or list... really meant "...if the automation is defined inside a Block object that refers to a data Source, or if the automation is defined inside a List object..."

And the documentation says that variables is optional really meant that if no variables are required, an empty dictionary must be passed as a parameter.

It's obvious to those who know what they're doing, but unclear documentation is frustrating to a newbie.

Thank you for helping this newbie.

@joeb-f1e9, thank you for the valuable feedback on the API doc. I've submitted a request to our content team to evaluate and make the necessary changes.

Please let us know if you come across any other improvement opportunities, whether in product or in documentation like this.