adrevel.com
Member
- Your Task History ID
- IjU3NmQwNTZhMDYzMjA0MzY1MjZmNTUzMSI_3D_pc
Isn't there an ability for users to configure their input data from previous steps of the workflow in the code step to run Python code?
I want to get the website entered by the user in the previous step and validate that if matches the specific format. If yes then do something. If no then do something.
Here is the code I have written.
import re
website = input_data["<data from previous step>"]
def validate_website(website):
url_pattern = r'^(https?://)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,6}(/[a-zA-Z0-9-]*)*/?$'
if re.match(url_pattern, website):
return website
else:
return 'www.google.com'
The main problem lies with
website = input_data["<data from previous step>"]
I tried many different ways to get that as Pabbly documentation is unclear on setting input data.
But nothing is working.
Can you help?
I want to get the website entered by the user in the previous step and validate that if matches the specific format. If yes then do something. If no then do something.
Here is the code I have written.
import re
website = input_data["<data from previous step>"]
def validate_website(website):
url_pattern = r'^(https?://)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,6}(/[a-zA-Z0-9-]*)*/?$'
if re.match(url_pattern, website):
return website
else:
return 'www.google.com'
The main problem lies with
website = input_data["<data from previous step>"]
I tried many different ways to get that as Pabbly documentation is unclear on setting input data.
But nothing is working.
Can you help?