You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I'm curious whether there is any way to retrieve inline "user" and reminders. I know it's in TODO to get them in mardown format, but what about raw data?
The text was updated successfully, but these errors were encountered:
First you need to get the block properties. Don't get it with block.title method but which returns String but use block.get().get('properties').get('title') which returns structure.
Than you are able to get Users based on mentions:
for part in block.get().get('properties').get('title'):
if len(part) > 1:
if part[0] == '‣':
if part[1][0][0] == 'u': # user mention
user_id = part[1][0][1]
todoAction = todoAction + ' **@' + client.get_user(user_id).full_name + '**'
todoActionList.append(' @' + client.get_user(user_id).full_name)
or you can get dates
if part[1][0][0] == 'd': # date
dateRecord = part[1][0][1]
date = datetime.date.fromisoformat(dateRecord.get('start_date'))
dateFormatted = date.strftime('*%d. %m. %Y*')
Hi I'm curious whether there is any way to retrieve inline "user" and reminders. I know it's in TODO to get them in mardown format, but what about raw data?
The text was updated successfully, but these errors were encountered: