Integration with Omie

I’m trying to integrate Monday with Omie to display and use the existing dashboard. Does anyone know how to help me? I’m stuck. Where i need to put my code ? i need to pay some server ?

from fastapi import FastAPI
import requests

app = FastAPI()

OMIE_API_KEY = ‘your_omie_api_key’
MONDAY_API_KEY = ‘your_monday_api_key’

Endpoint to retrieve and display the Omie dashboard integrated with Monday

@app.get(‘/dashboard’)
def get_integrated_dashboard():
# Retrieve Omie dashboard data
omie_dashboard_data = get_omie_dashboard()

if omie_dashboard_data.get('error'):
    return {'error': omie_dashboard_data['error']}

# Integrate Omie dashboard with Monday
monday_payload = {
    'name': 'Omie Dashboard',
    'description': 'Dashboard data retrieved from Omie',
    'column_values': {
        'dashboard_data': str(omie_dashboard_data)
    }
}

monday_url = 'https://api.monday.com/v2/boards/{your_board_id}/items'  # Replace with your board ID
monday_headers = {
    'Content-Type': 'application/json',
    'Authorization': MONDAY_API_KEY
}
monday_response = requests.post(monday_url, headers=monday_headers, json={'item': monday_payload})

if monday_response.status_code == 200:
    return {'message': 'Dashboard data integrated and displayed on Monday'}
else:
    return {'error': 'Failed to integrate dashboard data with Monday'}

def get_omie_dashboard():
# Make a request to the Omie API to fetch the dashboard data
omie_headers = {
‘Content-Type’: ‘application/json’,
‘Authorization’: f’Bearer {OMIE_API_KEY}’
}
omie_url = ‘https://app.omie.com.br/api/v1/dashboard
omie_response = requests.get(omie_url, headers=omie_headers)

if omie_response.status_code == 200:
    dashboard_data = omie_response.json()
    return dashboard_data
else:
    return {'error': 'Failed to retrieve Omie dashboard'}

Run the application

if name == ‘main’:
import uvicorn
uvicorn.run(app, host=‘0.0.0.0’, port=8000)

Hi Jaoa,

Are you looking to display Omie inside of monday or monday inside of Omie?

If you’re displaying Omie on monday, I recommend making a board view, dashboard widget or item view. You can learn more about creating these views here.

I’m not sure about what you’re looking to achieve with the code, but I can see our endpoint is listed incorrectly. Our only endpoint is https://api.monday.com/v2

1 Like