Documentation Index
Fetch the complete documentation index at: https://docs.morph-data.io/llms.txt
Use this file to discover all available pages before exploring further.
Connecting to Attio
For an overview of the connector, please refer to the following link.
Create a Connector
Select the “Connectors” tab on the top page and press the “Create” button.
Enter Attio Credentials
Select Attio and press the sign-in button.
After entering the information, press the Create button to complete the creation. If there are any errors in the parameters, an error will be displayed, so please check the connection details again. Obtain access_token from the created connector
Once the creation is successful, you can obtain the connector name from the list display.Use the dedicated function to enter the connector name in the Python code and obtain the access_token.import morph
from morph import MorphGlobalContext
from morph_lib.api import get_auth_token
@morph.func
def main(context: MorphGlobalContext):
access_token = get_auth_token("connection_name")
# ↓↓↓ Process using access_token ↓↓↓
In the local version, you currently need to directly write the credentials in ~/.morph/connections.yml. Please create it in the dashboard if you prefer other methods.
Edit connections.yml
If the file does not exist in ~/.morph/connections.yml, please create it beforehand and then edit it.mkdir ~/.morph
touch ~/.morph/connections.yml
connections:
attio-connection: # Any unique name
type: attio # Fixed
method: attio_oauth # Fixed
refresh_token: str
client_id: str
client_secret: str
redirect_uri: str
access_token: str # Optional
Use the connector in the code to retrieve data
Use the dedicated function to enter the connector name in the Python code and obtain the access_token.import morph
from morph import MorphGlobalContext
from morph_lib.api import get_auth_token
@morph.func
def main(context: MorphGlobalContext):
access_token = get_auth_token("connection_name")
# ↓↓↓ Process using access_token ↓↓↓
The access_token refresh is a dashboard feature, so the one described will always be used in the local environment.The priority when actually specifying and executing the file with the connector is as follows.
Also, please note that only connectors created in the dashboard can be used in the environment where morph deploy is performed.
- Connectors described in
~/.morph/connections.yml on the local machine
- Connectors registered in the cloud