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 need to add pages under table named "DA CARICARE".
I 'm able to add pages ...
but these are always added to the last table named "Table" se image attached.
How can i add pages in the table named "DA CARICARE"
This is my code
$secret = $setting->api_key;
$notion = NotionHelper::client($secret);
$notion = Notion::create($secret);
$setting = Settings::find()->where(['type' => 'notion_database'])->one();
$databaseId = $setting->api_key;
$number = \Notion\Pages\Properties\RichTextProperty::fromString($numero);
$date = \Notion\Pages\Properties\Date::create(new \DateTimeImmutable(date('Y-m-d')));
$customer = \Notion\Pages\Properties\RichTextProperty::fromString($notdoc);
$link = \Notion\Pages\Properties\Url::create('https://www.notion.so/xxxxxxx/');
$referenza=\Notion\Pages\Properties\Title::fromString($sku);
$commento=\Notion\Pages\Properties\RichTextProperty::fromString("");
$state=\Notion\Pages\Properties\Select::fromName("New");
$createdby=\Notion\Pages\Properties\RichTextProperty::fromString("xxxxxx");
$linkasso=\Notion\Pages\Properties\Url::create("https://a**********/web/gb/orders/create?id=".$idtestata);
$arrivedfrom=\Notion\Pages\Properties\RichTextProperty::fromString("******");
$priority=\Notion\Pages\Properties\Select::fromName("Importato!");
$parent = \Notion\Pages\PageParent::database($databaseId);
$page = Page::create($parent)
->addProperty("Data inserimento", $date)
->addProperty("Nr. ordine", $number)
->addProperty("Cliente", $customer)
->addProperty("Link ordine", $link)
->addProperty("Referenza", $referenza)
->addProperty("Commento ordine", $commento)
->addProperty("Stato ordine", $state)
->addProperty("SCADENZA", $date)
->addProperty("Priorità", $priority)
->addProperty("Link Assostore", $linkasso)
->addProperty("Arrivato Da", $arrivedfrom);
$page = $notion->pages()->create($page);
Thanks .
The text was updated successfully, but these errors were encountered:
Hi ,
![image](https://private-user-images.githubusercontent.com/38974203/357691841-6cbf9904-34d6-4eb8-a71f-5dd0f162c13e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTkxMzIsIm5iZiI6MTczOTI1ODgzMiwicGF0aCI6Ii8zODk3NDIwMy8zNTc2OTE4NDEtNmNiZjk5MDQtMzRkNi00ZWI4LWE3MWYtNWRkMGYxNjJjMTNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MjcxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFhYTA2OWMxNzE2MTA4MTE5NmJhMGE5MDk3ZjUzMWZlNGYxYmE2ZDY1NmMxYTA0YmRmNTA2NmE5MWEyYzNjYTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.eUBphxWePumc9pPPpElS3ukauBtM3-vclaNduf-K2YA)
![image](https://private-user-images.githubusercontent.com/38974203/357691461-a1af691e-93f0-41f0-9b83-233a8024548c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTkxMzIsIm5iZiI6MTczOTI1ODgzMiwicGF0aCI6Ii8zODk3NDIwMy8zNTc2OTE0NjEtYTFhZjY5MWUtOTNmMC00MWYwLTliODMtMjMzYTgwMjQ1NDhjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MjcxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzZGIxNTVkZDY0ZDNhNTNjODhmNTM3ZTE0YjcxNTYzYTViYzg1ZDk4YjZjMzQzNTk4MDE4ZDc1MDhmOWI5ZmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GOHliz8pbCi7oHYEU2QR1ImZNYjWSdim0wBjkYKeHkA)
i need to add pages under table named "DA CARICARE".
I 'm able to add pages ...
but these are always added to the last table named "Table" se image attached.
How can i add pages in the table named "DA CARICARE"
This is my code
$secret = $setting->api_key;
$notion = NotionHelper::client($secret);
$notion = Notion::create($secret);
$setting = Settings::find()->where(['type' => 'notion_database'])->one();
$databaseId = $setting->api_key;
$number = \Notion\Pages\Properties\RichTextProperty::fromString($numero);
$date = \Notion\Pages\Properties\Date::create(new \DateTimeImmutable(date('Y-m-d')));
$customer = \Notion\Pages\Properties\RichTextProperty::fromString($notdoc);
$link = \Notion\Pages\Properties\Url::create('https://www.notion.so/xxxxxxx/');
$referenza=\Notion\Pages\Properties\Title::fromString($sku);
$commento=\Notion\Pages\Properties\RichTextProperty::fromString("");
$state=\Notion\Pages\Properties\Select::fromName("New");
$createdby=\Notion\Pages\Properties\RichTextProperty::fromString("xxxxxx");
$linkasso=\Notion\Pages\Properties\Url::create("https://a**********/web/gb/orders/create?id=".$idtestata);
$arrivedfrom=\Notion\Pages\Properties\RichTextProperty::fromString("******");
$priority=\Notion\Pages\Properties\Select::fromName("Importato!");
$parent = \Notion\Pages\PageParent::database($databaseId);
$page = Page::create($parent)
->addProperty("Data inserimento", $date)
->addProperty("Nr. ordine", $number)
->addProperty("Cliente", $customer)
->addProperty("Link ordine", $link)
->addProperty("Referenza", $referenza)
->addProperty("Commento ordine", $commento)
->addProperty("Stato ordine", $state)
->addProperty("SCADENZA", $date)
->addProperty("Priorità", $priority)
->addProperty("Link Assostore", $linkasso)
->addProperty("Arrivato Da", $arrivedfrom);
$page = $notion->pages()->create($page);
Thanks .
The text was updated successfully, but these errors were encountered: